1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

initial iOS support to fix building

tested with Xcode and Unix Makefiles
This commit is contained in:
Andrey Filipenkov
2021-03-01 11:38:21 +03:00
parent 735c4f149a
commit b824a90295
10 changed files with 818 additions and 17 deletions

View File

@@ -273,7 +273,7 @@ if(SDL2_LIBRARY)
# I think it has something to do with the CACHE STRING.
# So I use a temporary variable until the end so I can set the
# "real" variable in one-shot.
if(APPLE)
if(APPLE_MACOS)
set(SDL2_LIBRARIES ${SDL2_LIBRARIES} -framework Cocoa)
endif()
@@ -342,8 +342,10 @@ if(SDL2_FOUND)
if(APPLE)
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
# For more details, please see above.
set_property(TARGET SDL2::SDL2 APPEND PROPERTY
INTERFACE_LINK_OPTIONS -framework Cocoa)
if (APPLE_MACOS)
set_property(TARGET SDL2::SDL2 APPEND PROPERTY
INTERFACE_LINK_OPTIONS -framework Cocoa)
endif()
else()
# For threads, as mentioned Apple doesn't need this.
# For more details, please see above.