summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-03-23 15:15:05 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-03-23 15:15:05 (GMT)
commit4accdefe599278aebd5b04a1ca4b5009cc810683 (patch)
treeb071ffa7bf1c19521ad9422b88840d2a6bd42d67 /cmake
parent612f59857ab10ef41382877200e2ab9cf9e84326 (diff)
parentd7fc76cfbf4e72d97ca291741d821e94a98b0c0f (diff)
downloadlibkolabxml-4accdefe599278aebd5b04a1ca4b5009cc810683.tar.gz
Merge branch 'dev/upgrade-migration'
Conflicts: libkolabxml/CMakeLists.txt libkolabxml/lib/kolabconversions.h libkolabxml/lib/xcalconversions.h libkolabxml/lib/xcardconversions.h
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindKDELibraries.cmake30
-rw-r--r--cmake/modules/FindKolabInternal.cmake51
2 files changed, 81 insertions, 0 deletions
diff --git a/cmake/modules/FindKDELibraries.cmake b/cmake/modules/FindKDELibraries.cmake
new file mode 100644
index 0000000..6edf4dd
--- /dev/null
+++ b/cmake/modules/FindKDELibraries.cmake
@@ -0,0 +1,30 @@
+#Find some libraries
+find_library(KCALCORE_LIBRARY NAMES kcalcore PATH_SUFFIXES kde4/devel)
+if(KCALCORE_LIBRARY)
+ set(KCALCORE_LIBRARY_FOUND ON)
+ message("KCalCore found: ${KCALCORE_LIBRARY}")
+endif(KCALCORE_LIBRARY)
+
+find_library(KMIME_LIBRARY NAMES kmime)
+if(KMIME_LIBRARY)
+ set(KMIME_LIBRARY_FOUND ON)
+ message("KMime found: ${KMIME_LIBRARY}")
+endif(KMIME_LIBRARY)
+
+find_library(KABC_LIBRARY NAMES kabc)
+if(KABC_LIBRARY)
+ set(KABC_LIBRARY_FOUND ON)
+ message("KABC found: ${KABC_LIBRARY}")
+endif(KABC_LIBRARY)
+
+find_library(AKONADI-KDE_LIBRARY NAMES akonadi-kde)
+if(AKONADI-KDE_LIBRARY)
+ set(AKONADI-KDE_LIBRARY_FOUND ON)
+ message("AKONADI-KDE found: ${AKONADI-KDE_LIBRARY}")
+endif(AKONADI-KDE_LIBRARY)
+
+find_library(AKONADI-NOTES_LIBRARY NAMES akonadi-notes)
+if(AKONADI-NOTES_LIBRARY)
+ set(AKONADI-NOTES_LIBRARY_FOUND ON)
+ message("AKONADI-NOTES found: ${AKONADI-NOTES_LIBRARY}")
+endif(AKONADI-NOTES_LIBRARY) \ No newline at end of file
diff --git a/cmake/modules/FindKolabInternal.cmake b/cmake/modules/FindKolabInternal.cmake
new file mode 100644
index 0000000..fb9d6a5
--- /dev/null
+++ b/cmake/modules/FindKolabInternal.cmake
@@ -0,0 +1,51 @@
+
+# The install directory is defined by the CMAKE_INSTALL_PREFIX which defaults to /usr/local if not specified.
+# To install i.e. to /usr use "cmake -DCMAKE_INSTALL_PREFIX=/usr ."
+#
+# The library directory suffix (64/32) is detected automatically based on the available directories in CMAKE_INSTALL_PREFIX
+# The Result of this can be overridden by setting KOLAB_LIB_INSTALL_DIR "cmake -DKOLAB_LIB_INSTALL_DIR=/usr/lib64/ ."
+#
+# The runtime install is controlled by KOLAB_BIN_INSTALL_DIR
+# The header install is controlled by KOLAB_HEADER_INSTALL_DIR
+#
+# KOLAB_INSTALL_DIRECTORIES contains the determined install directories and should be used with install commands
+
+get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
+
+if (${LIB64} STREQUAL "TRUE")
+ find_path(LIB32FOUND "${CMAKE_INSTALL_PREFIX}/lib32")
+ find_path(LIB64FOUND "${CMAKE_INSTALL_PREFIX}/lib64")
+ if (LIB64FOUND)
+ set(LIBSUFFIX 64)
+ else()
+ set(LIBSUFFIX "")
+ endif()
+else()
+ set(LIBSUFFIX "")
+endif()
+
+if(KOLAB_LIB_INSTALL_DIR)
+ message("KOLAB_LIB_INSTALL_DIR specified manually")
+else()
+ set(KOLAB_LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIBSUFFIX}")
+endif()
+message("KOLAB_LIB_INSTALL_DIR: ${KOLAB_LIB_INSTALL_DIR}")
+
+if(KOLAB_BIN_INSTALL_DIR)
+ message("KOLAB_BIN_INSTALL_DIR specified manually")
+else()
+ set(KOLAB_BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+endif()
+message("KOLAB_BIN_INSTALL_DIR: ${KOLAB_BIN_INSTALL_DIR}")
+
+set(KOLAB_INSTALL_DIRECTORIES RUNTIME DESTINATION "${KOLAB_BIN_INSTALL_DIR}"
+ LIBRARY DESTINATION "${KOLAB_LIB_INSTALL_DIR}"
+ ARCHIVE DESTINATION "${KOLAB_LIB_INSTALL_DIR}" COMPONENT Devel )
+
+
+if(KOLAB_HEADER_INSTALL_DIR)
+ message("KOLAB_HEADER_INSTALL_DIR specified manually")
+else()
+ set(KOLAB_HEADER_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/kolab")
+endif()
+message("KOLAB_HEADER_INSTALL_DIR: ${KOLAB_HEADER_INSTALL_DIR}")