Merge pull request #855 from theodelrieu/fix/cmake_include_directories

cmake: use BUILD_INTERFACE/INSTALL_INTERFACE
This commit is contained in:
Niels Lohmann 2017-12-06 20:47:38 +01:00 committed by GitHub
commit fa76f2efd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,9 @@ add_library(${NLOHMANN_JSON_TARGET_NAME} INTERFACE)
target_include_directories(
${NLOHMANN_JSON_TARGET_NAME}
INTERFACE $<INSTALL_INTERFACE:include/>
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include>
)
## add debug view defintion file for msvc (natvis) [cmake <= 3.2.2 does not support export of source files]