|
|
@ -21,8 +21,8 @@
|
|
|
|
##### initialization...
|
|
|
|
##### initialization...
|
|
|
|
|
|
|
|
|
|
|
|
if( NOT TDE_CMAKE_ROOT )
|
|
|
|
if( NOT TDE_CMAKE_ROOT )
|
|
|
|
if( "${CMAKE_VERSION}" VERSION_LESS "3.1" )
|
|
|
|
if( "${CMAKE_VERSION}" VERSION_LESS "3.5" )
|
|
|
|
message( FATAL_ERROR "CMake >= 3.1.0 required" )
|
|
|
|
message( FATAL_ERROR "CMake >= 3.5.0 required" )
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if( ${CMAKE_CURRENT_LIST_DIR} STREQUAL ${CMAKE_ROOT}/Modules )
|
|
|
|
if( ${CMAKE_CURRENT_LIST_DIR} STREQUAL ${CMAKE_ROOT}/Modules )
|
|
|
@ -1131,11 +1131,7 @@ macro( tde_add_library _arg_target )
|
|
|
|
|
|
|
|
|
|
|
|
# set -fPIC flag for static libraries
|
|
|
|
# set -fPIC flag for static libraries
|
|
|
|
if( _static_pic )
|
|
|
|
if( _static_pic )
|
|
|
|
if( "${CMAKE_VERSION}" VERSION_LESS "2.8.9" )
|
|
|
|
|
|
|
|
set_target_properties( ${_target} PROPERTIES COMPILE_FLAGS -fPIC )
|
|
|
|
|
|
|
|
else( )
|
|
|
|
|
|
|
|
set_target_properties( ${_target} PROPERTIES POSITION_INDEPENDENT_CODE ON )
|
|
|
|
set_target_properties( ${_target} PROPERTIES POSITION_INDEPENDENT_CODE ON )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
endif( _static_pic )
|
|
|
|
endif( _static_pic )
|
|
|
|
|
|
|
|
|
|
|
|
# set version
|
|
|
|
# set version
|
|
|
@ -1176,23 +1172,16 @@ macro( tde_add_library _arg_target )
|
|
|
|
|
|
|
|
|
|
|
|
# set private linked libraries
|
|
|
|
# set private linked libraries
|
|
|
|
if( _link_private )
|
|
|
|
if( _link_private )
|
|
|
|
if( NOT ${CMAKE_VERSION} VERSION_LESS "2.8.12" )
|
|
|
|
|
|
|
|
if( _link )
|
|
|
|
if( _link )
|
|
|
|
list( INSERT _link 0 "PUBLIC" )
|
|
|
|
list( INSERT _link 0 "PUBLIC" )
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
list( INSERT _link_private 0 "PRIVATE" )
|
|
|
|
list( INSERT _link_private 0 "PRIVATE" )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
list( INSERT _link 0 ${_link_private} )
|
|
|
|
list( INSERT _link 0 ${_link_private} )
|
|
|
|
endif( _link_private )
|
|
|
|
endif( _link_private )
|
|
|
|
|
|
|
|
|
|
|
|
# set link libraries
|
|
|
|
# set link libraries
|
|
|
|
if( _link )
|
|
|
|
if( _link )
|
|
|
|
if( _embed AND ${CMAKE_VERSION} VERSION_EQUAL "2.8.12.0" )
|
|
|
|
|
|
|
|
# hack for broken CMake 2.8.12.0
|
|
|
|
|
|
|
|
set_target_properties( ${_target} PROPERTIES LINK_LIBRARIES "${_link}" )
|
|
|
|
|
|
|
|
else( _embed AND ${CMAKE_VERSION} VERSION_EQUAL "2.8.12.0" )
|
|
|
|
|
|
|
|
target_link_libraries( ${_target} ${_link} )
|
|
|
|
target_link_libraries( ${_target} ${_link} )
|
|
|
|
endif( _embed AND ${CMAKE_VERSION} VERSION_EQUAL "2.8.12.0" )
|
|
|
|
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
if( _shared_libs )
|
|
|
|
if( _shared_libs )
|
|
|
|
string( TOUPPER "${CMAKE_BUILD_TYPE}" _build_type )
|
|
|
|
string( TOUPPER "${CMAKE_BUILD_TYPE}" _build_type )
|
|
|
|