From e4bd3f07716f523a53de1840da19417a08c0c1f1 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 19 Jan 2012 23:27:43 -0600 Subject: [PATCH] Clean up tdelfeditor warnings in CMake builds --- modules/TDEMacros.cmake | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index ce63deb..075b7eb 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -873,14 +873,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}\" \"${_notes}\"" ) separate_arguments( ELF_EMBEDDING_METADATA ) - add_custom_command( - TARGET ${_target} - POST_BUILD - COMMAND ./tdelfeditor -m ${CMAKE_CURRENT_BINARY_DIR}/${_target} ${ELF_EMBEDDING_METADATA} || true - COMMAND ./tdelfeditor -e ${CMAKE_CURRENT_BINARY_DIR}/${_target} || true - COMMAND ./tdelfeditor -t ${CMAKE_CURRENT_BINARY_DIR}/${_target} ${_target} || true - WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin - ) + if( EXISTS ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor ) + 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 + ) + endif( EXISTS ${CMAKE_INSTALL_PREFIX}/bin/tdelfeditor ) endmacro( tde_add_executable )