CMake: More minor import fixes, make sure disabling deps disables building deps too
Vicki Pfau vi@endrift.com
Thu, 02 May 2019 17:45:04 -0700
1 files changed,
11 insertions(+),
10 deletions(-)
jump to
M
CMakeLists.txt
→
CMakeLists.txt
@@ -460,6 +460,15 @@ if(NOT OPENGLES3_INCLUDE_DIR OR NOT OPENGLES3_LIBRARY)
set(BUILD_GLES3 OFF CACHE BOOL "OpenGL|ES 3 not found" FORCE) endif() endif() + +if(DISABLE_DEPS) + set(USE_GDB_STUB OFF) + set(USE_DISCORD_RPC OFF) + set(USE_SQLITE3 OFF) + set(USE_PNG OFF) + set(USE_ZLIB OFF) +endif() + set(WANT_ZLIB ${USE_ZLIB}) set(WANT_PNG ${USE_PNG}) set(WANT_LIBZIP ${USE_LIBZIP})@@ -496,14 +505,6 @@ file(GLOB DEBUGGER_TEST_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger/test/*.c)
set(FEATURE_SRC) set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6") - -if(DISABLE_DEPS) - set(USE_GDB_STUB OFF) - set(USE_DISCORD_RPC OFF) - set(USE_SQLITE3 OFF) - set(USE_PNG OFF) - set(USE_ZLIB OFF) -endif() if(USE_EDITLINE) list(APPEND FEATURES EDITLINE)@@ -871,7 +872,7 @@ if(BUILD_SHARED)
add_library(${BINARY_NAME} SHARED ${SRC} ${VFS_SRC}) if(BUILD_STATIC) add_library(${BINARY_NAME}-static STATIC ${SRC}) - target_include_directories(${BINARY_NAME}-static BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) + target_include_directories(${BINARY_NAME}-static BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}) set_target_properties(${BINARY_NAME}-static PROPERTIES COMPILE_DEFINITIONS "${OS_DEFINES};${FEATURE_DEFINES};${FUNCTION_DEFINES}" COMPILE_OPTIONS "${FEATURE_FLAGS}") install(TARGETS ${BINARY_NAME}-static DESTINATION ${LIBDIR} COMPONENT lib${BINARY_NAME}) add_dependencies(${BINARY_NAME}-static version-info)@@ -880,7 +881,7 @@ else()
add_library(${BINARY_NAME} STATIC ${SRC}) endif() - target_include_directories(${BINARY_NAME} BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) + target_include_directories(${BINARY_NAME} BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}3) set_target_properties(${BINARY_NAME} PROPERTIES VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_ABI} COMPILE_DEFINITIONS "${OS_DEFINES};${FEATURE_DEFINES};${FUNCTION_DEFINES}" COMPILE_OPTIONS "${FEATURE_FLAGS}") add_dependencies(${BINARY_NAME} version-info)