|
@@ -141,10 +141,10 @@ option (URHO3D_NAVIGATION "Enable navigation support" TRUE)
|
|
|
cmake_dependent_option (URHO3D_NETWORK "Enable networking support" TRUE "NOT WEB AND EXCEPTIONS" FALSE)
|
|
cmake_dependent_option (URHO3D_NETWORK "Enable networking support" TRUE "NOT WEB AND EXCEPTIONS" FALSE)
|
|
|
option (URHO3D_PHYSICS "Enable physics support" TRUE)
|
|
option (URHO3D_PHYSICS "Enable physics support" TRUE)
|
|
|
option (URHO3D_URHO2D "Enable 2D graphics and physics support" TRUE)
|
|
option (URHO3D_URHO2D "Enable 2D graphics and physics support" TRUE)
|
|
|
-if (ARM AND NOT ANDROID AND NOT RPI AND NOT IOS AND NOT TVOS)
|
|
|
|
|
|
|
+if (ARM AND NOT ANDROID AND NOT RPI AND NOT APPLE)
|
|
|
set (ARM_ABI_FLAGS "" CACHE STRING "Specify ABI compiler flags (ARM on Linux platform only); e.g. Orange-Pi Mini 2 could use '-mcpu=cortex-a7 -mfpu=neon-vfpv4'")
|
|
set (ARM_ABI_FLAGS "" CACHE STRING "Specify ABI compiler flags (ARM on Linux platform only); e.g. Orange-Pi Mini 2 could use '-mcpu=cortex-a7 -mfpu=neon-vfpv4'")
|
|
|
endif ()
|
|
endif ()
|
|
|
-if (IOS OR TVOS OR (RPI AND "${RPI_ABI}" MATCHES NEON) OR (ARM AND (URHO3D_64BIT OR "${ARM_ABI_FLAGS}" MATCHES neon))) # Stringify in case RPI_ABI/ARM_ABI_FLAGS is not set explicitly
|
|
|
|
|
|
|
+if ((RPI AND "${RPI_ABI}" MATCHES NEON) OR (ARM AND (APPLE OR URHO3D_64BIT OR "${ARM_ABI_FLAGS}" MATCHES neon))) # Stringify in case RPI_ABI/ARM_ABI_FLAGS is not set explicitly
|
|
|
# TODO: remove this logic when the compiler flags are set in each toolchain file, such that the CheckCompilerToolchain can perform the check automatically
|
|
# TODO: remove this logic when the compiler flags are set in each toolchain file, such that the CheckCompilerToolchain can perform the check automatically
|
|
|
set (NEON 1)
|
|
set (NEON 1)
|
|
|
endif ()
|
|
endif ()
|
|
@@ -261,9 +261,9 @@ endif ()
|
|
|
cmake_dependent_option (URHO3D_MINIDUMPS "Enable minidumps on crash (VS only)" TRUE "MSVC" FALSE)
|
|
cmake_dependent_option (URHO3D_MINIDUMPS "Enable minidumps on crash (VS only)" TRUE "MSVC" FALSE)
|
|
|
# By default Windows platform setups main executable as Windows application with WinMain() as entry point
|
|
# By default Windows platform setups main executable as Windows application with WinMain() as entry point
|
|
|
cmake_dependent_option (URHO3D_WIN32_CONSOLE "Use console main() instead of WinMain() as entry point when setting up Windows executable targets (Windows platform only)" FALSE "WIN32" FALSE)
|
|
cmake_dependent_option (URHO3D_WIN32_CONSOLE "Use console main() instead of WinMain() as entry point when setting up Windows executable targets (Windows platform only)" FALSE "WIN32" FALSE)
|
|
|
-cmake_dependent_option (URHO3D_MACOSX_BUNDLE "Use MACOSX_BUNDLE when setting up macOS executable targets (Xcode/macOS platform only)" FALSE "XCODE AND NOT IOS AND NOT TVOS" FALSE)
|
|
|
|
|
-if (CMAKE_CROSSCOMPILING AND NOT ANDROID AND NOT IOS AND NOT TVOS)
|
|
|
|
|
- set (URHO3D_SCP_TO_TARGET "" CACHE STRING "Use scp to transfer executables to target system (non-Android cross-compiling build only), SSH digital key must be setup first for this to work, typical value has a pattern of usr@tgt:remote-loc")
|
|
|
|
|
|
|
+cmake_dependent_option (URHO3D_MACOSX_BUNDLE "Use MACOSX_BUNDLE when setting up macOS executable targets (Xcode/macOS platform only)" FALSE "XCODE AND NOT ARM" FALSE)
|
|
|
|
|
+if (CMAKE_CROSSCOMPILING AND NOT ANDROID AND NOT APPLE)
|
|
|
|
|
+ set (URHO3D_SCP_TO_TARGET "" CACHE STRING "Use scp to transfer executables to target system (RPI and generic ARM cross-compiling build only), SSH digital key must be setup first for this to work, typical value has a pattern of usr@tgt:remote-loc")
|
|
|
else ()
|
|
else ()
|
|
|
unset (URHO3D_SCP_TO_TARGET CACHE)
|
|
unset (URHO3D_SCP_TO_TARGET CACHE)
|
|
|
endif ()
|
|
endif ()
|
|
@@ -527,8 +527,8 @@ if (APPLE)
|
|
|
endif ()
|
|
endif ()
|
|
|
endif ()
|
|
endif ()
|
|
|
endif ()
|
|
endif ()
|
|
|
- # Common OSX and iOS/tvOS bundle setup
|
|
|
|
|
- if (IOS OR TVOS OR URHO3D_MACOSX_BUNDLE)
|
|
|
|
|
|
|
+ # Common macOS, iOS, and tvOS bundle setup
|
|
|
|
|
+ if (URHO3D_MACOSX_BUNDLE OR (APPLE AND ARM))
|
|
|
# Only set the bundle properties to its default when they are not explicitly specified by user
|
|
# Only set the bundle properties to its default when they are not explicitly specified by user
|
|
|
if (NOT MACOSX_BUNDLE_GUI_IDENTIFIER)
|
|
if (NOT MACOSX_BUNDLE_GUI_IDENTIFIER)
|
|
|
set (MACOSX_BUNDLE_GUI_IDENTIFIER com.github.urho3d.\${PRODUCT_NAME:rfc1034identifier:lower})
|
|
set (MACOSX_BUNDLE_GUI_IDENTIFIER com.github.urho3d.\${PRODUCT_NAME:rfc1034identifier:lower})
|
|
@@ -735,7 +735,7 @@ else ()
|
|
|
endif ()
|
|
endif ()
|
|
|
# LuaJIT specific - extra linker flags for linking against LuaJIT (adapted from LuaJIT's original Makefile)
|
|
# LuaJIT specific - extra linker flags for linking against LuaJIT (adapted from LuaJIT's original Makefile)
|
|
|
if (URHO3D_LUAJIT)
|
|
if (URHO3D_LUAJIT)
|
|
|
- if (URHO3D_64BIT AND APPLE AND NOT IOS AND NOT TVOS)
|
|
|
|
|
|
|
+ if (URHO3D_64BIT AND APPLE AND NOT ARM)
|
|
|
# 64-bit macOS: it simply won't work without these flags; if you are reading this comment then you may want to know the following also
|
|
# 64-bit macOS: it simply won't work without these flags; if you are reading this comment then you may want to know the following also
|
|
|
# it's recommended to rebase all (self-compiled) shared libraries which are loaded at runtime on OSX/x64 (e.g. C extension modules for Lua), see: man rebase
|
|
# it's recommended to rebase all (self-compiled) shared libraries which are loaded at runtime on OSX/x64 (e.g. C extension modules for Lua), see: man rebase
|
|
|
set (LUAJIT_EXE_LINKER_FLAGS_APPLE "-pagezero_size 10000 -image_base 100000000")
|
|
set (LUAJIT_EXE_LINKER_FLAGS_APPLE "-pagezero_size 10000 -image_base 100000000")
|
|
@@ -876,7 +876,7 @@ macro (define_dependency_libs TARGET)
|
|
|
list (APPEND LIBS dbghelp)
|
|
list (APPEND LIBS dbghelp)
|
|
|
endif ()
|
|
endif ()
|
|
|
elseif (APPLE)
|
|
elseif (APPLE)
|
|
|
- if (IOS OR TVOS)
|
|
|
|
|
|
|
+ if (ARM)
|
|
|
list (APPEND LIBS "-framework AudioToolbox" "-framework AVFoundation" "-framework CoreAudio" "-framework CoreGraphics" "-framework CoreMotion" "-framework Foundation" "-framework GameController" "-framework OpenGLES" "-framework QuartzCore" "-framework UIKit")
|
|
list (APPEND LIBS "-framework AudioToolbox" "-framework AVFoundation" "-framework CoreAudio" "-framework CoreGraphics" "-framework CoreMotion" "-framework Foundation" "-framework GameController" "-framework OpenGLES" "-framework QuartzCore" "-framework UIKit")
|
|
|
else ()
|
|
else ()
|
|
|
list (APPEND LIBS "-framework AudioToolbox" "-framework Carbon" "-framework Cocoa" "-framework CoreFoundation" "-framework SystemConfiguration" "-framework CoreAudio" "-framework CoreServices" "-framework CoreVideo" "-framework ForceFeedback" "-framework IOKit" "-framework OpenGL")
|
|
list (APPEND LIBS "-framework AudioToolbox" "-framework Carbon" "-framework Cocoa" "-framework CoreFoundation" "-framework SystemConfiguration" "-framework CoreAudio" "-framework CoreServices" "-framework CoreVideo" "-framework ForceFeedback" "-framework IOKit" "-framework OpenGL")
|
|
@@ -1053,7 +1053,7 @@ macro (define_resource_dirs)
|
|
|
if (NOT RESOURCE_FILES)
|
|
if (NOT RESOURCE_FILES)
|
|
|
# Default app bundle icon
|
|
# Default app bundle icon
|
|
|
set (RESOURCE_FILES ${CMAKE_SOURCE_DIR}/bin/Data/Textures/UrhoIcon.icns)
|
|
set (RESOURCE_FILES ${CMAKE_SOURCE_DIR}/bin/Data/Textures/UrhoIcon.icns)
|
|
|
- if (IOS OR TVOS)
|
|
|
|
|
|
|
+ if (ARM)
|
|
|
# Default app icon on the iOS/tvOS home screen
|
|
# Default app icon on the iOS/tvOS home screen
|
|
|
list (APPEND RESOURCE_FILES ${CMAKE_SOURCE_DIR}/bin/Data/Textures/UrhoIcon.png)
|
|
list (APPEND RESOURCE_FILES ${CMAKE_SOURCE_DIR}/bin/Data/Textures/UrhoIcon.png)
|
|
|
endif ()
|
|
endif ()
|
|
@@ -1476,7 +1476,7 @@ macro (setup_executable)
|
|
|
list (APPEND FILES ${LOCATION}/${TARGET_NAME}.${EXT})
|
|
list (APPEND FILES ${LOCATION}/${TARGET_NAME}.${EXT})
|
|
|
endforeach ()
|
|
endforeach ()
|
|
|
install (FILES ${FILES} DESTINATION ${DEST_BUNDLE_DIR} OPTIONAL)
|
|
install (FILES ${FILES} DESTINATION ${DEST_BUNDLE_DIR} OPTIONAL)
|
|
|
- elseif (DEST_RUNTIME_DIR AND (DEST_BUNDLE_DIR OR NOT IOS OR NOT TVOS))
|
|
|
|
|
|
|
+ elseif (DEST_RUNTIME_DIR AND (DEST_BUNDLE_DIR OR NOT (IOS OR TVOS)))
|
|
|
install (TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${DEST_RUNTIME_DIR} BUNDLE DESTINATION ${DEST_BUNDLE_DIR})
|
|
install (TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${DEST_RUNTIME_DIR} BUNDLE DESTINATION ${DEST_BUNDLE_DIR})
|
|
|
if (WIN32 AND NOT ARG_NODEPS AND URHO3D_LIB_TYPE STREQUAL SHARED AND NOT URHO3D_DLL_INSTALLED)
|
|
if (WIN32 AND NOT ARG_NODEPS AND URHO3D_LIB_TYPE STREQUAL SHARED AND NOT URHO3D_DLL_INSTALLED)
|
|
|
if (TARGET Urho3D)
|
|
if (TARGET Urho3D)
|