summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2013-10-03 13:01:30 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2013-10-03 13:01:30 (GMT)
commit642096931ee251a9aa2dd9b1ef7b4411574fa066 (patch)
tree4b6fe9c402a96cbb259be4423da126cc976d58d8
parent73a681ed88c818786f233215cadcaa5e1f307e37 (diff)
downloadlibcalendaring-642096931ee251a9aa2dd9b1ef7b4411574fa066.tar.gz
Move some basic cmake setup code one level higher and share it.
-rw-r--r--kdepimlibs/CMakeLists.txt35
-rw-r--r--kdepimlibs/kabc/CMakeLists.txt26
-rw-r--r--kdepimlibs/kcalcore/CMakeLists.txt25
-rw-r--r--kdepimlibs/kcalutils/CMakeLists.txt26
-rw-r--r--kdepimlibs/kimap/CMakeLists.txt25
-rw-r--r--kdepimlibs/kmime/CMakeLists.txt27
-rw-r--r--kdepimlibs/kpimutils/CMakeLists.txt11
-rw-r--r--kdepimlibs/notes/CMakeLists.txt21
8 files changed, 36 insertions, 160 deletions
diff --git a/kdepimlibs/CMakeLists.txt b/kdepimlibs/CMakeLists.txt
index 02f44bc..2320d53 100644
--- a/kdepimlibs/CMakeLists.txt
+++ b/kdepimlibs/CMakeLists.txt
@@ -1,3 +1,38 @@
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/kdepimlibs/cmake/modules")
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../kdecore/cmake/modules")
+set(LIBCALENDARING_NOTES_PATH "${CMAKE_CURRENT_SOURCE_DIR}/kdepimlibs/akonadi/notes")
+set(LIBCALENDARING_KIMAP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/kdepimlibs/kimap")
+set(LIBCALENDARING_KABC_PATH "${CMAKE_CURRENT_SOURCE_DIR}/kdepimlibs/kabc")
+set(LIBCALENDARING_KCALCORE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/kdepimlibs/kcalcore")
+set(LIBCALENDARING_KMIME_PATH "${CMAKE_CURRENT_SOURCE_DIR}/kdepimlibs/kmime")
+set(LIBCALENDARING_KPIMUTILS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/kdepimlibs/kpimutils")
+set(LIBCALENDARING_KCALUTILS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/kdepimlibs/kcalutils")
+
+
+cmake_minimum_required(VERSION 2.6)
+
+# only available from cmake-2.8.0
+if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
+ cmake_policy(SET CMP0012 NEW)
+endif()
+
+# only available from cmake-2.8.4
+if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
+ ${CMAKE_PATCH_VERSION} GREATER 3)
+ cmake_policy(SET CMP0017 NEW)
+endif()
+
+find_package(Qt4 4.6.0 REQUIRED)
+
+include_directories(
+ ${QT_INCLUDES}
+ kdepimlibs
+ ../kdecore/includes
+ ../kdecore/includes/KDE
+ ${CMAKE_CURRENT_BINARY_DIR}/../kdecore #kdefakes.h
+)
+
add_subdirectory(kabc)
add_subdirectory(kcalcore)
add_subdirectory(kmime)
diff --git a/kdepimlibs/kabc/CMakeLists.txt b/kdepimlibs/kabc/CMakeLists.txt
index f91a3a0..8bdea89 100644
--- a/kdepimlibs/kabc/CMakeLists.txt
+++ b/kdepimlibs/kabc/CMakeLists.txt
@@ -1,29 +1,5 @@
-
project(kabc)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/cmake/modules")
-
-set(LIBCALENDARING_KABC_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/kabc")
-
-cmake_minimum_required(VERSION 2.6)
-
-# only available from cmake-2.8.0
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
- cmake_policy(SET CMP0012 NEW)
-endif()
-
-# only available from cmake-2.8.4
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
- ${CMAKE_PATCH_VERSION} GREATER 3)
- cmake_policy(SET CMP0017 NEW)
-endif()
-
-
-
-find_package(Qt4 4.6.0 REQUIRED)
-
-include_directories(${QT_INCLUDES})
-
# include_directories( ${KDE4_KIO_INCLUDES} )
add_definitions(${QDBUS_DEFINITIONS} -DKDE_DEFAULT_DEBUG_AREA=5700)
@@ -37,8 +13,6 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/vcardparser
${LIBCALENDARING_KABC_PATH}
- ../../kdecore/
- ../kdepimlibs/
)
# kabc/vcardparser/Makefile.am: vcards
diff --git a/kdepimlibs/kcalcore/CMakeLists.txt b/kdepimlibs/kcalcore/CMakeLists.txt
index fc2e75c..ed95e25 100644
--- a/kdepimlibs/kcalcore/CMakeLists.txt
+++ b/kdepimlibs/kcalcore/CMakeLists.txt
@@ -1,26 +1,5 @@
project(kcalcore)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/cmake/modules")
-
-set(LIBCALENDARING_KCALCORE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/kcalcore")
-
-cmake_minimum_required(VERSION 2.6)
-
-# only available from cmake-2.8.0
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
- cmake_policy(SET CMP0012 NEW)
-endif()
-
-# only available from cmake-2.8.4
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
- ${CMAKE_PATCH_VERSION} GREATER 3)
- cmake_policy(SET CMP0017 NEW)
-endif()
-
-find_package(Qt4 4.6.0 REQUIRED)
-
-include_directories(${QT_INCLUDES})
-
#include(GenerateExportHeader)
############### Build Options ###############
@@ -50,10 +29,6 @@ include_directories(${QT_INCLUDES})
find_package(Libical "0.42" REQUIRED)
-
-include_directories( ../../kdecore ../../kdecore/includes ../../kdecore/includes/KDE ../kdepimlibs/includes)
-
-
###########################################################
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5810)
diff --git a/kdepimlibs/kcalutils/CMakeLists.txt b/kdepimlibs/kcalutils/CMakeLists.txt
index 9aeca0f..d3947ea 100644
--- a/kdepimlibs/kcalutils/CMakeLists.txt
+++ b/kdepimlibs/kcalutils/CMakeLists.txt
@@ -1,27 +1,5 @@
project(kcalutils)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/cmake/modules")
-set(LIBCALENDARING_KCALUTILS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/kcalutils")
-
-cmake_minimum_required(VERSION 2.6)
-
-# only available from cmake-2.8.0
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
- cmake_policy(SET CMP0012 NEW)
-endif()
-
-# only available from cmake-2.8.4
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
- ${CMAKE_PATCH_VERSION} GREATER 3)
- cmake_policy(SET CMP0017 NEW)
-endif()
-
-
-
-find_package(Qt4 4.6.0 REQUIRED)
-
-include_directories(${QT_INCLUDES})
-
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5820)
#
# if(KDE4_BUILD_TESTS)
@@ -31,10 +9,6 @@ add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5820)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
# ${KDE4_INCLUDE_DIR}
- ../kdepimlibs
- ../kdepimlibs/includes
- ../../kdecore/includes
- ../../kdecore/includes/KDE
)
########### next target ###############
diff --git a/kdepimlibs/kimap/CMakeLists.txt b/kdepimlibs/kimap/CMakeLists.txt
index e63bd35..c8cb657 100644
--- a/kdepimlibs/kimap/CMakeLists.txt
+++ b/kdepimlibs/kimap/CMakeLists.txt
@@ -1,22 +1,5 @@
project(kimap)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/cmake/modules")
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../../kdecore/cmake/modules")
-
-set(LIBCALENDARING_KIMAP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/kimap")
-cmake_minimum_required(VERSION 2.6)
-
-# only available from cmake-2.8.0
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
- cmake_policy(SET CMP0012 NEW)
-endif()
-
-# only available from cmake-2.8.4
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
- ${CMAKE_PATCH_VERSION} GREATER 3)
- cmake_policy(SET CMP0017 NEW)
-endif()
-
# In CMake >= 2.8.6, FindBoost.cmake tries to find BoostConfig.cmake which is
# not compatible with CMake's FindBoost. Disable this function.
set(Boost_NO_BOOST_CMAKE TRUE)
@@ -37,18 +20,12 @@ find_package(Sasl2)
# TYPE REQUIRED
# PURPOSE "Login authentication for IMAP and Sieve"
# )
-find_package(Qt4 4.6.0 REQUIRED)
-
-include_directories(${QT_INCLUDES})
#include(GenerateExportHeader)
include_directories(
- ../../kdecore/includes
- ../../kdecore/includes/KDE
- ../kdepimlibs
- ../kdepimlibs/kioslave
+ ${LIBCALENDARING_KIMAP_PATH}/../kioslave
${CMAKE_CURRENT_BINARY_DIR}
)
diff --git a/kdepimlibs/kmime/CMakeLists.txt b/kdepimlibs/kmime/CMakeLists.txt
index 48130de..71bcdba 100644
--- a/kdepimlibs/kmime/CMakeLists.txt
+++ b/kdepimlibs/kmime/CMakeLists.txt
@@ -1,35 +1,8 @@
project(kmime)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/cmake/modules")
-set(LIBCALENDARING_KMIME_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/kmime")
-
-cmake_minimum_required(VERSION 2.6)
-
-# only available from cmake-2.8.0
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
- cmake_policy(SET CMP0012 NEW)
-endif()
-
-# only available from cmake-2.8.4
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
- ${CMAKE_PATCH_VERSION} GREATER 3)
- cmake_policy(SET CMP0017 NEW)
-endif()
-
-find_package(Qt4 4.6.0 REQUIRED)
-
-include_directories(${QT_INCLUDES})
-
#include(GenerateExportHeader)
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}/../../kdecore
- ../../kdecore/includes
- ../../kdecore/includes/KDE
- ../kdepimlibs
-)
-
# add_subdirectory( tests )
add_definitions( -DKDE_DEFAULT_DEBUG_AREA=5320 -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII )
include(CheckTimezone)
diff --git a/kdepimlibs/kpimutils/CMakeLists.txt b/kdepimlibs/kpimutils/CMakeLists.txt
index 5cb58a8..079b219 100644
--- a/kdepimlibs/kpimutils/CMakeLists.txt
+++ b/kdepimlibs/kpimutils/CMakeLists.txt
@@ -1,20 +1,9 @@
project(kpimutils)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/cmake/modules")
-set(LIBCALENDARING_KPIMUTILS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/kpimutils")
-
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5321)
# add_subdirectory(tests)
-find_package(Qt4 4.6.0 REQUIRED)
-include_directories(
- ${QT_INCLUDES}
- ../../kdecore/includes
- ../../kdecore/includes/KDE
- ../kdepimlibs
-)
-
set(kpimutils_LIB_SRCS
${LIBCALENDARING_KPIMUTILS_PATH}/email.cpp
# emailvalidator.cpp
diff --git a/kdepimlibs/notes/CMakeLists.txt b/kdepimlibs/notes/CMakeLists.txt
index 85b5f45..6ef6eab 100644
--- a/kdepimlibs/notes/CMakeLists.txt
+++ b/kdepimlibs/notes/CMakeLists.txt
@@ -1,29 +1,8 @@
project(akonadi-notes)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/cmake/modules")
-set(LIBCALENDARING_NOTES_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/akonadi/notes")
-
-cmake_minimum_required(VERSION 2.6)
-
-# only available from cmake-2.8.0
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
- cmake_policy(SET CMP0012 NEW)
-endif()
-
-# only available from cmake-2.8.4
-if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
- ${CMAKE_PATCH_VERSION} GREATER 3)
- cmake_policy(SET CMP0017 NEW)
-endif()
-
-find_package(Qt4 4.6.0 REQUIRED)
-
-include_directories(${QT_INCLUDES})
-
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
- ../kdepimlibs
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -UQT_NO_CAST_FROM_ASCII -UQT_NO_CAST_TO_ASCII ${KDE4_ENABLE_EXCEPTIONS}")