summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 21 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 216ccfc0..382d3229 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -175,7 +175,15 @@ set (SOURCES
175) 175)
176if (IOS) 176if (IOS)
177 add_definitions (-DiPlatformAppleMobile=1) 177 add_definitions (-DiPlatformAppleMobile=1)
178 list (APPEND SOURCES src/ios.m src/ios.h) 178 list (APPEND SOURCES
179 src/ios.m
180 src/ios.h
181 app/Images.xcassets
182 res/LaunchScreen.storyboard
183 )
184 set_source_files_properties(app/Images.xcassets PROPERTIES
185 MACOSX_PACKAGE_LOCATION Resources
186 )
179elseif (APPLE) 187elseif (APPLE)
180 add_definitions (-DiPlatformAppleDesktop=1) 188 add_definitions (-DiPlatformAppleDesktop=1)
181 list (APPEND SOURCES src/macos.m src/macos.h) 189 list (APPEND SOURCES src/macos.m src/macos.h)
@@ -232,9 +240,6 @@ target_link_libraries (app PUBLIC ${SDL2_LDFLAGS})
232if (APPLE) 240if (APPLE)
233 if (IOS) 241 if (IOS)
234 target_link_libraries (app PUBLIC "-framework UIKit") 242 target_link_libraries (app PUBLIC "-framework UIKit")
235 set_target_properties (app PROPERTIES
236 XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY 2
237 )
238 else () 243 else ()
239 target_link_libraries (app PUBLIC "-framework AppKit") 244 target_link_libraries (app PUBLIC "-framework AppKit")
240 endif () 245 endif ()
@@ -242,11 +247,6 @@ if (APPLE)
242 target_compile_options (app PUBLIC -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}) 247 target_compile_options (app PUBLIC -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET})
243 target_link_options (app PUBLIC -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}) 248 target_link_options (app PUBLIC -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET})
244 endif () 249 endif ()
245 if (XCODE_DEVELOPMENT_TEAM)
246 set_property (TARGET app PROPERTY
247 XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${XCODE_DEVELOPMENT_TEAM}
248 )
249 endif ()
250 if (SDL2_LIBRARY_DIRS) 250 if (SDL2_LIBRARY_DIRS)
251 set_property (TARGET app PROPERTY BUILD_RPATH ${SDL2_LIBRARY_DIRS}) 251 set_property (TARGET app PROPERTY BUILD_RPATH ${SDL2_LIBRARY_DIRS})
252 endif () 252 endif ()
@@ -264,6 +264,18 @@ if (APPLE)
264 MACOSX_BUNDLE_COPYRIGHT "© ${COPYRIGHT_YEAR} Jaakko Keränen" 264 MACOSX_BUNDLE_COPYRIGHT "© ${COPYRIGHT_YEAR} Jaakko Keränen"
265 XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "fi.skyjake.Lagrange" 265 XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "fi.skyjake.Lagrange"
266 ) 266 )
267 if (IOS)
268 set_target_properties (app PROPERTIES
269 XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2"
270 XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon"
271 MACOSX_BUNDLE_ICON_FILE "AppIcon"
272 )
273 endif ()
274 if (XCODE_DEVELOPMENT_TEAM)
275 set_property (TARGET app PROPERTY
276 XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${XCODE_DEVELOPMENT_TEAM}
277 )
278 endif ()
267endif () 279endif ()
268if (MSYS) 280if (MSYS)
269 target_link_libraries (app PUBLIC d2d1 uuid dwmapi) # querying DPI 281 target_link_libraries (app PUBLIC d2d1 uuid dwmapi) # querying DPI