|
@@ -181,10 +181,7 @@ endif ()
|
|
|
# \todo This is a deprecated property in CMake version 2.8.12 - Remove below macros when CMake minimum version is 2.8.12
|
|
# \todo This is a deprecated property in CMake version 2.8.12 - Remove below macros when CMake minimum version is 2.8.12
|
|
|
set_target_properties (${TARGET_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
|
set_target_properties (${TARGET_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
|
|
if (URHO3D_LIB_TYPE STREQUAL SHARED)
|
|
if (URHO3D_LIB_TYPE STREQUAL SHARED)
|
|
|
- if (CMAKE_MAJOR_VERSION STREQUAL 2 AND CMAKE_MINOR_VERSION STREQUAL 8)
|
|
|
|
|
- string (COMPARE GREATER ${CMAKE_PATCH_VERSION} 11 OLD_CMAKE)
|
|
|
|
|
- endif ()
|
|
|
|
|
- if (OLD_CMAKE)
|
|
|
|
|
|
|
+ if (CMAKE_VERSION VERSION_LESS 2.8.11)
|
|
|
get_target_property (LINK_LIBRARIES ${TARGET_NAME} LINK_LIBRARIES)
|
|
get_target_property (LINK_LIBRARIES ${TARGET_NAME} LINK_LIBRARIES)
|
|
|
target_link_libraries (${TARGET_NAME} LINK_PRIVATE ${LINK_LIBRARIES})
|
|
target_link_libraries (${TARGET_NAME} LINK_PRIVATE ${LINK_LIBRARIES})
|
|
|
endif ()
|
|
endif ()
|
|
@@ -231,7 +228,7 @@ if (URHO3D_LIB_TYPE STREQUAL SHARED)
|
|
|
add_compiler_export_flags ()
|
|
add_compiler_export_flags ()
|
|
|
# Use PIC on platforms that support it (shared library type has this property set to true by default, so we only have to deal with those static ones that the shared library links against)
|
|
# Use PIC on platforms that support it (shared library type has this property set to true by default, so we only have to deal with those static ones that the shared library links against)
|
|
|
set_target_properties (${STATIC_LIBRARY_TARGETS} PROPERTIES POSITION_INDEPENDENT_CODE true)
|
|
set_target_properties (${STATIC_LIBRARY_TARGETS} PROPERTIES POSITION_INDEPENDENT_CODE true)
|
|
|
- if (OLD_CMAKE) # \todo Remove this when CMake minimum version is 2.8.9
|
|
|
|
|
|
|
+ if (CMAKE_VERSION VERSION_LESS 2.8.9) # \todo Remove this when CMake minimum version is 2.8.9
|
|
|
set_property (TARGET ${STATIC_LIBRARY_TARGETS} APPEND PROPERTY COMPILE_FLAGS -fPIC)
|
|
set_property (TARGET ${STATIC_LIBRARY_TARGETS} APPEND PROPERTY COMPILE_FLAGS -fPIC)
|
|
|
endif ()
|
|
endif ()
|
|
|
endif ()
|
|
endif ()
|