|
|
@ -585,24 +585,39 @@ macro( tde_add_library _arg_target )
|
|
|
|
add_dependencies( ${_target} ${_dependencies} )
|
|
|
|
add_dependencies( ${_target} ${_dependencies} )
|
|
|
|
endif( _dependencies )
|
|
|
|
endif( _dependencies )
|
|
|
|
|
|
|
|
|
|
|
|
# set destination directory
|
|
|
|
# if destination directory is set
|
|
|
|
if( _destination )
|
|
|
|
if( _destination )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# we export only shared libs (no static, no modules);
|
|
|
|
|
|
|
|
# also, do not export targets marked as "NO_EXPORT" (usually for kdeinit)
|
|
|
|
if( "SHARED" STREQUAL ${_type} AND NOT _no_export )
|
|
|
|
if( "SHARED" STREQUAL ${_type} AND NOT _no_export )
|
|
|
|
# we export only shared libs (no static, no modules)
|
|
|
|
|
|
|
|
# also, do not export target marked as "NO_EXPORT" (usually for kdeinit)
|
|
|
|
# get target properties: output name, version, soversion
|
|
|
|
install( TARGETS ${_target} DESTINATION ${_destination} )
|
|
|
|
|
|
|
|
get_target_property( _output ${_target} LOCATION )
|
|
|
|
get_target_property( _output ${_target} LOCATION )
|
|
|
|
get_filename_component( _output ${_output} NAME )
|
|
|
|
get_filename_component( _output ${_output} NAME )
|
|
|
|
|
|
|
|
get_target_property( _version ${_target} VERSION )
|
|
|
|
|
|
|
|
get_target_property( _soversion ${_target} SOVERSION )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( _version )
|
|
|
|
set( _location "${_destination}/${_output}.${_version}" )
|
|
|
|
set( _location "${_destination}/${_output}.${_version}" )
|
|
|
|
set( _soname "${_output}.${_soversion}" )
|
|
|
|
set( _soname "${_output}.${_soversion}" )
|
|
|
|
configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_export_library.cmake "${PROJECT_BINARY_DIR}/export-${_target}.cmake" @ONLY )
|
|
|
|
|
|
|
|
else( )
|
|
|
|
else( )
|
|
|
|
install( TARGETS ${_target} DESTINATION ${_destination} )
|
|
|
|
set( _location "${_destination}/${_output}" )
|
|
|
|
|
|
|
|
set( _soname "${_output}" )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_export_library.cmake "${PROJECT_BINARY_DIR}/export-${_target}.cmake" @ONLY )
|
|
|
|
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# install target
|
|
|
|
|
|
|
|
install( TARGETS ${_target} DESTINATION ${_destination} )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# install .la files for dynamic libraries
|
|
|
|
if( NOT "STATIC" STREQUAL ${_type} AND NOT _no_libtool_file )
|
|
|
|
if( NOT "STATIC" STREQUAL ${_type} AND NOT _no_libtool_file )
|
|
|
|
tde_install_libtool_file( ${_target} ${_destination} )
|
|
|
|
tde_install_libtool_file( ${_target} ${_destination} )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
endif( _destination )
|
|
|
|
|
|
|
|
|
|
|
|
endmacro( tde_add_library )
|
|
|
|
endmacro( tde_add_library )
|
|
|
|
|
|
|
|
|
|
|
|