Skip to content

Commit

Permalink
Modify CMakeLists to use new source vendor version of freetype for al…
Browse files Browse the repository at this point in the history
…l targets
  • Loading branch information
autious committed May 3, 2022
1 parent fed8e31 commit da170b9
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions Projects/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,12 @@ IF(LINUX)
FIND_PACKAGE(GTK2 REQUIRED)
FIND_PACKAGE(SDL2 REQUIRED)
FIND_PACKAGE(SDL2NET REQUIRED)
FIND_PACKAGE(Freetype REQUIRED)
FIND_PACKAGE(OpenAL REQUIRED)

# We use a vendored version of the library on the build server
#IF(NOT BUILD_SERVER)
# #FIND_PACKAGE(Freetype REQUIRED)
#ENDIF()
ENDIF()

#Build static libraries only for FFTW
Expand All @@ -281,6 +285,7 @@ SET(BUILD_TESTS OFF CACHE BOOL "" FORCE)
#Create subprojects that have their own CMakeLists
ADD_SUBDIRECTORY(../Libraries/crunch-r319 crnlib)
ADD_SUBDIRECTORY(../Libraries/zstd-1.5.0/build/cmake zstd)
ADD_SUBDIRECTORY(../Libraries/freetype-2.12.1 freetype)

IF(BUILD_OVERGROWTH)
#Create subprojects that have their own CMakeLists
Expand Down Expand Up @@ -521,13 +526,6 @@ IF(LINUX)
SET(LINUX_LIB_DIR "linux32")
ENDIF()

#Only use the pre-compiled freetype library files on linux if we are building on the build server in the steam runtime, otherwise use the local system version
IF(BUILD_SERVER)
LINK_DIRECTORIES(
${LIBDIR}/freetype-2.4.11/lib/${LINUX_LIB_DIR}
)
ENDIF()

LINK_DIRECTORIES(
${SDL2_LIBRARY}
${SDL2NET_LIBRARY}
Expand Down Expand Up @@ -589,7 +587,6 @@ ENDIF()
IF(APPLE)
LINK_DIRECTORIES(
${LIBDIR}/FreeImage/maclib/64
${LIBDIR}/freetype-2.4.11/lib/mac64
${LIBDIR}/libogg-1.3.3/lib/mac64
${LIBDIR}/libvorbis-1.3.6/lib/mac64
${LIBDIR}/libtheora-1.1.1/lib/mac64
Expand Down Expand Up @@ -663,6 +660,7 @@ INCLUDE_DIRECTORIES(
${LIBDIR}/recastnavigation/DetourCrowd/Include
${LIBDIR}/zstd-1.5.0/lib
${LIBDIR}/binn-3.0/src
${LIBDIR}/freetype-2.12.1/include
${LIBDIR}/TheoraPlayer/Source
)

Expand Down Expand Up @@ -697,12 +695,6 @@ IF(LINUX)
${LIBDIR}/FreeImage/linuxinclude
)

IF(BUILD_SERVER)
INCLUDE_DIRECTORIES(
${LIBDIR}/freetype-2.4.11/include
)
ENDIF()

IF(ENABLE_RAD_TELEMETRY)
INCLUDE_DIRECTORIES(
${PLIBDIR}/Telemetry2SDKLinux_20P3/include
Expand Down Expand Up @@ -746,7 +738,6 @@ if(APPLE)
${SDL2_INCLUDE_DIR}
${LIBDIR}/FreeImage/macinclude
/opt/X11/include
${LIBDIR}/freetype-2.4.11/include
)

IF(ENABLE_RAD_TELEMETRY)
Expand Down Expand Up @@ -1557,7 +1548,8 @@ IF(BUILD_OVERGROWTH)
DetourTileCache
Detour
crnlib
libzstd_static
freetype
libzstd_static
${STATIC_LIBS}
${FLTK_LIBS}
)
Expand Down Expand Up @@ -1598,12 +1590,6 @@ IF(BUILD_OVERGROWTH)
ENDIF()
ENDIF()

IF(UNIX)
TARGET_LINK_LIBRARIES(Overgrowth
freetype
)
ENDIF()

IF(LINUX)
TARGET_LINK_LIBRARIES(Overgrowth
SDL2
Expand Down

0 comments on commit da170b9

Please sign in to comment.