diff options
author | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-03-07 23:24:52 +0000 |
---|---|---|
committer | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-03-07 23:24:52 +0000 |
commit | 679b5fa7513fad39b1ce377662f74e7e79cca614 (patch) | |
tree | 2d6e34c39490e1265754030742bd009a1b06d915 /modules | |
parent | b337a1ca0260577bfbcc495f69771d71e2c08253 (diff) | |
download | tde-cmake-679b5fa7513fad39b1ce377662f74e7e79cca614.tar.gz tde-cmake-679b5fa7513fad39b1ce377662f74e7e79cca614.zip |
[kde-common/cmake] added META_INCLUDES directive
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common/cmake@1224106 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'modules')
-rw-r--r-- | modules/TDEMacros.cmake | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index 46d3824..a37c706 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -264,8 +264,22 @@ macro( tde_automoc ) # create header filename get_filename_component( _src_path "${_src_file}" PATH ) - get_filename_component( _header_file "${_moc_file}" NAME_WE ) - set( _header_file "${_src_path}/${_header_file}.h" ) + get_filename_component( _src_file "${_moc_file}" NAME_WE ) + set( _header_file "${_src_path}/${_src_file}.h" ) + + # if header doesn't exists, check in META_INCLUDES + if( NOT EXISTS "${_header_file}" ) + foreach( _src_path ${_meta_includes} ) + set( _header_file "${_src_path}/${_src_file}.h" ) + if( EXISTS "${_header_file}" ) + set( _found 1 ) + break( ) + endif( ) + endforeach( ) + if( NOT _found ) + tde_message_fatal( "Source for ${_moc_file} doesn't exists." ) + endif( ) + endif( ) # moc-ing header add_custom_command( OUTPUT ${_moc_file} @@ -427,6 +441,7 @@ macro( tde_add_library _arg_target ) unset( _type ) unset( _static_pic ) unset( _automoc ) + unset( _meta_includes ) unset( _no_libtool_file ) unset( _no_export ) unset( _version ) @@ -464,6 +479,12 @@ macro( tde_add_library _arg_target ) set( _automoc 1 ) endif( "${_arg}" STREQUAL "AUTOMOC" ) + # found directive "META_INCLUDES" + if( "${_arg}" STREQUAL "META_INCLUDES" ) + set( _skip_store 1 ) + set( _storage "_meta_includes" ) + endif( ) + # found directive "NO_LIBTOOL_FILE" if( "${_arg}" STREQUAL "NO_LIBTOOL_FILE" ) set( _skip_store 1 ) @@ -660,6 +681,7 @@ macro( tde_add_executable _arg_target ) unset( _target ) unset( _automoc ) + unset( _meta_includes ) unset( _setuid ) unset( _sources ) unset( _destination ) @@ -679,6 +701,12 @@ macro( tde_add_executable _arg_target ) set( _automoc 1 ) endif( "${_arg}" STREQUAL "AUTOMOC" ) + # found directive "META_INCLUDES" + if( "${_arg}" STREQUAL "META_INCLUDES" ) + set( _skip_store 1 ) + set( _storage "_meta_includes" ) + endif( ) + # found directive "SETUID" if( "${_arg}" STREQUAL "SETUID" ) set( _skip_store 1 ) |