From bc7b9bc915f6e3d332877239351f957ad7f61684 Mon Sep 17 00:00:00 2001 From: Elias Bachaalany Date: Thu, 16 Jan 2025 13:03:24 -0800 Subject: [PATCH] exclude 'zlib' shared project from emulator lib Shared targets are not compatible with emulator lib. --- src/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 24b3d98f..737b1438 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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)