@ -15,7 +15,6 @@
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
include ( KDE3Macros ) # w e w i l l n e e d t h i s m o d u l e f o r a w h i l e
include ( CheckCXXCompilerFlag )
@ -474,6 +473,144 @@ macro( tde_automoc )
endmacro ( tde_automoc )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # #
# # # # # t d e _ c r e a t e _ d c o p _ k i d l
macro ( tde_create_dcop_kidl _kidl _kidl_source )
get_filename_component ( _kidl_source ${ _kidl_source } ABSOLUTE )
get_filename_component ( _kidl_basename ${ _kidl_source } NAME_WE )
set ( _kidl_output ${ CMAKE_CURRENT_BINARY_DIR } / ${ _kidl_basename } .kidl )
file ( RELATIVE_PATH _kidl_target "${CMAKE_BINARY_DIR}" "${_kidl_output}" )
string ( REPLACE "/" "+" _kidl_target "${_kidl_target}" )
if ( NOT TARGET ${ _kidl_target } )
add_custom_command (
O U T P U T $ { _ k i d l _ o u t p u t }
C O M M A N D $ { K D E 3 _ D C O P I D L _ E X E C U T A B L E }
A R G S $ { _ k i d l _ s o u r c e } > $ { _ k i d l _ o u t p u t }
D E P E N D S $ { _ k i d l _ s o u r c e }
)
add_custom_target ( ${ _kidl_target } DEPENDS ${ _kidl_output } )
if ( NOT TDE_FOUND )
add_dependencies ( ${ _kidl_target } dcopidl )
endif ( )
endif ( )
set ( ${ _kidl } ${ _kidl_output } )
endmacro ( tde_create_dcop_kidl )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # #
# # # # # t d e _ a d d _ d c o p _ s k e l s
macro ( tde_add_dcop_skels _sources )
foreach ( _current_FILE ${ ARGN } )
get_filename_component ( _tmp_FILE ${ _current_FILE } ABSOLUTE )
get_filename_component ( _basename ${ _tmp_FILE } NAME_WE )
set ( _skel ${ CMAKE_CURRENT_BINARY_DIR } / ${ _basename } _skel.cpp )
file ( RELATIVE_PATH _skel_target "${CMAKE_BINARY_DIR}" "${_skel}" )
string ( REPLACE "/" "+" _skel_target "${_skel_target}" )
tde_create_dcop_kidl ( _kidl ${ _tmp_FILE } )
if ( NOT TARGET ${ _skel_target } )
add_custom_command (
O U T P U T $ { _ s k e l }
C O M M A N D $ { K D E 3 _ D C O P I D L 2 C P P _ E X E C U T A B L E }
A R G S - - c + + - s u f f i x c p p - - n o - s i g n a l s - - n o - s t u b $ { _ k i d l }
D E P E N D S $ { _ k i d l _ t a r g e t }
)
add_custom_target ( ${ _skel_target } DEPENDS ${ _skel } )
if ( NOT TDE_FOUND )
add_dependencies ( ${ _skel_target } dcopidl2cpp )
endif ( )
endif ( )
list ( APPEND ${ _sources } ${ _skel } )
endforeach ( _current_FILE )
endmacro ( tde_add_dcop_skels )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # #
# # # # # t d e _ a d d _ d c o p _ s t u b s
macro ( tde_add_dcop_stubs _sources )
foreach ( _current_FILE ${ ARGN } )
get_filename_component ( _tmp_FILE ${ _current_FILE } ABSOLUTE )
get_filename_component ( _basename ${ _tmp_FILE } NAME_WE )
set ( _stub_CPP ${ CMAKE_CURRENT_BINARY_DIR } / ${ _basename } _stub.cpp )
set ( _stub_HEADER ${ CMAKE_CURRENT_BINARY_DIR } / ${ _basename } _stub.h )
file ( RELATIVE_PATH _stub_target "${CMAKE_BINARY_DIR}" "${_stub_CPP}" )
string ( REPLACE "/" "+" _stub_target "${_stub_target}" )
tde_create_dcop_kidl ( _kidl ${ _tmp_FILE } )
if ( NOT TARGET ${ _stub_target } )
add_custom_command (
O U T P U T $ { _ s t u b _ C P P } $ { _ s t u b _ H E A D E R }
C O M M A N D $ { K D E 3 _ D C O P I D L 2 C P P _ E X E C U T A B L E }
A R G S - - c + + - s u f f i x c p p - - n o - s i g n a l s - - n o - s k e l $ { _ k i d l }
D E P E N D S $ { _ k i d l _ t a r g e t }
)
add_custom_target ( ${ _stub_target } DEPENDS ${ _stub_CPP } ${ _stub_HEADER } )
if ( NOT TDE_FOUND )
add_dependencies ( ${ _stub_target } dcopidl2cpp )
endif ( )
endif ( )
list ( APPEND ${ _sources } ${ _stub_CPP } )
endforeach ( _current_FILE )
endmacro ( tde_add_dcop_stubs )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # #
# # # # # t d e _ a d d _ k c f g _ f i l e s
macro ( tde_add_kcfg_files _sources )
foreach ( _current_FILE ${ ARGN } )
get_filename_component ( _tmp_FILE ${ _current_FILE } ABSOLUTE )
get_filename_component ( _basename ${ _tmp_FILE } NAME_WE )
file ( READ ${ _tmp_FILE } _contents )
string ( REGEX REPLACE "^(.*\n)?File=([^\n]+)\n.*$" "\\2" _kcfg_FILE "${_contents}" )
set ( _src_FILE ${ CMAKE_CURRENT_BINARY_DIR } / ${ _basename } .cpp )
set ( _header_FILE ${ CMAKE_CURRENT_BINARY_DIR } / ${ _basename } .h )
file ( RELATIVE_PATH _kcfg_target "${CMAKE_BINARY_DIR}" "${_src_FILE}" )
string ( REPLACE "/" "+" _kcfg_target "${_kcfg_target}" )
if ( NOT TARGET ${ _kcfg_target } )
add_custom_command (
O U T P U T $ { _ s r c _ F I L E } $ { _ h e a d e r _ F I L E }
C O M M A N D $ { K D E 3 _ K C F G C _ E X E C U T A B L E }
A R G S $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ k c f g _ F I L E } $ { _ t m p _ F I L E }
D E P E N D S $ { _ t m p _ F I L E } $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ k c f g _ F I L E }
)
add_custom_target ( ${ _kcfg_target } DEPENDS ${ _src_FILE } ${ _header_FILE } )
if ( NOT TDE_FOUND )
add_dependencies ( ${ _kcfg_target } tdeconfig_compiler )
endif ( )
endif ( )
list ( APPEND ${ _sources } ${ _src_FILE } )
endforeach ( _current_FILE )
endmacro ( tde_add_kcfg_files )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # #
# # # # # _ _ t d e _ i n t e r n a l _ p r o c e s s _ s o u r c e s
@ -498,15 +635,15 @@ macro( __tde_internal_process_sources _sources )
# h a n d l e . s k e l f i l e s
elseif ( ${ _ext } STREQUAL ".skel" )
kde3 _add_dcop_skels( ${ _sources } ${ _path } / ${ _name } .h )
tde _add_dcop_skels( ${ _sources } ${ _path } / ${ _name } .h )
# h a n d l e . s t u b f i l e s
elseif ( ${ _ext } STREQUAL ".stub" )
kde3 _add_dcop_stubs( ${ _sources } ${ _path } / ${ _name } .h )
tde _add_dcop_stubs( ${ _sources } ${ _path } / ${ _name } .h )
# h a n d l e . k c f g c f i l e s
elseif ( ${ _ext } STREQUAL ".kcfgc" )
kde3 _add_kcfg_files( ${ _sources } ${ _arg } )
tde _add_kcfg_files( ${ _sources } ${ _arg } )
# h a n d l e a n y o t h e r f i l e s
else ( ${ _ext } STREQUAL ".ui" )