summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Knibbe <dknibbe@users.noreply.github.com>2017-01-17 18:30:01 +0100
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-01-17 09:30:01 -0800
commit198900eff403982f080958459f1ccb45cdefe9a4 (patch)
treeace4c01a5f61baba4f392e069002c495591a0201
parent05edb250ee309400ddcbc287a98d2e83004ca8b2 (diff)
Added target_include_directories() to properly export include directories (#130)
Fixes #126
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index da2feaa..8a1169b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,6 +55,10 @@ if(BUILD_PKGCONFIG)
set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING})
endif()
+target_include_directories(pugixml PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX}>)
+
install(TARGETS pugixml EXPORT pugixml-config
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}