mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-22 01:02:15 +09:00
[Fix]: build on macOS
This commit is contained in:
1 parent
a0aaba3cb5
commit
da5b9686ba
2 files changed
+11
-9
No files matched your search
+3
-1
@@ -11,11 +11,13 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug" OR MOBILEGL_FORCE_RELEASE_OPT)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT MATCHES "AppleClang")
|
||||
add_compile_options(-O3 -ffunction-sections -fdata-sections)
|
||||
add_link_options(-Wl,--gc-sections)
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
add_compile_options(/O2 /GL)
|
||||
else ()
|
||||
add_compile_options(-O3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in new issue
Block a user