mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
simplify creating client target
This commit is contained in:
parent
cc31c4aa3f
commit
f128404770
@ -239,15 +239,7 @@ if(ANDROID) # android needs client/server to be libraries, not executables, so w
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
add_executable(vcmiclient ${client_SRCS} ${client_HEADERS})
|
||||||
set(client_ICON "VCMI_client.rc")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(ENABLE_DEBUG_CONSOLE)
|
|
||||||
add_executable(vcmiclient ${client_SRCS} ${client_HEADERS} ${client_ICON})
|
|
||||||
else()
|
|
||||||
add_executable(vcmiclient WIN32 ${client_SRCS} ${client_HEADERS} ${client_ICON})
|
|
||||||
endif(ENABLE_DEBUG_CONSOLE)
|
|
||||||
|
|
||||||
add_dependencies(vcmiclient vcmiserver BattleAI StupidAI VCAI)
|
add_dependencies(vcmiclient vcmiserver BattleAI StupidAI VCAI)
|
||||||
if(ENABLE_NULLKILLER_AI)
|
if(ENABLE_NULLKILLER_AI)
|
||||||
@ -263,6 +255,7 @@ if(APPLE_IOS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
target_sources(vcmiclient PRIVATE "VCMI_client.rc")
|
||||||
set_target_properties(vcmiclient
|
set_target_properties(vcmiclient
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
OUTPUT_NAME "VCMI_client"
|
OUTPUT_NAME "VCMI_client"
|
||||||
@ -270,6 +263,7 @@ if(WIN32)
|
|||||||
)
|
)
|
||||||
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT vcmiclient)
|
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT vcmiclient)
|
||||||
if(NOT ENABLE_DEBUG_CONSOLE)
|
if(NOT ENABLE_DEBUG_CONSOLE)
|
||||||
|
set_target_properties(vcmiclient PROPERTIES WIN32_EXECUTABLE)
|
||||||
target_link_libraries(vcmiclient SDL2::SDL2main)
|
target_link_libraries(vcmiclient SDL2::SDL2main)
|
||||||
endif()
|
endif()
|
||||||
target_compile_definitions(vcmiclient PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH)
|
target_compile_definitions(vcmiclient PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH)
|
||||||
|
Loading…
Reference in New Issue
Block a user