You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.6 KiB
83 lines
2.6 KiB
From 2ce2cb510a39ee42619745a98b14e32744d1bf75 Mon Sep 17 00:00:00 2001
|
|
From: Troy Dawson <tdawson@redhat.com>
|
|
Date: Tue, 28 Jan 2020 13:19:10 -0800
|
|
Subject: [PATCH] install headers into versioned directory
|
|
|
|
---
|
|
CMakeLists.txt | 1 +
|
|
templates/lib/CMakeLists.txt | 8 ++++++--
|
|
textdocument/lib/CMakeLists.txt | 8 ++++++--
|
|
3 files changed, 13 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 20edcdc..8df3dd6 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -80,6 +80,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( INCLUDE_INSTALL_DIR include/Grantlee5 )
|
|
|
|
# set up RPATH/install_name_dir
|
|
set( CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR})
|
|
diff --git a/templates/lib/CMakeLists.txt b/templates/lib/CMakeLists.txt
|
|
index 5058481..ec1fd3a 100644
|
|
--- a/templates/lib/CMakeLists.txt
|
|
+++ b/templates/lib/CMakeLists.txt
|
|
@@ -101,6 +101,10 @@ if (Qt5Qml_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
|
|
PRIVATE Qt5::Qml
|
|
)
|
|
@@ -152,10 +156,10 @@ install(FILES
|
|
token.h
|
|
util.h
|
|
variable.h
|
|
- DESTINATION include/grantlee COMPONENT Templates
|
|
+ DESTINATION ${INCLUDE_INSTALL_DIR}/grantlee COMPONENT Templates
|
|
)
|
|
|
|
install(FILES
|
|
grantlee_templates.h
|
|
- DESTINATION include COMPONENT Templates
|
|
+ DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Templates
|
|
)
|
|
diff --git a/textdocument/lib/CMakeLists.txt b/textdocument/lib/CMakeLists.txt
|
|
index 2c5a96f..bf56052 100644
|
|
--- a/textdocument/lib/CMakeLists.txt
|
|
+++ b/textdocument/lib/CMakeLists.txt
|
|
@@ -35,6 +35,10 @@ if (CMAKE_GENERATOR MATCHES "Visual Studio")
|
|
endforeach()
|
|
endif()
|
|
|
|
+target_include_directories(Grantlee_TextDocument
|
|
+ INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>"
|
|
+)
|
|
+
|
|
target_link_libraries(Grantlee_TextDocument
|
|
PUBLIC Qt5::Gui
|
|
)
|
|
@@ -59,10 +63,10 @@ install(FILES
|
|
texthtmlbuilder.h
|
|
mediawikimarkupbuilder.h
|
|
${CMAKE_CURRENT_BINARY_DIR}/grantlee_textdocument_export.h
|
|
- DESTINATION include/grantlee COMPONENT TextDocument
|
|
+ DESTINATION ${INCLUDE_INSTALL_DIR}/grantlee COMPONENT TextDocument
|
|
)
|
|
|
|
install(FILES
|
|
grantlee_textdocument.h
|
|
- DESTINATION include COMPONENT TextDocument
|
|
+ DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT TextDocument
|
|
)
|
|
--
|
|
2.24.1
|
|
|