|
@@ -582,11 +582,10 @@ endmacro ()
|
|
|
# Macro for setting up dependency lib for compilation and linking of a target
|
|
# Macro for setting up dependency lib for compilation and linking of a target
|
|
|
macro (setup_target)
|
|
macro (setup_target)
|
|
|
# Include directories
|
|
# Include directories
|
|
|
- include_directories (${LIBS} ${INCLUDE_DIRS_ONLY})
|
|
|
|
|
|
|
+ include_directories (${INCLUDE_DIRS})
|
|
|
# Link libraries
|
|
# Link libraries
|
|
|
define_dependency_libs (${TARGET_NAME})
|
|
define_dependency_libs (${TARGET_NAME})
|
|
|
- string (REGEX REPLACE \\.\\./|ThirdParty/|Urho3D/|Extras/|/include|/src "" STRIP_LIBS "${LIBS};${LINK_LIBS_ONLY}")
|
|
|
|
|
- target_link_libraries (${TARGET_NAME} ${ABSOLUTE_PATH_LIBS} ${STRIP_LIBS})
|
|
|
|
|
|
|
+ target_link_libraries (${TARGET_NAME} ${ABSOLUTE_PATH_LIBS} ${LIBS})
|
|
|
|
|
|
|
|
# CMake does not support IPHONEOS_DEPLOYMENT_TARGET the same manner as it supports CMAKE_OSX_DEPLOYMENT_TARGET
|
|
# CMake does not support IPHONEOS_DEPLOYMENT_TARGET the same manner as it supports CMAKE_OSX_DEPLOYMENT_TARGET
|
|
|
# The iOS deployment target is set using the corresponding Xcode attribute as target property instead
|
|
# The iOS deployment target is set using the corresponding Xcode attribute as target property instead
|
|
@@ -772,14 +771,14 @@ macro (define_dependency_libs TARGET)
|
|
|
# ThirdParty/SDL external dependency
|
|
# ThirdParty/SDL external dependency
|
|
|
if (${TARGET} MATCHES SDL|Urho3D)
|
|
if (${TARGET} MATCHES SDL|Urho3D)
|
|
|
if (WIN32)
|
|
if (WIN32)
|
|
|
- list (APPEND LINK_LIBS_ONLY user32 gdi32 winmm imm32 ole32 oleaut32 version uuid)
|
|
|
|
|
|
|
+ list (APPEND LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid)
|
|
|
elseif (APPLE)
|
|
elseif (APPLE)
|
|
|
- list (APPEND LINK_LIBS_ONLY dl pthread)
|
|
|
|
|
|
|
+ list (APPEND LIBS dl pthread)
|
|
|
elseif (ANDROID)
|
|
elseif (ANDROID)
|
|
|
- list (APPEND LINK_LIBS_ONLY dl log android)
|
|
|
|
|
|
|
+ list (APPEND LIBS dl log android)
|
|
|
else ()
|
|
else ()
|
|
|
# Linux
|
|
# Linux
|
|
|
- list (APPEND LINK_LIBS_ONLY dl pthread rt)
|
|
|
|
|
|
|
+ list (APPEND LIBS dl pthread rt)
|
|
|
if (RPI)
|
|
if (RPI)
|
|
|
list (APPEND ABSOLUTE_PATH_LIBS ${BCM_VC_LIBRARIES})
|
|
list (APPEND ABSOLUTE_PATH_LIBS ${BCM_VC_LIBRARIES})
|
|
|
endif ()
|
|
endif ()
|
|
@@ -789,16 +788,16 @@ macro (define_dependency_libs TARGET)
|
|
|
# ThirdParty/kNet & ThirdParty/Civetweb external dependency
|
|
# ThirdParty/kNet & ThirdParty/Civetweb external dependency
|
|
|
if (${TARGET} MATCHES Civetweb|kNet|Urho3D)
|
|
if (${TARGET} MATCHES Civetweb|kNet|Urho3D)
|
|
|
if (WIN32)
|
|
if (WIN32)
|
|
|
- list (APPEND LINK_LIBS_ONLY ws2_32)
|
|
|
|
|
|
|
+ list (APPEND LIBS ws2_32)
|
|
|
elseif (NOT ANDROID)
|
|
elseif (NOT ANDROID)
|
|
|
- list (APPEND LINK_LIBS_ONLY pthread)
|
|
|
|
|
|
|
+ list (APPEND LIBS pthread)
|
|
|
endif ()
|
|
endif ()
|
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
|
|
# Urho3D/LuaJIT external dependency
|
|
# Urho3D/LuaJIT external dependency
|
|
|
if (URHO3D_LUAJIT AND ${TARGET} MATCHES LuaJIT|Urho3D)
|
|
if (URHO3D_LUAJIT AND ${TARGET} MATCHES LuaJIT|Urho3D)
|
|
|
if (NOT WIN32)
|
|
if (NOT WIN32)
|
|
|
- list (APPEND LINK_LIBS_ONLY dl m)
|
|
|
|
|
|
|
+ list (APPEND LIBS dl m)
|
|
|
endif ()
|
|
endif ()
|
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
|
@@ -806,29 +805,29 @@ macro (define_dependency_libs TARGET)
|
|
|
if (${TARGET} STREQUAL Urho3D)
|
|
if (${TARGET} STREQUAL Urho3D)
|
|
|
# Core
|
|
# Core
|
|
|
if (WIN32)
|
|
if (WIN32)
|
|
|
- list (APPEND LINK_LIBS_ONLY winmm)
|
|
|
|
|
|
|
+ list (APPEND LIBS winmm)
|
|
|
if (URHO3D_MINIDUMPS)
|
|
if (URHO3D_MINIDUMPS)
|
|
|
- list (APPEND LINK_LIBS_ONLY dbghelp)
|
|
|
|
|
|
|
+ list (APPEND LIBS dbghelp)
|
|
|
endif ()
|
|
endif ()
|
|
|
elseif (NOT ANDROID)
|
|
elseif (NOT ANDROID)
|
|
|
- list (APPEND LINK_LIBS_ONLY pthread)
|
|
|
|
|
|
|
+ list (APPEND LIBS pthread)
|
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
|
|
# Graphics
|
|
# Graphics
|
|
|
if (URHO3D_OPENGL)
|
|
if (URHO3D_OPENGL)
|
|
|
if (WIN32)
|
|
if (WIN32)
|
|
|
- list (APPEND LINK_LIBS_ONLY opengl32)
|
|
|
|
|
|
|
+ list (APPEND LIBS opengl32)
|
|
|
elseif (ANDROID)
|
|
elseif (ANDROID)
|
|
|
- list (APPEND LINK_LIBS_ONLY GLESv1_CM GLESv2)
|
|
|
|
|
|
|
+ list (APPEND LIBS GLESv1_CM GLESv2)
|
|
|
elseif (NOT APPLE AND NOT RPI)
|
|
elseif (NOT APPLE AND NOT RPI)
|
|
|
- list (APPEND LINK_LIBS_ONLY GL)
|
|
|
|
|
|
|
+ list (APPEND LIBS GL)
|
|
|
endif ()
|
|
endif ()
|
|
|
else ()
|
|
else ()
|
|
|
if (DIRECT3D_FOUND)
|
|
if (DIRECT3D_FOUND)
|
|
|
list (APPEND ABSOLUTE_PATH_LIBS ${DIRECT3D_LIBRARIES})
|
|
list (APPEND ABSOLUTE_PATH_LIBS ${DIRECT3D_LIBRARIES})
|
|
|
else ()
|
|
else ()
|
|
|
# If SDK not found, assume the libraries are found from default directories
|
|
# If SDK not found, assume the libraries are found from default directories
|
|
|
- list (APPEND LINK_LIBS_ONLY ${DIRECT3D_LIBRARIES})
|
|
|
|
|
|
|
+ list (APPEND LIBS ${DIRECT3D_LIBRARIES})
|
|
|
endif ()
|
|
endif ()
|
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|