Skip to content

Commit

Permalink
Merge pull request #45 from bazfp/GNUInstallUtils
Browse files Browse the repository at this point in the history
Move GNUInstallDirs include to before the target include directories
  • Loading branch information
wqking authored Jun 9, 2022
2 parents d414928 + c0d01bf commit 3e09184
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
Expand All @@ -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)
Expand Down

0 comments on commit 3e09184

Please sign in to comment.