1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

CMake cleanup

This commit is contained in:
Andrey Filipenkov 2022-08-15 10:44:45 +03:00
parent 7631e7ef06
commit 902de3af7c
2 changed files with 9 additions and 10 deletions

View File

@ -32,7 +32,7 @@ if(APPLE)
else()
set(APPLE_IOS 1)
endif()
endif(APPLE)
endif()
if(APPLE_IOS)
set(BUILD_SINGLE_APP 1)
@ -52,12 +52,11 @@ endif()
set(VCMI_VERSION_MAJOR 1)
set(VCMI_VERSION_MINOR 0)
set(VCMI_VERSION_PATCH 0)
if(APPLE_IOS)
set(APP_SHORT_VERSION "${VCMI_VERSION_MAJOR}.${VCMI_VERSION_MINOR}")
if(NOT VCMI_VERSION_PATCH EQUAL 0)
string(APPEND APP_SHORT_VERSION ".${VCMI_VERSION_PATCH}")
endif()
endif()
option(ENABLE_ERM "Enable compilation of ERM scripting module" OFF)
option(ENABLE_LUA "Enable compilation of LUA scripting module" OFF)
@ -177,7 +176,7 @@ if(APPLE_IOS)
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED_FOR_APPS YES)
set(CMAKE_XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${BUNDLE_IDENTIFIER_PREFIX}.$(PRODUCT_NAME)")
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
endif(APPLE_IOS)
endif()
if(MINGW OR MSVC)
# Windows Vista or newer for FuzzyLite 6 to compile
@ -369,7 +368,7 @@ elseif(APPLE)
else()
set(LIB_DIR "Frameworks")
set(DATA_DIR ".")
endif(APPLE_MACOS)
endif()
endif()
else()
# includes lib path which determines where to install shared libraries (either /lib or /lib64)
@ -443,7 +442,7 @@ install(DIRECTORY config DESTINATION ${DATA_DIR})
install(DIRECTORY scripts DESTINATION ${DATA_DIR})
install(DIRECTORY Mods DESTINATION ${DATA_DIR})
# that script is useless for Windows
# that script is useless for Windows and iOS
if(NOT WIN32 AND NOT APPLE_IOS)
install(FILES vcmibuilder DESTINATION ${BIN_DIR} PERMISSIONS
OWNER_WRITE OWNER_READ OWNER_EXECUTE

View File

@ -212,7 +212,7 @@ elseif(APPLE_IOS)
set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
# workaround to prevent CMAKE_SKIP_PRECOMPILE_HEADERS being added as compile flag
# add max version condition when https://gitlab.kitware.com/cmake/cmake/-/issues/23821 is fixed
# add max version condition when https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7562 is merged
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.22.0")
set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES LANGUAGE CXX)
endif()