mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-18 19:23:56 +00:00
Exclude 'zlib' shared project from emulator lib (#83)
Shared targets are not compatible with the emulator lib.
This commit is contained in:
10
deps/zlib.cmake
vendored
10
deps/zlib.cmake
vendored
@@ -1,4 +1,12 @@
|
||||
set(ZLIB_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
add_subdirectory(zlib)
|
||||
target_compile_definitions(zlibstatic PUBLIC ZLIB_CONST=1)
|
||||
target_include_directories(zlibstatic PUBLIC ${zlib_SOURCE_DIR} ${zlib_BINARY_DIR})
|
||||
target_include_directories(zlibstatic PUBLIC ${zlib_SOURCE_DIR} ${zlib_BINARY_DIR})
|
||||
|
||||
if (TARGET zlib)
|
||||
# Remove all properties and dependencies from the zlib shared lib target
|
||||
# (this will keep the zlibstatic target)
|
||||
set_target_properties(zlib PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
set_target_properties(zlib PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
|
||||
message(STATUS "Target 'zlib' has been disabled.")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user