Skip to content

Commit

Permalink
🔨 Use standard CMAKE_INSTALL_INCLUDEDIR
Browse files Browse the repository at this point in the history
instead of `include` in INSTALL_INTERFACE
  • Loading branch information
OlivierLDff committed Aug 29, 2021
1 parent ab92c69 commit 53e1cff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ if(QOLM_MAIN_PROJECT)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()

include(GNUInstallDirs)

# ───── CONFIG ─────

if(QOLM_VERBOSE)
Expand Down Expand Up @@ -144,7 +146,7 @@ add_library(${QOLM_TARGET}::${QOLM_TARGET} ALIAS ${QOLM_TARGET})

target_include_directories(${QOLM_TARGET} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_compile_features(${QOLM_TARGET} PUBLIC cxx_std_17)
target_link_libraries(${QOLM_TARGET} PUBLIC Qt::Core Qt::Qml)
Expand Down Expand Up @@ -178,7 +180,6 @@ endif()
# ───── INSTALLATION ─────

if(QOLM_ENABLE_INSTALL)
include(GNUInstallDirs)
install(TARGETS ${QOLM_TARGET} EXPORT ${QOLM_TARGET}Targets)

foreach(HDR_FILE ${QOLM_HDRS})
Expand Down

0 comments on commit 53e1cff

Please sign in to comment.