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

If CMAKE_INSTALL_INCLUDEDIR is not set, set it to "include"

This commit is contained in:
wqking 2022-06-08 08:53:45 +08:00
parent f0f42b5ccf
commit d414928a5a

View File

@ -4,10 +4,14 @@ 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 "")
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>
$<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) )
add_library(eventpp::eventpp ALIAS eventpp) add_library(eventpp::eventpp ALIAS eventpp)