diff options
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | src/ui/window.c | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ea25183f..d5e51d23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -176,7 +176,12 @@ set (SOURCES | |||
176 | ${CMAKE_CURRENT_BINARY_DIR}/embedded.c | 176 | ${CMAKE_CURRENT_BINARY_DIR}/embedded.c |
177 | ${CMAKE_CURRENT_BINARY_DIR}/embedded.h | 177 | ${CMAKE_CURRENT_BINARY_DIR}/embedded.h |
178 | ) | 178 | ) |
179 | if (ANDROID) | ||
180 | set (MOBILE 1) | ||
181 | add_definitions (-DiPlatformAndroidMobile=1) | ||
182 | endif () | ||
179 | if (IOS) | 183 | if (IOS) |
184 | set (MOBILE 1) | ||
180 | add_definitions (-DiPlatformAppleMobile=1) | 185 | add_definitions (-DiPlatformAppleMobile=1) |
181 | list (APPEND SOURCES | 186 | list (APPEND SOURCES |
182 | src/ios.m | 187 | src/ios.m |
@@ -199,6 +204,14 @@ if (MSYS) | |||
199 | list (APPEND SOURCES src/win32.c src/win32.h ${CMAKE_CURRENT_BINARY_DIR}/lagrange.rc) | 204 | list (APPEND SOURCES src/win32.c src/win32.h ${CMAKE_CURRENT_BINARY_DIR}/lagrange.rc) |
200 | endif () | 205 | endif () |
201 | set_source_files_properties (${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) | 206 | set_source_files_properties (${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) |
207 | if (MSYS OR (APPLE AND NOT MOBILE) OR (UNIX AND NOT MOBILE)) | ||
208 | add_definitions (-DiPlatformPcDesktop=1) | ||
209 | endif () | ||
210 | if (MOBILE) | ||
211 | add_definitions (-DiPlatformMobile=1) | ||
212 | else () | ||
213 | add_definitions (-DiPlatformDesktop=1) | ||
214 | endif () | ||
202 | 215 | ||
203 | # Target. | 216 | # Target. |
204 | add_executable (app ${SOURCES} ${RESOURCES}) | 217 | add_executable (app ${SOURCES} ${RESOURCES}) |
diff --git a/src/ui/window.c b/src/ui/window.c index cbcca902..bfa95f90 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -152,6 +152,8 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { | |||
152 | return iFalse; | 152 | return iFalse; |
153 | } | 153 | } |
154 | 154 | ||
155 | /* TODO: Define menus per platform. */ | ||
156 | |||
155 | #if defined (iPlatformAppleDesktop) | 157 | #if defined (iPlatformAppleDesktop) |
156 | # define iHaveNativeMenus | 158 | # define iHaveNativeMenus |
157 | #endif | 159 | #endif |