mirror of https://github.com/mgba-emu/mgba.git
CMake: More minor import fixes, make sure disabling deps disables building deps too
This commit is contained in:
parent
4b3297f9e3
commit
d5721a26b6
|
@ -460,6 +460,15 @@ if(BUILD_GLES3)
|
|||
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})
|
||||
|
@ -497,14 +506,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)
|
||||
include_directories(AFTER ${LIBEDIT_INCLUDE_DIRS})
|
||||
|
@ -871,7 +872,7 @@ if(NOT SKIP_LIBRARY)
|
|||
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 @@ if(NOT SKIP_LIBRARY)
|
|||
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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue