summaryrefslogtreecommitdiff
blob: 5b0d61d5c1eb04559ec6f389d758ce9bc7226839 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Install headers to a custom location to permit slotting with Qt4 version.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1324566..f98d5da 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,7 +100,7 @@ set (LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name (eg. '6
 set( LIB_INSTALL_DIR lib${LIB_SUFFIX} )
 set( PLUGIN_INSTALL_DIR ${LIB_INSTALL_DIR}/grantlee/${Grantlee5_MAJOR_MINOR_VERSION_STRING} )
 set( BIN_INSTALL_DIR bin )
-set( INCLUDE_INSTALL_DIR include )
+set( INCLUDE_INSTALL_DIR include/grantlee5 )
 set( DATA_INSTALL_DIR share/apps )
 
 # set up RPATH/install_name_dir
diff --git a/templates/lib/CMakeLists.txt b/templates/lib/CMakeLists.txt
index dad2ef8..434d163 100644
--- a/templates/lib/CMakeLists.txt
+++ b/templates/lib/CMakeLists.txt
@@ -107,6 +107,7 @@ if (Qt5Script_FOUND)
 
   target_sources(Grantlee_Templates PRIVATE ${scriptabletags_SRCS})
   target_include_directories(Grantlee_Templates PRIVATE ../scriptabletags)
+  target_include_directories(Grantlee_Templates INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>")
   target_link_libraries(Grantlee_Templates
     LINK_PRIVATE Qt5::Script
   )
diff --git a/textdocument/lib/CMakeLists.txt b/textdocument/lib/CMakeLists.txt
index 557d262..d2dbaa1 100644
--- a/textdocument/lib/CMakeLists.txt
+++ b/textdocument/lib/CMakeLists.txt
@@ -42,6 +42,7 @@ if (CMAKE_GENERATOR MATCHES "Visual Studio")
       )
   endforeach()
 endif()
+target_include_directories(Grantlee_TextDocument INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>")
 
 target_link_libraries(Grantlee_TextDocument
   LINK_PUBLIC Qt5::Gui