From 2da5fecc16f11e3bb37bcc233255bab1f287a90f Mon Sep 17 00:00:00 2001 From: Derek Ditch Date: Wed, 13 Feb 2019 21:04:35 -0600 Subject: [PATCH] binpac: Set installdirs using GNUInstallDirs module in CMake --- tools/binpac/CMakeLists.txt | 3 +++ tools/binpac/lib/CMakeLists.txt | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/binpac/CMakeLists.txt b/tools/binpac/CMakeLists.txt index dab67860dc..25fccc98c0 100644 --- a/tools/binpac/CMakeLists.txt +++ b/tools/binpac/CMakeLists.txt @@ -4,6 +4,9 @@ include(cmake/CommonCMakeConfig.cmake) file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" BINPAC_VERSION LIMIT_COUNT 1) +# Set default install paths +include(GNUInstallDirs) + ######################################################################## ## Dependency Configuration diff --git a/tools/binpac/lib/CMakeLists.txt b/tools/binpac/lib/CMakeLists.txt index 89d9300039..ed338b42b2 100644 --- a/tools/binpac/lib/CMakeLists.txt +++ b/tools/binpac/lib/CMakeLists.txt @@ -29,13 +29,13 @@ add_library(binpac_lib STATIC ${binpac_lib_SRCS}) set_target_properties(binpac_lib PROPERTIES OUTPUT_NAME binpac) -install(TARGETS binpac_lib DESTINATION lib) +install(TARGETS binpac_lib DESTINATION ${CMAKE_INSTALL_LIBDIR}) if ( BRO_ROOT_DIR ) # Installed in binpac subdir just for organization purposes. - install(FILES ${binpac_headers} DESTINATION include/binpac) + install(FILES ${binpac_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/binpac) else () - install(FILES ${binpac_headers} DESTINATION include) + install(FILES ${binpac_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) endif () # This is set to assist superprojects that want to build BinPac