KDE/kdesdk

Friedrich W. H. Kossebau kossebau at kde.org
Fri Jun 1 18:09:23 UTC 2012


SVN commit 1297780 by kossebau:

Make Okteta submodule self-contained, in prepartion of git migration

Also adds helper macro KDESDK_OPTIONAL_ADD_SUBDIRECTORY for listing all the
self-containing submodules without breaking the builds for those without a
complete checkout of the whole KDESDK module

CCMAIL:kde-sdk-devel at kde.org


 M  +37 -4     CMakeLists.txt  
 M  +18 -0     okteta/CMakeLists.txt  


--- trunk/KDE/kdesdk/CMakeLists.txt #1297779:1297780
@@ -1,3 +1,40 @@
+# SELF-CONTAINED SUBMODULES, FOR PREPARATION OF MIGRATION TO GIT
+
+# Using macro_optional_add_subdirectory(...) does not work, because that
+# needs at least "include(MacroLibrary)" before. But that would defeat the goal
+# to only include the submodules here and do nothing else.
+# So we create our own clone of macro_optional_add_subdirectory here,
+# to continue support for everybody who does not have a complete checkout of
+# the KDESDK module
+
+# clone of macro_optional_add_subdirectory(...)
+# Copyright (c) 2007, Alexander Neundorf, <neundorf at kde.org>
+MACRO (KDESDK_OPTIONAL_ADD_SUBDIRECTORY _dir )
+   GET_FILENAME_COMPONENT(_fullPath ${_dir} ABSOLUTE)
+   IF(EXISTS ${_fullPath}/CMakeLists.txt)
+      IF(DISABLE_ALL_OPTIONAL_SUBDIRECTORIES)
+         SET(_DEFAULT_OPTION_VALUE FALSE)
+      ELSE(DISABLE_ALL_OPTIONAL_SUBDIRECTORIES)
+         SET(_DEFAULT_OPTION_VALUE TRUE)
+      ENDIF(DISABLE_ALL_OPTIONAL_SUBDIRECTORIES)
+
+      IF(DISABLE_ALL_OPTIONAL_SUBDIRS  AND NOT DEFINED  BUILD_${_dir})
+         SET(_DEFAULT_OPTION_VALUE FALSE)
+      ENDIF(DISABLE_ALL_OPTIONAL_SUBDIRS  AND NOT DEFINED  BUILD_${_dir})
+
+      OPTION(BUILD_${_dir} "Build directory ${_dir}" ${_DEFAULT_OPTION_VALUE})
+      IF(BUILD_${_dir})
+         ADD_SUBDIRECTORY(${_dir})
+      ENDIF(BUILD_${_dir})
+   ENDIF(EXISTS ${_fullPath}/CMakeLists.txt)
+ENDMACRO (KDESDK_OPTIONAL_ADD_SUBDIRECTORY)
+
+# list of self-contained submodules
+kdesdk_optional_add_subdirectory(okteta)
+
+
+############################
+# START OF OLD MODULE SETUP
 cmake_minimum_required(VERSION 2.6)
 project(kdesdk)
 
@@ -33,9 +70,6 @@
 macro_optional_find_package(HUNSPELL)
 macro_log_feature(HUNSPELL_FOUND "HUNSPELL" "Library used for stemming" "http://hunspell.sourceforge.net/" FALSE "" "Required to build Lokalize.")
 
-macro_optional_find_package( QCA2 )
-macro_log_feature( QCA2_FOUND "QCA2" "Qt Cryptographic Architecture" "http://delta.affinix.com/qca" FALSE "2.0.0" "Needed for most of the algorithms of the checksum tool in Okteta." )
-
 macro_optional_find_package(LibKonq)
 macro_log_feature(LIBKONQ_FOUND "KDE-Base/LibKonq" "Provides high-level file management functions." "http://dolphin.kde.org/" FALSE "" "Required to build the Dolphin version control plugins.")
 
@@ -64,7 +98,6 @@
 macro_optional_add_subdirectory(kpartloader)
 macro_optional_add_subdirectory(strigi-analyzer)
 macro_optional_add_subdirectory(kioslave)
-macro_optional_add_subdirectory(okteta)
 
 check_c_source_compiles("
 #include <stdlib.h>
--- trunk/KDE/kdesdk/okteta/CMakeLists.txt #1297779:1297780
@@ -1,5 +1,21 @@
+cmake_minimum_required(VERSION 2.6)
+
 project( okteta )
 
+find_package(KDE4 REQUIRED)
+include(KDE4Defaults)
+include(MacroLibrary)
+
+macro_optional_find_package( QCA2 )
+macro_log_feature( QCA2_FOUND "QCA2" "Qt Cryptographic Architecture" "http://delta.affinix.com/qca" FALSE "2.0.0" "Needed for most of the algorithms of the checksum tool." )
+
+add_definitions( ${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
+include_directories(
+    ${CMAKE_SOURCE_DIR}
+    ${CMAKE_BINARY_DIR}
+    ${KDE4_INCLUDES}
+)
+
 # control build scope
 # TODO: examples and templates not internal need headers and libs as installed
 # so they can be only build after the installation was done
@@ -81,3 +97,5 @@
 if (QT_QTDECLARATIVE_FOUND AND OKTETA_MOBILE_UI)
     macro_optional_add_subdirectory(mobile)
 endif (QT_QTDECLARATIVE_FOUND AND OKTETA_MOBILE_UI)
+
+macro_display_feature_log()


More information about the kde-sdk-devel mailing list