mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
enable clang modules and framework auto-linking
This commit is contained in:
parent
b824a90295
commit
7a50620e61
@ -224,6 +224,12 @@ if(CMAKE_COMPILER_IS_GNUCXX OR NOT WIN32) #so far all *nix compilers support suc
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# TODO: also enable for macOS
|
||||||
|
if(APPLE_IOS)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmodules")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmodules")
|
||||||
|
endif(APPLE_IOS)
|
||||||
|
|
||||||
# Check if some platform-specific libraries are needed for linking
|
# Check if some platform-specific libraries are needed for linking
|
||||||
if(NOT WIN32 AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
|
if(NOT WIN32 AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
|
||||||
include(CheckLibraryExists)
|
include(CheckLibraryExists)
|
||||||
|
@ -177,7 +177,6 @@ if(WIN32)
|
|||||||
target_compile_definitions(vcmiclient PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH)
|
target_compile_definitions(vcmiclient PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH)
|
||||||
elseif(APPLE_IOS)
|
elseif(APPLE_IOS)
|
||||||
target_link_libraries(vcmiclient PRIVATE
|
target_link_libraries(vcmiclient PRIVATE
|
||||||
"-framework UIKit"
|
|
||||||
"-framework QuartzCore -framework CoreGraphics -framework CoreServices -framework ImageIO" # SDL2_image
|
"-framework QuartzCore -framework CoreGraphics -framework CoreServices -framework ImageIO" # SDL2_image
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#import <UIKit/UIKit.h>
|
@import UIKit;
|
||||||
int main (int argc, char const *argv[])
|
|
||||||
|
int main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@autoreleasepool
|
@autoreleasepool
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user