diff options
author | Allen Winter <allen.winter@kdab.com> | 2021-09-26 13:01:12 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2021-09-26 13:01:12 -0400 |
commit | e840bbb08cc651a44044a8abc36935ca9d7a4fd4 (patch) | |
tree | 3e987aeddd33d12628dac338863ebdbf2327f578 /CMakeLists.txt | |
parent | 786b8066ab66e8bbceea0bacbe352fdcc49bb824 (diff) | |
download | libical-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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 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( |