summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2021-09-26 13:01:12 -0400
committerAllen Winter <allen.winter@kdab.com>2021-09-26 13:01:12 -0400
commite840bbb08cc651a44044a8abc36935ca9d7a4fd4 (patch)
tree3e987aeddd33d12628dac338863ebdbf2327f578
parent786b8066ab66e8bbceea0bacbe352fdcc49bb824 (diff)
downloadlibical-git-e840bbb08cc651a44044a8abc36935ca9d7a4fd4.tar.gz
buildsystem - adjust libdir and includedir in generated pkgconfig
The lib and include dirs can be set at CMake time by passing LIB_INSTALL_DIR and INCLUDE_INSTALL_DIR values. Additionally, on 64-bit linux the libdir default is "lib64". Issue#508
-rw-r--r--CMakeLists.txt12
-rw-r--r--ReleaseNotes.txt1
-rw-r--r--src/libical-glib/CMakeLists.txt12
3 files changed, 21 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 995a9297..fa6afd31 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -624,8 +624,16 @@ endif()
set(VERSION "${LIBICAL_LIB_VERSION_STRING}")
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
-set(libdir "\${exec_prefix}/lib")
-set(includedir "\${prefix}/include")
+if(IS_ABSOLUTE ${LIB_INSTALL_DIR})
+ set(libdir "${LIB_INSTALL_DIR}")
+else()
+ set(libdir "\${exec_prefix}/${LIB_INSTALL_DIR}")
+endif()
+if(IS_ABSOLUTE ${INCLUDE_INSTALL_DIR})
+ set(includedir "${INCLUDE_INSTALL_DIR}")
+else()
+ set(includedir "\${prefix}/include")
+endif()
set(PTHREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
configure_file(
diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt
index b43c7761..731e557a 100644
--- a/ReleaseNotes.txt
+++ b/ReleaseNotes.txt
@@ -8,6 +8,7 @@ Version 3.0.11 (UNRELEASED):
* Fix vcal for some architectures (like aarch64, ppc64le and s390x)
* Fix memory leaks in vcal
* Prevent crash when looking for tzid in initialize_rscale
+ * Adjust libdir and includedir in generated pkgconfig files
Version 3.0.10 (17 April 2021):
-------------------------------
diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt
index 096f9bb4..f734024e 100644
--- a/src/libical-glib/CMakeLists.txt
+++ b/src/libical-glib/CMakeLists.txt
@@ -257,8 +257,16 @@ install(FILES ${LIBICAL_GLIB_HEADERS}
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
-set(libdir "\${exec_prefix}/lib")
-set(includedir "\${prefix}/include")
+if(IS_ABSOLUTE ${LIB_INSTALL_DIR})
+ set(libdir "${LIB_INSTALL_DIR}")
+else()
+ set(libdir "\${exec_prefix}/${LIB_INSTALL_DIR}")
+endif()
+if(IS_ABSOLUTE ${INCLUDE_INSTALL_DIR})
+ set(includedir "${INCLUDE_INSTALL_DIR}")
+else()
+ set(includedir "\${prefix}/include")
+endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/libical-glib.pc.in