Some more CMake fixes
This commit is contained in:
parent
469c25c93d
commit
58d7fb2ca7
1 changed files with 11 additions and 0 deletions
|
@ -318,6 +318,12 @@ if(FREETYPE_FOUND AND NOT FORCE_LOCAL_LIBS)
|
||||||
else()
|
else()
|
||||||
# Compile it ourselves
|
# Compile it ourselves
|
||||||
message(STATUS "Using local FreeType")
|
message(STATUS "Using local FreeType")
|
||||||
|
if(FORCE_LOCAL_LIBS)
|
||||||
|
set(CMAKE_DISABLE_FIND_PACKAGE_HarfBuzz ON)
|
||||||
|
set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB ON)
|
||||||
|
set(CMAKE_DISABLE_FIND_PACKAGE_PNG ON)
|
||||||
|
set(CMAKE_DISABLE_FIND_PACKAGE_BZip2 ON)
|
||||||
|
endif()
|
||||||
add_subdirectory(external/freetype EXCLUDE_FROM_ALL)
|
add_subdirectory(external/freetype EXCLUDE_FROM_ALL)
|
||||||
target_link_libraries(CSE2 freetype)
|
target_link_libraries(CSE2 freetype)
|
||||||
endif()
|
endif()
|
||||||
|
@ -361,6 +367,11 @@ else()
|
||||||
# of important functions. THAT was no fun to debug.
|
# of important functions. THAT was no fun to debug.
|
||||||
set(FLTK_LIBRARIES)
|
set(FLTK_LIBRARIES)
|
||||||
set(OPTION_BUILD_EXAMPLES OFF) # Needed to prevent a name collision
|
set(OPTION_BUILD_EXAMPLES OFF) # Needed to prevent a name collision
|
||||||
|
if(FORCE_LOCAL_LIBS)
|
||||||
|
set(OPTION_USE_SYSTEM_ZLIB OFF)
|
||||||
|
set(OPTION_USE_SYSTEM_LIBJPEG OFF)
|
||||||
|
set(OPTION_USE_SYSTEM_LIBPNG OFF)
|
||||||
|
endif()
|
||||||
add_subdirectory(external/fltk EXCLUDE_FROM_ALL)
|
add_subdirectory(external/fltk EXCLUDE_FROM_ALL)
|
||||||
get_target_property(DIRS fltk INCLUDE_DIRECTORIES) # FLTK doesn't mark its includes as PUBLIC or INTERFACE, so we have to do this stupidity
|
get_target_property(DIRS fltk INCLUDE_DIRECTORIES) # FLTK doesn't mark its includes as PUBLIC or INTERFACE, so we have to do this stupidity
|
||||||
target_include_directories(DoConfig PRIVATE ${DIRS})
|
target_include_directories(DoConfig PRIVATE ${DIRS})
|
||||||
|
|
Loading…
Add table
Reference in a new issue