From d414928a5a9770346aea7f4138a5b9bb45a3c082 Mon Sep 17 00:00:00 2001 From: wqking Date: Wed, 8 Jun 2022 08:53:45 +0800 Subject: [PATCH] If CMAKE_INSTALL_INCLUDEDIR is not set, set it to "include" --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index acdb79d..62116c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,10 +4,14 @@ 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() + target_include_directories( eventpp INTERFACE $ - $ + $ ) add_library(eventpp::eventpp ALIAS eventpp)