blob: ef89070ddf1483f5b2e07ab144b7cc600f8956a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 252de6e..bcef3ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -885,10 +885,19 @@ ENDIF(PCRE_BUILD_TESTS)
# Installation
SET(CMAKE_INSTALL_ALWAYS 1)
-INSTALL(TARGETS ${targets}
+foreach(target ${targets})
+ INSTALL(TARGETS ${target}
+ EXPORT pcre-targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
+ target_include_directories(${target} PUBLIC $<INSTALL_INTERFACE:include>)
+endforeach()
+
+INSTALL(EXPORT pcre-targets
+ NAMESPACE unofficial::pcre::
+ FILE unofficial-pcre-targets.cmake
+ DESTINATION "share/unofficial-pcre")
INSTALL(FILES ${PCRE_HEADERS} ${PCREPOSIX_HEADERS} DESTINATION include)
|