summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-17 01:56:11 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-17 01:56:11 +0100
commit416e4baaa96058a323968657ee51d5eb0ff0c5c6 (patch)
tree6fdb6e5ebe25e4874c6b9eefdd445fd885649030
parent8ce1dddbac9f8c5d113f710d9c52f65e484934df (diff)
downloadcmake-416e4baaa96058a323968657ee51d5eb0ff0c5c6.zip
cmake-416e4baaa96058a323968657ee51d5eb0ff0c5c6.tar.gz
Find tdelfeditor executable on the system paths
instead of on the current installation path Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--modules/FindTDE.cmake1
-rw-r--r--modules/TDEMacros.cmake22
2 files changed, 12 insertions, 11 deletions
diff --git a/modules/FindTDE.cmake b/modules/FindTDE.cmake
index 342cd5c..4d59b56 100644
--- a/modules/FindTDE.cmake
+++ b/modules/FindTDE.cmake
@@ -79,6 +79,7 @@ if( NOT TDE_FOUND )
__internal_find_program( meinproc KDE3_MEINPROC_EXECUTABLE )
__internal_find_program( tdeconfig_compiler KDE3_KCFGC_EXECUTABLE )
__internal_find_program( maketdewidgets KDE3_MAKETDEWIDGETS_EXECUTABLE )
+ __internal_find_program( tdelfeditor TDELFEDITOR_EXECUTABLE )
# dcopidlng is a bash script which using tde-config;
# if PATH to tde-config is not set, dcopidlng will fail;
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 660232c..b362dd1 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -835,23 +835,23 @@ macro( tde_add_library _arg_target )
# embed name and metadata
set( ELF_EMBEDDING_METADATA "\"${_target}\" \"${_description}\" \"${_license}\" \"${_copyright}\" \"${_authors}\" \"${_product}\" \"${_organization}\" \"${_version}\" \"${_datetime}\" \"x-sharedlib\" \"${TDE_SCM_MODULE_NAME}\" \"${TDE_SCM_MODULE_REVISION}\" \"${_notes}\"" )
separate_arguments( ELF_EMBEDDING_METADATA )
- if( EXISTS ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor AND _soname )
+ if( TDELFEDITOR_EXECUTABLE AND _soname )
if( _version )
add_custom_command(
TARGET ${_target}
POST_BUILD
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor -m ${CMAKE_CURRENT_BINARY_DIR}/${_soname}.${_version} ${ELF_EMBEDDING_METADATA} || true
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor -e ${CMAKE_CURRENT_BINARY_DIR}/${_soname}.${_version} || true
+ COMMAND ${TDELFEDITOR_EXECUTABLE} -m ${CMAKE_CURRENT_BINARY_DIR}/${_soname}.${_version} ${ELF_EMBEDDING_METADATA} || true
+ COMMAND ${TDELFEDITOR_EXECUTABLE} -e ${CMAKE_CURRENT_BINARY_DIR}/${_soname}.${_version} || true
)
else( )
add_custom_command(
TARGET ${_target}
POST_BUILD
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor -m ${CMAKE_CURRENT_BINARY_DIR}/${_soname} ${ELF_EMBEDDING_METADATA} || true
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor -e ${CMAKE_CURRENT_BINARY_DIR}/${_soname} || true
+ COMMAND ${TDELFEDITOR_EXECUTABLE} -m ${CMAKE_CURRENT_BINARY_DIR}/${_soname} ${ELF_EMBEDDING_METADATA} || true
+ COMMAND ${TDELFEDITOR_EXECUTABLE} -e ${CMAKE_CURRENT_BINARY_DIR}/${_soname} || true
)
endif( )
- endif( EXISTS ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor AND _soname )
+ endif( TDELFEDITOR_EXECUTABLE AND _soname )
endmacro( tde_add_library )
@@ -1047,15 +1047,15 @@ macro( tde_add_executable _arg_target )
# embed icon, name, and metadata
set( ELF_EMBEDDING_METADATA "\"${_target}\" \"${_description}\" \"${_license}\" \"${_copyright}\" \"${_authors}\" \"${_product}\" \"${_organization}\" \"${_version}\" \"${_datetime}\" \"${_target}\" \"${TDE_SCM_MODULE_NAME}\" \"${TDE_SCM_MODULE_REVISION}\" \"${_notes}\"" )
separate_arguments( ELF_EMBEDDING_METADATA )
- if( EXISTS ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor )
+ if( TDELFEDITOR_EXECUTABLE )
add_custom_command(
TARGET ${_target}
POST_BUILD
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor -m ${CMAKE_CURRENT_BINARY_DIR}/${_target} ${ELF_EMBEDDING_METADATA} || true
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor -e ${CMAKE_CURRENT_BINARY_DIR}/${_target} || true
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor -t ${CMAKE_CURRENT_BINARY_DIR}/${_target} ${_target} || true
+ COMMAND ${TDELFEDITOR_EXECUTABLE} -m ${CMAKE_CURRENT_BINARY_DIR}/${_target} ${ELF_EMBEDDING_METADATA} || true
+ COMMAND ${TDELFEDITOR_EXECUTABLE} -e ${CMAKE_CURRENT_BINARY_DIR}/${_target} || true
+ COMMAND ${TDELFEDITOR_EXECUTABLE} -t ${CMAKE_CURRENT_BINARY_DIR}/${_target} ${_target} || true
)
- endif( EXISTS ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor )
+ endif( TDELFEDITOR_EXECUTABLE )
endmacro( tde_add_executable )