summaryrefslogtreecommitdiffstats
path: root/modules/TDEMacros.cmake
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-08 00:23:32 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-08 00:23:32 +0000
commit1ff73c1b478bce203f43484a0adceb42025484f4 (patch)
treec69941c3779b6bd9f9d71b6c10a7ab4addafda09 /modules/TDEMacros.cmake
parent679b5fa7513fad39b1ce377662f74e7e79cca614 (diff)
downloadtde-cmake-1ff73c1b478bce203f43484a0adceb42025484f4.tar.gz
tde-cmake-1ff73c1b478bce203f43484a0adceb42025484f4.zip
[kde-common/cmake] tde_automoc: use absolute path to source header
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common/cmake@1224110 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'modules/TDEMacros.cmake')
-rw-r--r--modules/TDEMacros.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index a37c706..3a608c0 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -263,7 +263,8 @@ macro( tde_automoc )
set( _moc_file "${CMAKE_CURRENT_BINARY_DIR}/${_moc_file}" )
# create header filename
- get_filename_component( _src_path "${_src_file}" PATH )
+ get_filename_component( _src_path "${_src_file}" ABSOLUTE )
+ get_filename_component( _src_path "${_src_path}" PATH )
get_filename_component( _src_file "${_moc_file}" NAME_WE )
set( _header_file "${_src_path}/${_src_file}.h" )
@@ -277,7 +278,8 @@ macro( tde_automoc )
endif( )
endforeach( )
if( NOT _found )
- tde_message_fatal( "Source for ${_moc_file} doesn't exists." )
+ get_filename_component( _moc_file "${_moc_file}" NAME )
+ tde_message_fatal( "AUTOMOC error: '${_moc_file}' cannot be generated.\n Reason: '${_src_file}.h' not found." )
endif( )
endif( )