diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-22 11:55:03 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-22 11:55:03 +0200 |
commit | c95aab351dfcf1282925708b16ceb727895da66b (patch) | |
tree | 4f2630451cad94ca31528eed140d09a3efd26600 /CMakeLists.txt | |
parent | ecb72de43c2119139d87bef3da05819d3724c91a (diff) |
iOS: Assets in the CMake project
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 30 |
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 | ) |
176 | if (IOS) | 176 | if (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 | ) | ||
179 | elseif (APPLE) | 187 | elseif (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}) | |||
232 | if (APPLE) | 240 | if (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 () | ||
267 | endif () | 279 | endif () |
268 | if (MSYS) | 280 | if (MSYS) |
269 | target_link_libraries (app PUBLIC d2d1 uuid dwmapi) # querying DPI | 281 | target_link_libraries (app PUBLIC d2d1 uuid dwmapi) # querying DPI |