mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
fix building vcmiERM for iOS
This commit is contained in:
parent
cd88f3fa9e
commit
7b411a5fc4
@ -404,6 +404,16 @@ set(SCRIPTING_LIB_DIR "${LIB_DIR}/scripting")
|
||||
# Add subdirectories #
|
||||
#######################################
|
||||
|
||||
include(VCMI_lib)
|
||||
if(BUILD_SINGLE_APP)
|
||||
add_subdirectory(lib_client)
|
||||
add_subdirectory(lib_server)
|
||||
set(VCMI_LIB_TARGET vcmi_lib_client)
|
||||
else()
|
||||
add_subdirectory(lib)
|
||||
set(VCMI_LIB_TARGET vcmi)
|
||||
endif()
|
||||
|
||||
if(ENABLE_ERM)
|
||||
add_subdirectory(scripting/erm)
|
||||
endif()
|
||||
@ -415,14 +425,6 @@ if(NOT TARGET minizip::minizip)
|
||||
add_library(minizip::minizip ALIAS minizip)
|
||||
endif()
|
||||
|
||||
include(VCMI_lib)
|
||||
if(BUILD_SINGLE_APP)
|
||||
add_subdirectory(lib_client)
|
||||
add_subdirectory(lib_server)
|
||||
else()
|
||||
add_subdirectory(lib)
|
||||
endif()
|
||||
|
||||
if(ENABLE_LAUNCHER)
|
||||
add_subdirectory(launcher)
|
||||
endif()
|
||||
|
@ -174,7 +174,16 @@ if(ENABLE_DEBUG_CONSOLE)
|
||||
else()
|
||||
add_executable(vcmiclient WIN32 ${client_SRCS} ${client_HEADERS} ${client_ICON})
|
||||
endif(ENABLE_DEBUG_CONSOLE)
|
||||
|
||||
add_dependencies(vcmiclient vcmiserver BattleAI StupidAI VCAI Nullkiller)
|
||||
if(APPLE_IOS)
|
||||
if(ENABLE_ERM)
|
||||
add_dependencies(vcmiclient vcmiERM)
|
||||
endif()
|
||||
if(ENABLE_LUA)
|
||||
add_dependencies(vcmiclient vcmiLua)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(vcmiclient
|
||||
@ -226,9 +235,6 @@ if(BUILD_SINGLE_APP)
|
||||
if(ENABLE_LAUNCHER)
|
||||
target_link_libraries(vcmiclient PRIVATE vcmilauncher)
|
||||
endif()
|
||||
set(VCMI_LIB_TARGET vcmi_lib_client)
|
||||
else()
|
||||
set(VCMI_LIB_TARGET vcmi)
|
||||
endif()
|
||||
target_link_libraries(vcmiclient PRIVATE
|
||||
${VCMI_LIB_TARGET} SDL2::SDL2 SDL2::Image SDL2::Mixer SDL2::TTF
|
||||
|
@ -110,11 +110,6 @@ if(APPLE)
|
||||
set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER vcmilauncher)
|
||||
endif()
|
||||
|
||||
if(BUILD_SINGLE_APP)
|
||||
set(VCMI_LIB_TARGET vcmi_lib_client)
|
||||
else()
|
||||
set(VCMI_LIB_TARGET vcmi)
|
||||
endif()
|
||||
target_link_libraries(vcmilauncher ${VCMI_LIB_TARGET} Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network)
|
||||
target_include_directories(vcmilauncher
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
@ -15,9 +15,13 @@ set(lib_HDRS
|
||||
)
|
||||
|
||||
add_library(vcmiERM SHARED ${lib_SRCS} ${lib_HDRS})
|
||||
target_link_libraries(vcmiERM Boost::boost vcmi)
|
||||
target_link_libraries(vcmiERM Boost::boost ${VCMI_LIB_TARGET})
|
||||
|
||||
vcmi_set_output_dir(vcmiERM "scripting")
|
||||
enable_pch(vcmiERM)
|
||||
|
||||
install(TARGETS vcmiERM LIBRARY DESTINATION ${SCRIPTING_LIB_DIR} OPTIONAL)
|
||||
if(APPLE_IOS)
|
||||
install(TARGETS vcmiERM LIBRARY DESTINATION ${SCRIPTING_LIB_DIR})
|
||||
else()
|
||||
install(TARGETS vcmiERM DESTINATION ${SCRIPTING_LIB_DIR})
|
||||
endif()
|
||||
|
@ -6,3 +6,4 @@
|
||||
|
||||
// Here you can add specific libraries and macros which are specific to this project.
|
||||
|
||||
VCMI_LIB_USING_NAMESPACE
|
||||
|
Loading…
Reference in New Issue
Block a user