summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2013-10-04 12:52:38 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2013-10-04 12:52:38 (GMT)
commitf26af72d056dcd60d0f12a704888e6f7473439e8 (patch)
treeb5881ecfff2a14f5c3d7ffa5436a56dfa28188f5
parent5042637961e5abaa47bb977815e8bc3570e70ee3 (diff)
downloadlibcalendaring-f26af72d056dcd60d0f12a704888e6f7473439e8.tar.gz
generate and use camelcase includes
-rw-r--r--kdecore/CMakeLists.txt2
-rw-r--r--kdecore/includes/CMakeLists.txt34
-rw-r--r--kdecore/includes/config-CamelCaseInclude.cmake2
-rw-r--r--kimap/CMakeLists.txt7
4 files changed, 44 insertions, 1 deletions
diff --git a/kdecore/CMakeLists.txt b/kdecore/CMakeLists.txt
index f543f0e..7cdff03 100644
--- a/kdecore/CMakeLists.txt
+++ b/kdecore/CMakeLists.txt
@@ -721,3 +721,5 @@ install(FILES
# DESTINATION ${SERVICETYPES_INSTALL_DIR}
# )
+add_subdirectory(includes)
+
diff --git a/kdecore/includes/CMakeLists.txt b/kdecore/includes/CMakeLists.txt
new file mode 100644
index 0000000..2a10c50
--- /dev/null
+++ b/kdecore/includes/CMakeLists.txt
@@ -0,0 +1,34 @@
+
+macro(install_headers _dir)
+ install( DIRECTORY ${_dir} DESTINATION ${INCLUDE_INSTALL_DIR} )
+endmacro()
+
+macro(create_header _file _path _header)
+ #For installation
+ set(CAMELCASE_INCLUDE_PATH "../${_header}")
+ configure_file(config-CamelCaseInclude.cmake ${CMAKE_CURRENT_BINARY_DIR}/KDE/${_file})
+ #For including from the kdepimlibs stuff
+ set(CAMELCASE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../${_path}/${_header}")
+ configure_file(config-CamelCaseInclude.cmake ${CMAKE_CURRENT_BINARY_DIR}/includes/KDE/${_file})
+endmacro()
+
+create_header(KCalendarSystem date kcalendarsystem.h)
+create_header(KConfig config kconfig.h)
+create_header(KCodecs text kcodecs.h)
+create_header(KConfigGroup config kconfiggroup.h)
+create_header(KDateTime date kdatetime.h)
+create_header(KDebug io kdebug.h)
+create_header(KGlobal kernel kglobal.h)
+create_header(KJob jobs kjob.h)
+create_header(KLocale localization klocale.h)
+create_header(KMimeType services kmimetype.h)
+create_header(KRandom util krandom.h)
+create_header(KSaveFile io ksavefile.h)
+create_header(KStandardDirs kernel kstandarddirs.h)
+create_header(KSystemTimeZone date ksystemtimezone.h)
+create_header(KTemporaryFile io ktemporaryfile.h)
+create_header(KTimeZone date ktimezone.h)
+create_header(KUrl io kurl.h)
+create_header(KLocalizedString localization klocalizedstring.h)
+
+install_headers(${CMAKE_CURRENT_BINARY_DIR}/KDE)
diff --git a/kdecore/includes/config-CamelCaseInclude.cmake b/kdecore/includes/config-CamelCaseInclude.cmake
new file mode 100644
index 0000000..b6bb3e9
--- /dev/null
+++ b/kdecore/includes/config-CamelCaseInclude.cmake
@@ -0,0 +1,2 @@
+#include "${CAMELCASE_INCLUDE_PATH}"
+
diff --git a/kimap/CMakeLists.txt b/kimap/CMakeLists.txt
index e8a7b79..978c5ac 100644
--- a/kimap/CMakeLists.txt
+++ b/kimap/CMakeLists.txt
@@ -41,7 +41,12 @@ include_directories(${QT_INCLUDES})
#include(GenerateExportHeader)
-include_directories( ../kdecore ../ ${CMAKE_CURRENT_BINARY_DIR})
+include_directories( ../kdecore
+ ${CMAKE_CURRENT_BINARY_DIR}/../kdecore/includes/includes
+ ${CMAKE_CURRENT_BINARY_DIR}/../kdecore/includes/includes/KDE
+ ../
+ ${CMAKE_CURRENT_BINARY_DIR}
+)