exclude 'zlib' shared project from emulator lib

Shared targets are not compatible with emulator lib.
This commit is contained in:
Elias Bachaalany
2025-01-16 13:03:24 -08:00
parent c4b76640c7
commit bc7b9bc915

View File

@@ -2,7 +2,16 @@ add_subdirectory(common)
add_subdirectory(emulator)
add_subdirectory(unicorn-emulator)
add_subdirectory(windows-emulator)
if (NOT MOMO_BUILD_AS_LIBRARY)
if (MOMO_BUILD_AS_LIBRARY)
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 in emulator-lib mode.")
endif()
else()
add_subdirectory(analyzer)
add_subdirectory(fuzzing-engine)
add_subdirectory(fuzzer)