1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-29 21:56:54 +02:00

fix compiling storyboard without the need to edit generated xcodeproj manually

This commit is contained in:
Andrey Filipenkov 2022-08-04 15:55:01 +03:00
parent 86e4edf71f
commit ba9ace46ad
2 changed files with 4 additions and 6 deletions

View File

@ -215,6 +215,10 @@ elseif(APPLE_IOS)
target_sources(vcmiclient PRIVATE ios/LaunchScreen.storyboard)
set_source_files_properties(ios/LaunchScreen.storyboard PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
# workaround to prevent CMAKE_SKIP_PRECOMPILE_HEADERS being added as compile flag
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.22.0")
set_source_files_properties(ios/LaunchScreen.storyboard PROPERTIES LANGUAGE CXX)
endif()
target_sources(vcmiclient PRIVATE ios/Images.xcassets)
set_source_files_properties(ios/Images.xcassets PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")

View File

@ -33,9 +33,3 @@ cmake "$srcDir" -G Xcode \
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='Apple Development' \
-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM='4XHN44TEVG'
# -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO
# workaround strange cmake bug that adds compile flag to resources
sed -i '' \
-e 's|\.storyboard \*/; settings = {COMPILER_FLAGS = "-DCMAKE_SKIP_PRECOMPILE_HEADERS "; };|.storyboard */;|g' \
-e 's|\.xcassets \*/; settings = {COMPILER_FLAGS = "-DCMAKE_SKIP_PRECOMPILE_HEADERS "; };|.xcassets */;|g' \
VCMI.xcodeproj/project.pbxproj