Skip to content

Commit a89cc00

Browse files
committed
build: add support to export targets
1 parent 59706f4 commit a89cc00

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
!.git*
55

66
build
7+
install

CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,18 @@ if(BUILD_TESTING)
7171

7272
catch_discover_tests(my_fibonacci_test)
7373
endif()
74+
75+
install(
76+
TARGETS my_fibonacci my_fibonacci_main
77+
EXPORT my_fibonacci_targets
78+
LIBRARY DESTINATION lib
79+
RUNTIME DESTINATION bin
80+
FILE_SET HEADERS
81+
)
82+
83+
install(
84+
EXPORT my_fibonacci_targets
85+
FILE MyFibonacciTargets.cmake
86+
NAMESPACE my_fibonacci::
87+
DESTINATION lib/cmake/MyFibonacci
88+
)

0 commit comments

Comments
 (0)