Răsfoiți Sursa

Apple - Exclude CoreMotion when targeting tvOS.
Reconfigure Apple build to not using the 'no_weak_imports' linker flags.
This means the new build artifacts may not run correctly on old macOS/iOS/tvOS.
It is up to the devs to handle the weak symbols during runtime in their own apps if they needs to be run on old systems.

Yao Wei Tjong 姚伟忠 5 ani în urmă
părinte
comite
43d7a38a9c
2 a modificat fișierele cu 5 adăugiri și 3 ștergeri
  1. 4 3
      CMake/Modules/UrhoCommon.cmake
  2. 1 0
      Docs/Urho3D.dox

+ 4 - 3
CMake/Modules/UrhoCommon.cmake

@@ -126,8 +126,6 @@ include (CheckCompilerToolchain)
 if (RPI AND NOT RPI_ABI STREQUAL RPI4)
     # Extra linker flags for legacy Raspbian because it installs VideoCore libraries in the "/opt/vc/lib" directory (no harm in doing so for other distros)
     set (INDIRECT_DEPS_EXE_LINKER_FLAGS "${INDIRECT_DEPS_EXE_LINKER_FLAGS} -Wl,-rpath-link,\"${CMAKE_SYSROOT}/opt/vc/lib\"")      # CMAKE_SYSROOT is empty when not cross-compiling
-elseif (APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0.0)
-    set (INDIRECT_DEPS_EXE_LINKER_FLAGS "${INDIRECT_DEPS_EXE_LINKER_FLAGS} -Wl,-no_weak_imports")
 endif ()
 if (ARM AND CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_CROSSCOMPILING AND CMAKE_LIBRARY_ARCHITECTURE)
     # Check if the "cross" linker has already the library search path patched, see '129_multiarch_libpath.patch'
@@ -914,7 +912,10 @@ macro (define_dependency_libs TARGET)
             endif ()
         elseif (APPLE)
             if (ARM)
-                list (APPEND LIBS "-framework AudioToolbox" "-framework AVFoundation" "-framework CoreAudio" "-framework CoreBluetooth" "-framework CoreGraphics" "-framework CoreMotion" "-framework Foundation" "-framework GameController" "-framework OpenGLES" "-framework QuartzCore" "-framework UIKit")
+                list (APPEND LIBS "-framework AudioToolbox" "-framework AVFoundation" "-framework CoreAudio" "-framework CoreBluetooth" "-framework CoreGraphics" "-framework Foundation" "-framework GameController" "-framework OpenGLES" "-framework QuartzCore" "-framework UIKit")
+                if (NOT TVOS)
+                    list (APPEND LIBS "-framework CoreMotion")
+                endif ()
             else ()
                 list (APPEND LIBS "-framework AudioToolbox" "-framework Carbon" "-framework Cocoa" "-framework CoreFoundation" "-framework SystemConfiguration" "-framework CoreAudio" "-framework CoreBluetooth" "-framework CoreServices" "-framework CoreVideo" "-framework ForceFeedback" "-framework IOKit" "-framework OpenGL")
             endif ()

+ 1 - 0
Docs/Urho3D.dox

@@ -1405,6 +1405,7 @@ From 1.7 to master:
 - Build system - the 'WIN32' build option for 'cmake_generic.sh' is renamed to 'MINGW' to be consistent with 'cmake_generic.bat'.
 - Build system - CMake version 3.10.2 is now minimum version required for building Urho3D library on any host systems, except when targeting Android where version 3.17.3 is required.
 - Build system - RPI_ABI build option values are simplified to 'RPI0', 'RPI1', 'RPI2', 'RPI3', and 'RPI4'. Added 64-bit build support on RPI 4.
+- Build system: Reconfigure Apple build to not using the 'no_weak_imports' linker flags. This means the new build artifacts may not run correctly on old macOS/iOS/tvOS.  It is up to the devs to handle the weak symbols during runtime in their own apps if they needs to be run on old systems.
 
 */