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.
This commit is contained in:
Neil Hanlon 2023-08-07 21:18:43 -04:00
parent f601b6b965
commit 3b47993de7
Signed by: neil
GPG Key ID: 705BC21EC3C70F34

View File

@ -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)
endif(COMPILE_TESTS)