summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-07 23:24:52 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-07 23:24:52 +0000
commit59fd2d7347d815910b0c57eb12453ad289a3955a (patch)
tree451ea3030a02187444f390c0e30c60f9d400ad55
parentce35309a6c534af739bddab824ee02804fd0cc2a (diff)
downloadother-59fd2d7347d815910b0c57eb12453ad289a3955a.tar.gz
other-59fd2d7347d815910b0c57eb12453ad289a3955a.zip
[kde-common/cmake] added META_INCLUDES directive
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common@1224106 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--cmake/modules/TDEMacros.cmake32
1 files changed, 30 insertions, 2 deletions
diff --git a/cmake/modules/TDEMacros.cmake b/cmake/modules/TDEMacros.cmake
index 46d3824..a37c706 100644
--- a/cmake/modules/TDEMacros.cmake
+++ b/cmake/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 )