@ -356,6 +356,7 @@ macro( tde_add_library _arg_target )
unset ( _static_pic )
unset ( _automoc )
unset ( _no_libtool_file )
unset ( _no_export )
unset ( _version )
unset ( _sources )
unset ( _destination )
@ -397,6 +398,12 @@ macro( tde_add_library _arg_target )
set ( _no_libtool_file 1 )
endif ( "${_arg}" STREQUAL "NO_LIBTOOL_FILE" )
# f o u n d d i r e c t i v e " N O _ E X P O R T "
if ( "${_arg}" STREQUAL "NO_EXPORT" )
set ( _skip_store 1 )
set ( _no_export 1 )
endif ( "${_arg}" STREQUAL "NO_EXPORT" )
# f o u n d d i r e c t i v e " V E R S I O N "
if ( "${_arg}" STREQUAL "VERSION" )
set ( _skip_store 1 )
@ -500,8 +507,17 @@ macro( tde_add_library _arg_target )
set_target_properties ( ${ _target } PROPERTIES VERSION ${ _version } SOVERSION ${ _soversion } )
endif ( _version )
# s e t i n t e r f a c e l i b r a r i e s
target_link_libraries ( ${ _target } LINK_INTERFACE_LIBRARIES ${ _link } )
# s e t i n t e r f a c e libraries ( only for shared )
unset ( _shared_libs )
foreach ( _lib ${ _link } )
# get_target_property ( _lib_type ${ _lib } TYPE )
# if ( NOT "STATIC_LIBRARY" STREQUAL "${_lib_type}" )
if ( NOT ${ _lib } MATCHES ".+-static" )
list ( APPEND _shared_libs ${ _lib } )
endif ( NOT ${ _lib } MATCHES ".+-static" )
# endif ( NOT "STATIC_LIBRARY" STREQUAL "${_lib_type}" )
endforeach ( _lib )
target_link_libraries ( ${ _target } LINK_INTERFACE_LIBRARIES ${ _shared_libs } )
# s e t e m b e d d e d a r c h i v e s
if ( _embed )
@ -520,7 +536,13 @@ macro( tde_add_library _arg_target )
# s e t d e s t i n a t i o n d i r e c t o r y
if ( _destination )
if ( "SHARED" STREQUAL ${ _type } AND NOT _no_export )
# w e e x p o r t o n l y s h a r e d libs ( no static, no modules )
# a l s o , d o n o t e x p o r t t a r g e t m a r k e d a s " N O _ E X P O R T " ( u s u a l l y f o r k d e i n i t )
install ( TARGETS ${ _target } DESTINATION ${ _destination } EXPORT ${ CMAKE_PROJECT_NAME } )
else ( "SHARED" STREQUAL ${ _type } AND NOT _no_export )
install ( TARGETS ${ _target } DESTINATION ${ _destination } )
endif ( "SHARED" STREQUAL ${ _type } AND NOT _no_export )
if ( NOT "STATIC" STREQUAL ${ _type } AND NOT _no_libtool_file )
tde_install_libtool_file ( ${ _target } ${ _destination } )
endif ( NOT "STATIC" STREQUAL ${ _type } AND NOT _no_libtool_file )
@ -710,7 +732,7 @@ macro( tde_add_kdeinit_executable _target )
endif ( NOT _plugin_destination )
# c r e a t e t h e l i b r a r y
tde_add_library ( kdeinit_ ${ _target } ${ _sources } SHARED
tde_add_library ( kdeinit_ ${ _target } ${ _sources } SHARED NO_EXPORT
D E S T I N A T I O N $ { _ l i b r a r y _ d e s t i n a t i o n }
)
@ -744,15 +766,12 @@ macro( tde_install_symlink _target _link )
set ( _destination "${CMAKE_INSTALL_PREFIX}/${_link}" )
endif ( IS_ABSOLUTE "${_link}" )
# p r e f i x w i t h D E S T D I R
set ( _destination "$ENV{DESTDIR}${_destination}" )
get_filename_component ( _path "${_destination}" PATH )
if ( NOT IS_DIRECTORY " ${_path}" )
install ( CODE "file( MAKE_DIRECTORY \" ${ _path } \" ) " )
endif ( NOT IS_DIRECTORY " ${_path}" )
if ( NOT IS_DIRECTORY "\$ENV{DESTDIR}${_path}" )
install ( CODE "file( MAKE_DIRECTORY \" \$ENV{DESTDIR}${_path}\" ) " )
endif ( NOT IS_DIRECTORY " \$ENV{DESTDIR} ${_path}" )
install ( CODE "execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${_target} ${_destination} )" )
install ( CODE "execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${_target} \$ENV{DESTDIR} ${_destination} )" )
endmacro ( tde_install_symlink )
@ -770,10 +789,7 @@ macro( tde_install_empty_directory _path )
set ( _destination "${CMAKE_INSTALL_PREFIX}/${_path}" )
endif ( IS_ABSOLUTE "${_path}" )
# p r e f i x w i t h D E S T D I R
set ( _destination "$ENV{DESTDIR}${_destination}" )
install ( CODE "file( MAKE_DIRECTORY \" ${ _destination } \" ) " )
install ( CODE "file( MAKE_DIRECTORY \" \$ENV{DESTDIR}${_destination}\" ) " )
endmacro ( tde_install_empty_directory )