From 51a3d8ce361d5f3788b849de2e8f3ff739c182c2 Mon Sep 17 00:00:00 2001 From: robert-kalmar Date: Mon, 21 Feb 2022 03:20:38 +0100 Subject: [PATCH] Install headers to place defined by CMAKE_INSTALL_INCLUDEDIR variable (#291) --- CMakeLists.txt | 1 + src/tim/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 983583a..101e67f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,7 @@ if(${TIM_VX_CODE_COVERAGE}) set(CMAKE_C_FLAGS "-g -O0 --coverage -fprofile-arcs -ftest-coverage") endif() +include(GNUInstallDirs) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE) endif() diff --git a/src/tim/CMakeLists.txt b/src/tim/CMakeLists.txt index 7678e62..d8cf61c 100644 --- a/src/tim/CMakeLists.txt +++ b/src/tim/CMakeLists.txt @@ -87,14 +87,14 @@ install(TARGETS ${TARGET_NAME} ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tim/vx - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/tim) + DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/tim) install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tim/lite - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/tim) + DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/tim) if(TIM_VX_ENABLE_LAYOUT_INFER) install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tim/transform - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/tim) + DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/tim) endif() if(TIM_VX_ENABLE_TEST)