summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/TDEMacros.cmake18
1 files changed, 16 insertions, 2 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index a6f52df..0a0b784 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -939,8 +939,22 @@ macro( tde_add_library _arg_target )
get_target_property( _soversion ${_target} SOVERSION )
set( _soname "${_soname}.${_soversion}" )
endif( )
- add_custom_command( TARGET ${_target} POST_BUILD
- COMMAND ln -s ${_soname} "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}" )
+ if( NOT _exclude_from_all )
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}"
+ COMMAND ln -s ${_soname} "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}"
+ DEPENDS ${_target}
+ )
+ add_custom_target(
+ ${_target}+base-so ALL
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}"
+ )
+ else( )
+ add_custom_command(
+ TARGET ${_target} POST_BUILD
+ COMMAND ln -s ${_soname} "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}"
+ )
+ endif( )
install( FILES "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}" DESTINATION ${_destination} )
endif( )