1
0
mirror of https://github.com/wqking/eventpp.git synced 2024-12-27 16:41:11 +08:00

Move GNUInstallDirs include to before the target include directories

This commit is contained in:
Seb Horsewell 2022-06-09 13:11:25 +01:00
parent d414928a5a
commit c0d01bf0aa

View File

@ -4,10 +4,7 @@ project(eventpp VERSION 0.1.2)
add_library(eventpp INTERFACE) add_library(eventpp INTERFACE)
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
if("${CMAKE_INSTALL_INCLUDEDIR}" STREQUAL "") include(GNUInstallDirs)
set(CMAKE_INSTALL_INCLUDEDIR include)
endif()
target_include_directories( target_include_directories(
eventpp INTERFACE eventpp INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
@ -25,7 +22,6 @@ endif()
# Installation # Installation
# ------------ # ------------
include(GNUInstallDirs)
if (POLICY CMP0077) if (POLICY CMP0077)
# Allow CMake 3.13+ to override options when using add_subdirectory/FetchContent. # Allow CMake 3.13+ to override options when using add_subdirectory/FetchContent.
cmake_policy(SET CMP0077 NEW) cmake_policy(SET CMP0077 NEW)