package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.2 KiB
64 lines
2.2 KiB
3 years ago
|
diff --git a/OgreMain/src/OgrePlatformInformation.cpp b/OgreMain/src/OgrePlatformInformation.cpp
|
||
|
--- a/OgreMain/src/OgrePlatformInformation.cpp
|
||
|
+++ b/OgreMain/src/OgrePlatformInformation.cpp
|
||
|
@@ -40,29 +40,18 @@ THE SOFTWARE.
|
||
|
#elif (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && OGRE_PLATFORM != OGRE_PLATFORM_NACL
|
||
|
#include <signal.h>
|
||
|
#include <setjmp.h>
|
||
|
-#if OGRE_PLATFORM != OGRE_PLATFORM_WIN32
|
||
|
- #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
|
||
|
- #include <linux/sysctl.h>
|
||
|
- #endif
|
||
|
#endif
|
||
|
|
||
|
- #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
|
||
|
- #include <cpu-features.h>
|
||
|
- #elif OGRE_CPU == OGRE_CPU_ARM
|
||
|
- #if __MACH__
|
||
|
- #include <mach/machine.h>
|
||
|
- #ifndef CPU_SUBTYPE_ARM64_V8
|
||
|
- #define CPU_SUBTYPE_ARM64_V8 ((cpu_subtype_t) 1)
|
||
|
- #endif
|
||
|
- #ifndef CPU_SUBTYPE_ARM_V8
|
||
|
- #define CPU_SUBTYPE_ARM_V8 ((cpu_subtype_t) 13)
|
||
|
- #endif
|
||
|
- #endif
|
||
|
- #endif
|
||
|
+#if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
|
||
|
+ #include <linux/sysctl.h>
|
||
|
+ #include <cpu-features.h>
|
||
|
+#endif
|
||
|
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
|
||
|
+ #include <sys/sysctl.h>
|
||
|
+ #include <mach/machine.h>
|
||
|
#endif
|
||
|
-
|
||
|
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WINRT
|
||
|
- #include "windows.h"
|
||
|
+ #include <windows.h>
|
||
|
#endif
|
||
|
|
||
|
// Yes, I know, this file looks very ugly, but there aren't other ways to do it better.
|
||
|
diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt
|
||
|
--- a/OgreMain/CMakeLists.txt
|
||
|
+++ b/OgreMain/CMakeLists.txt
|
||
|
@@ -419,11 +419,13 @@ else()
|
||
|
set_target_properties(OgreMain PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
|
||
|
endif()
|
||
|
|
||
|
-if(OGRE_GCC_VERSION VERSION_EQUAL 4.8 OR OGRE_GCC_VERSION VERSION_GREATER 4.8)
|
||
|
- if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||
|
- list(APPEND LIBRARIES "-latomic_ops")
|
||
|
- else()
|
||
|
- list(APPEND LIBRARIES "-latomic")
|
||
|
+if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||
|
+ if(OGRE_GCC_VERSION VERSION_EQUAL 4.8 OR OGRE_GCC_VERSION VERSION_GREATER 4.8)
|
||
|
+ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||
|
+ list(APPEND LIBRARIES "-latomic_ops")
|
||
|
+ else()
|
||
|
+ list(APPEND LIBRARIES "-latomic")
|
||
|
+ endif()
|
||
|
endif()
|
||
|
endif()
|
||
|
|