Skip to content

Commit

Permalink
Export CMake targets to make it easier to consume
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Nov 19, 2020
1 parent a8e72c4 commit 6cd50df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,13 @@ install (
FILES ${CMAKE_CURRENT_BINARY_DIR}/GFTL.mk
DESTINATION "${top_dir}/include"
)

install(EXPORT GFTL
FILE GFTLTargets.cmake
NAMESPACE GFTL::
DESTINATION "${top_dir}/cmake/GFTL"
)
export(EXPORT GFTL
FILE "${CMAKE_CURRENT_BINARY_DIR}/GFTLTargets.cmake"
NAMESPACE GFTL::
)
3 changes: 0 additions & 3 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ add_custom_target (force-generation-of-includes ALL)
add_dependencies (force-generation-of-includes gftl)

install (TARGETS gftl EXPORT GFTL DESTINATION "${dest}/include")
install (EXPORT GFTL DESTINATION "${dest}/cmake")


0 comments on commit 6cd50df

Please sign in to comment.