From 3b47993de763b1a78222738aefa3f5f3cb4e393d Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Mon, 7 Aug 2023 21:18:43 -0400 Subject: [PATCH] Use CMAKE_INSTALL_LIBDIR for install destination to respect build forges CMAKE_INSTALL_LIBDIR should be popualted with either lib or lib64, depending on the architecture. This change makes it so that this flag is respected by blisp and the library, runtime, and archives are installed to the location requested by the build. --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 693dc6b..cd66984 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,7 +90,11 @@ else() endif() endif() -install(TARGETS libblisp libblisp_static DESTINATION lib) +install(TARGETS libblisp libblisp_static + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +) if(BLISP_BUILD_CLI) add_subdirectory(tools/blisp) @@ -99,4 +103,4 @@ endif() if(COMPILE_TESTS) add_subdirectory(tools/blisp/src/cmd/dfu/tests) -endif(COMPILE_TESTS) \ No newline at end of file +endif(COMPILE_TESTS)