Skip to content

Commit

Permalink
Install headers into a versioned directory
Browse files Browse the repository at this point in the history
Allowing to co-install grantlee-0.5 and grantlee-5.
  • Loading branch information
heirecka committed Apr 25, 2015
1 parent 8b120f2 commit 99f73a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,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
Expand Down
3 changes: 3 additions & 0 deletions templates/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ add_library(Grantlee5::Templates ALIAS Grantlee_Templates)
generate_export_header(Grantlee_Templates)
set_property(TARGET Grantlee_Templates PROPERTY EXPORT_NAME Templates)
target_include_directories(Grantlee_Templates PRIVATE ../scriptabletags)
target_include_directories(Grantlee_Templates
INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>"
)

if (BUILD_TESTS)
set(GRANTLEE_TESTS_EXPORT "GRANTLEE_TEMPLATES_EXPORT")
Expand Down
3 changes: 3 additions & 0 deletions textdocument/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ generate_export_header(Grantlee_TextDocument)
add_library(Grantlee::TextDocument ALIAS Grantlee_TextDocument)
set_property(TARGET Grantlee_TextDocument PROPERTY EXPORT_NAME TextDocument)

target_include_directories(Grantlee_TextDocument
INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>"
)

target_link_libraries(Grantlee_TextDocument
LINK_PUBLIC Qt5::Gui
Expand Down

0 comments on commit 99f73a6

Please sign in to comment.