KDE/kdelibs/cmake/modules

Alexander Neundorf neundorf at kde.org
Wed Jul 5 09:35:02 BST 2006


SVN commit 558348 by neundorf:

now we have a uninstall target in every toplevel module, so you can do "make uninstall" e.g. in build/kdelibs/

Alex

CCMAIL:kde-core-devel at kde.org



 M  +1 -1      CMakeLists.txt  
 M  +13 -2     FindKDE4Internal.cmake  
 A             kde4_cmake_uninstall.cmake.in  


--- trunk/KDE/kdelibs/cmake/modules/CMakeLists.txt #558347:558348
@@ -4,7 +4,7 @@
 
 set(module_install_dir ${DATA_INSTALL_DIR}/cmake/modules )
 
-install( FILES  kde4init_dummy.cpp.in ${cmakeFiles} DESTINATION ${module_install_dir}  )
+install( FILES  kde4init_dummy.cpp.in kde4_cmake_uninstall.cmake.in ${cmakeFiles} DESTINATION ${module_install_dir}  )
 
 # the files listed here will be removed by remove_obsoleted_cmake_files.cmake, Alex
 set(FILES_TO_REMOVE
--- trunk/KDE/kdelibs/cmake/modules/FindKDE4Internal.cmake #558347:558348
@@ -227,6 +227,8 @@
 #################################
 
 
+# get the directory of the current file, used later on in the file
+get_filename_component( kde_cmake_module_dir  ${CMAKE_CURRENT_LIST_FILE} PATH)
 
 # the following are directories where stuff will be installed to
 
@@ -314,7 +316,6 @@
 
    set(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib )
 
-   get_filename_component( kde_cmake_module_dir  ${CMAKE_CURRENT_LIST_FILE} PATH)
    # this file contains all dependencies of all libraries of kdelibs, Alex
    include(${kde_cmake_module_dir}/KDELibsDependencies.cmake)
 
@@ -643,7 +644,7 @@
 
 
 # KDE4Macros.cmake contains all the KDE specific macros
-include(KDE4Macros)
+include(${kde_cmake_module_dir}/KDE4Macros.cmake)
 
 
 # decide whether KDE4 has been found
@@ -701,3 +702,13 @@
 
 string(REGEX REPLACE ".*/lib" "" KDELIBSUFF ${LIB_INSTALL_DIR} )
 message(STATUS "KDELIBSUFF :<${KDELIBSUFF}>")
+
+
+if (NOT _kde4_uninstall_rule_created)
+   set(_kde4_uninstall_rule_created TRUE)
+
+   configure_file("${kde_cmake_module_dir}/kde4_cmake_uninstall.cmake.in" "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake" @ONLY)
+
+   add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake")
+
+endif (NOT _kde4_uninstall_rule_created)




More information about the kde-core-devel mailing list