From e840bbb08cc651a44044a8abc36935ca9d7a4fd4 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Sun, 26 Sep 2021 13:01:12 -0400 Subject: 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 --- CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') 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( -- cgit v1.2.1