From c0d01bf0aacad0dcf8cb1dd48ab80433d260da94 Mon Sep 17 00:00:00 2001 From: Seb Horsewell Date: Thu, 9 Jun 2022 13:11:25 +0100 Subject: [PATCH] Move GNUInstallDirs include to before the target include directories --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62116c1..8e9b4e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,10 +4,7 @@ project(eventpp VERSION 0.1.2) add_library(eventpp INTERFACE) set(CMAKE_CXX_STANDARD 11) -if("${CMAKE_INSTALL_INCLUDEDIR}" STREQUAL "") - set(CMAKE_INSTALL_INCLUDEDIR include) -endif() - +include(GNUInstallDirs) target_include_directories( eventpp INTERFACE $ @@ -25,7 +22,6 @@ endif() # Installation # ------------ -include(GNUInstallDirs) if (POLICY CMP0077) # Allow CMake 3.13+ to override options when using add_subdirectory/FetchContent. cmake_policy(SET CMP0077 NEW)