1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

ios fix attempt

This commit is contained in:
Simeon Manolov 2024-08-14 23:30:19 +03:00
parent 6767f90066
commit 9b655ac43e
No known key found for this signature in database
GPG Key ID: 0AAC6D4A304B5635
6 changed files with 33 additions and 26 deletions

View File

@ -396,19 +396,12 @@ set(vcmiclientcommon_HEADERS
)
if(APPLE_IOS)
set(vcmiclientcommon_SRCS ${vcmiclientcommon_SRCS}
CFocusableHelper.cpp
ios/GameChatKeyboardHandler.m
ios/main.m
ios/startSDL.mm
ios/utils.mm
)
set(vcmiclientcommon_HEADERS ${vcmiclientcommon_HEADERS}
CFocusableHelper.h
ios/GameChatKeyboardHandler.h
ios/startSDL.h
ios/utils.h
)
set(vcmiclientcommon_SRCS ${vcmiclientcommon_SRCS}
ios/utils.mm
)
set(vcmiclientcommon_HEADERS ${vcmiclientcommon_HEADERS}
ios/utils.h
)
endif()
assign_source_group(${vcmiclientcommon_SRCS} ${vcmiclientcommon_HEADERS})
@ -466,17 +459,6 @@ elseif(APPLE_IOS)
"-framework CoreMedia"
"-framework VideoToolbox"
)
foreach(XCODE_RESOURCE LaunchScreen.storyboard Images.xcassets Settings.bundle vcmi_logo.png)
set(XCODE_RESOURCE_PATH ios/${XCODE_RESOURCE})
target_sources(vcmiclientcommon PRIVATE ${XCODE_RESOURCE_PATH})
set_source_files_properties(${XCODE_RESOURCE_PATH} 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" AND CMAKE_VERSION VERSION_LESS "3.25.0")
set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES LANGUAGE CXX)
endif()
endforeach()
endif()
target_link_libraries(vcmiclientcommon PRIVATE vcmiservercommon)

View File

@ -9,7 +9,7 @@
*/
#include "StdInc.h"
#include "CFocusableHelper.h"
#include "widgets/CTextInput.h"
#include "../client/widgets/CTextInput.h"
void removeFocusFromActiveInput()
{

View File

@ -7,6 +7,20 @@ set(clientapp_HEADERS
StdInc.h
)
if(APPLE_IOS)
set(clientapp_SRCS ${clientapp_SRCS}
CFocusableHelper.cpp
ios/GameChatKeyboardHandler.m
ios/main.m
ios/startSDL.mm
)
set(clientapp_HEADERS ${clientapp_HEADERS}
CFocusableHelper.h
ios/GameChatKeyboardHandler.h
ios/startSDL.h
)
endif()
assign_source_group(${clientapp_SRCS} ${clientapp_HEADERS})
add_executable(vcmiclient ${clientapp_SRCS} ${clientapp_HEADERS})
@ -46,7 +60,18 @@ elseif(APPLE_IOS)
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
)
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-e,_vcmiclient_main")
foreach(XCODE_RESOURCE LaunchScreen.storyboard Images.xcassets Settings.bundle vcmi_logo.png)
set(XCODE_RESOURCE_PATH ios/${XCODE_RESOURCE})
target_sources(vcmiclient PRIVATE ${XCODE_RESOURCE_PATH})
set_source_files_properties(${XCODE_RESOURCE_PATH} 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" AND CMAKE_VERSION VERSION_LESS "3.25.0")
set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES LANGUAGE CXX)
endif()
endforeach()
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-e,_client_main")
endif()
vcmi_set_output_dir(vcmiclient "")