Browse Source

[cmake] improvements

Andrey Filipenkov 10 months ago
parent
commit
3839b2cc06
2 changed files with 3 additions and 3 deletions
  1. 1 1
      launcher/CMakeLists.txt
  2. 2 2
      serverapp/CMakeLists.txt

+ 1 - 1
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()
 

+ 2 - 2
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)