Patch for kdebase to build khotkeys when srcdir != builddir

Alexander Neundorf neundorf at kde.org
Tue Mar 21 19:38:50 GMT 2006


On Tuesday 21 March 2006 18:51, Tim Beaulen wrote:
> Not sure if it's correct though.
>
> kde4dev at localhost ~/kde/src/kdebase/khotkeys/kcontrol $ svn diff
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt      (revision 521139)
> +++ CMakeLists.txt      (working copy)
> @@ -30,9 +30,9 @@
>        
> ${CMAKE_SOURCE_DIR}/khotkeys/kcontrol/ui/gestures_settings_tab_ui.ui
> ${CMAKE_SOURCE_DIR}/khotkeys/kcontrol/ui/general_settings_tab_ui.ui )
>
> -qt4_generate_moc(actions_listview.h actions_listview.moc.cpp)
> +qt4_generate_moc(${CMAKE_SOURCE_DIR}/khotkeys/kcontrol/actions_listview.h
> actions_listview.moc.cpp)
>
> -set(kcm_khotkeys_PART_SRCS ${libui_SRCS} ${libshared_SRCS}
> actions_listview.moc.cpp
> +set(kcm_khotkeys_PART_SRCS ${libui_SRCS} ${libshared_SRCS}
> ${CMAKE_BINARY_DIR}/khotkeys/kcontrol/actions_listview.moc.cpp
>     menuedit.cpp
>     window_trigger_widget.cpp
>     tab_widget.cpp

Ok, I think I fixed it:
http://lists.kde.org/?l=kde-commits&m=114296964828885&w=2

qt4_generate_moc() is intended for very special situations. kde4/qt4_automoc() 
is for automoc, and qt4_wrap_cpp() is for "traditional" moc file handling:

set(MY_SRCS main.cpp mywidget.cpp mymainwindow.cpp)
qt4_wrap_cpp(MY_SRCS mywidget.h mymainwindow.h)
add_executable(blub ${MY_SRCS} )

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list