From 4def8ec319630ab4bec076de29f8e29c36f657e8 Mon Sep 17 00:00:00 2001 From: Satadru Pramanik Date: Tue, 30 Nov 2021 14:00:28 -0500 Subject: [PATCH] Allow for alternate libdir detection in linux --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cdf5a1b..b71c0e2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,8 @@ endif() option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF) option(BUILD_TESTING "Build test programs" ON) +include(GNUInstallDirs) + include(CheckTypeSize) check_type_size("unsigned __int128" UINT128) check_type_size("unsigned int __attribute__((mode(TI)))" UINT128_USING_MODE) @@ -93,7 +95,7 @@ install(TARGETS maxminddb install(EXPORT maxminddb FILE maxminddb-config.cmake NAMESPACE maxminddb:: - DESTINATION lib/cmake/maxminddb) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/maxminddb) # We always want to build mmdblookup add_subdirectory(bin)