summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt13
-rw-r--r--src/ui/window.c2
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)
179if (ANDROID)
180 set (MOBILE 1)
181 add_definitions (-DiPlatformAndroidMobile=1)
182endif ()
179if (IOS) 183if (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)
200endif () 205endif ()
201set_source_files_properties (${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) 206set_source_files_properties (${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
207if (MSYS OR (APPLE AND NOT MOBILE) OR (UNIX AND NOT MOBILE))
208 add_definitions (-DiPlatformPcDesktop=1)
209endif ()
210if (MOBILE)
211 add_definitions (-DiPlatformMobile=1)
212else ()
213 add_definitions (-DiPlatformDesktop=1)
214endif ()
202 215
203# Target. 216# Target.
204add_executable (app ${SOURCES} ${RESOURCES}) 217add_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