diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 9a8e4897f..20800eccc 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -1,6 +1,5 @@ if(ENABLE_INNOEXTRACT) add_subdirectory("lib/innoextract") - add_definitions(-DENABLE_INNOEXTRACT) endif() set(launcher_SRCS @@ -219,6 +218,7 @@ vcmi_set_output_dir(vcmilauncher "") enable_pch(vcmilauncher) if(ENABLE_INNOEXTRACT) + target_compile_definitions(vcmilauncher PRIVATE ENABLE_INNOEXTRACT) target_link_libraries(vcmilauncher innoextract) endif() diff --git a/serverapp/CMakeLists.txt b/serverapp/CMakeLists.txt index 059e6132d..79af9d73f 100644 --- a/serverapp/CMakeLists.txt +++ b/serverapp/CMakeLists.txt @@ -9,10 +9,10 @@ set(serverapp_HEADERS assign_source_group(${serverapp_SRCS} ${serverapp_HEADERS}) add_executable(vcmiserver ${serverapp_SRCS} ${serverapp_HEADERS}) -set(serverapp_LIBS vcmi) +set(serverapp_LIBS vcmi) if(CMAKE_SYSTEM_NAME MATCHES FreeBSD OR HAIKU) - set(serverapp_LIBS execinfo ${serverapp_LIBS}) + list(APPEND serverapp_LIBS execinfo) endif() target_link_libraries(vcmiserver PRIVATE ${serverapp_LIBS} minizip::minizip vcmiservercommon)