Skip to content

Commit

Permalink
Only set CMAKE_OSX_SYSROOT if it is currently set to MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
brackeen committed Jan 22, 2019
1 parent b9ae771 commit f45b8c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "Android")
set_source_files_properties(${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c PROPERTIES COMPILE_FLAGS "-DNDEBUG")
else() # Assume iOS
set(IOS TRUE)
if (${CMAKE_OSX_SYSROOT} MATCHES "(MacOS)+")
set(CMAKE_OSX_SYSROOT "iphoneos")
endif()

set(GLFM_SRC src/glfm_platform.h src/glfm_platform_ios.m)
set(CMAKE_OSX_SYSROOT "iphoneos")
set(GLFM_COMPILE_FLAGS "-Wno-objc-interface-ivars -Wno-objc-missing-property-synthesis -Wno-direct-ivar-access")
endif()

Expand Down

0 comments on commit f45b8c1

Please sign in to comment.