|
|
@@ -112,6 +112,7 @@ if (IOS OR (RPI AND "${RPI_ABI}" MATCHES NEON)) # Stringify in case RPI_ABI i
|
|
|
endif ()
|
|
|
cmake_dependent_option (URHO3D_NEON "Enable NEON instruction set (ARM platforms with NEON only)" TRUE "NEON" FALSE)
|
|
|
if (CMAKE_PROJECT_NAME STREQUAL Urho3D)
|
|
|
+ set (URHO3D_LIB_TYPE STATIC CACHE STRING "Specify Urho3D library type, possible values are STATIC (default) and SHARED")
|
|
|
cmake_dependent_option (URHO3D_LUAJIT_AMALG "Enable LuaJIT amalgamated build (LuaJIT only)" FALSE "URHO3D_LUAJIT" FALSE)
|
|
|
cmake_dependent_option (URHO3D_SAFE_LUA "Enable Lua C++ wrapper safety checks (Lua/LuaJIT only)" FALSE "URHO3D_LUA OR URHO3D_LUAJIT" FALSE)
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL Release OR CMAKE_CONFIGURATION_TYPES)
|
|
|
@@ -138,6 +139,7 @@ if (CMAKE_PROJECT_NAME STREQUAL Urho3D)
|
|
|
cmake_dependent_option (URHO3D_USE_LIB_DEB "Enable 64-bit DEB CPack generator using /usr/lib and disable all other generators (Redhat-based host only)" FALSE "URHO3D_64BIT AND HAS_LIB64" FALSE)
|
|
|
endif ()
|
|
|
else ()
|
|
|
+ set (URHO3D_LIB_TYPE "" CACHE STRING "Specify Urho3D library type, possible values are STATIC and SHARED")
|
|
|
set (URHO3D_HOME "" CACHE PATH "Path to Urho3D build tree or SDK installation location (external project only)")
|
|
|
if (URHO3D_PCH OR URHO3D_UPDATE_SOURCE_TREE)
|
|
|
# Just reference it to suppress "unused variable" CMake warning on external projects using this CMake module
|
|
|
@@ -206,7 +208,6 @@ endif ()
|
|
|
cmake_dependent_option (URHO3D_STATIC_RUNTIME "Use static C/C++ runtime libraries and eliminate the need for runtime DLLs installation (VS only)" FALSE "MSVC" FALSE)
|
|
|
cmake_dependent_option (URHO3D_WIN32_CONSOLE "Use console main() 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 Mac OS X executable targets (Xcode native build only)" FALSE "XCODE AND NOT IOS" FALSE)
|
|
|
-set (URHO3D_LIB_TYPE STATIC CACHE STRING "Specify Urho3D library type, possible values are STATIC (default) and SHARED")
|
|
|
if (CMAKE_CROSSCOMPILING AND NOT ANDROID)
|
|
|
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")
|
|
|
else ()
|
|
|
@@ -395,7 +396,7 @@ endif ()
|
|
|
if (URHO3D_LIB_TYPE)
|
|
|
string (TOUPPER ${URHO3D_LIB_TYPE} URHO3D_LIB_TYPE)
|
|
|
endif ()
|
|
|
-if (NOT URHO3D_LIB_TYPE STREQUAL SHARED)
|
|
|
+if (NOT URHO3D_LIB_TYPE STREQUAL "" AND NOT URHO3D_LIB_TYPE STREQUAL SHARED)
|
|
|
set (URHO3D_LIB_TYPE STATIC)
|
|
|
if (NOT MSVC) # This define will be baked into the export header for MSVC compiler
|
|
|
add_definitions (-DURHO3D_STATIC_DEFINE)
|