From 48711436e84f97726456de4fa94282198065e6b1 Mon Sep 17 00:00:00 2001 From: Bo YU Date: Sat, 26 Oct 2024 00:21:04 +0800 Subject: [PATCH] [draft] Add multiarch support multiarch support required by Debian. Signed-off-by: Bo YU --- CMakeLists.txt | 2 ++ src/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0b53cd..1c665e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,8 @@ if (WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 ") endif () +include(GNUInstallDirs) + cmake_policy(SET CMP0015 NEW) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${zlog_BINARY_DIR}/lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${zlog_BINARY_DIR}/lib") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6327acf..38672fb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,8 +46,8 @@ target_link_libraries(zlog-chk-conf zlog) install(TARGETS zlog zlog_s zlog-chk-conf COMPONENT zlog - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION bin )