Skip to content

Commit 032e495

Browse files
committed
Merge branch 'master' of https://github.com/jasonhorsburgh/unittest-cpp into jasonhorsburgh-master
Conflicts: CMakeLists.txt
2 parents 843d173 + e88121f commit 032e495

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ else()
6969
set (UTPP_INSTALL_DESTINATION "include/UnitTestPP")
7070
endif()
7171

72-
install(TARGETS UnitTest++ DESTINATION lib)
72+
set(config_install_dir_ lib/cmake/${PROJECT_NAME})
73+
set(targets_export_name_ "${PROJECT_NAME}Targets")
74+
75+
install(TARGETS UnitTest++ EXPORT "${targets_export_name_}" DESTINATION lib)
7376
install(FILES ${headers_} DESTINATION ${UTPP_INSTALL_DESTINATION})
7477
install(FILES ${platformHeaders_} DESTINATION ${UTPP_INSTALL_DESTINATION}/${platformDir_})
78+
install(FILES cmake/UnitTest++Config.cmake DESTINATION "${config_install_dir_}")
79+
install(EXPORT "${targets_export_name_}" DESTINATION "${config_install_dir_}")

cmake/UnitTest++Config.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include("${CMAKE_CURRENT_LIST_DIR}/UnitTest++Targets.cmake")
2+
get_filename_component(UTPP_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../../include/" ABSOLUTE)

0 commit comments

Comments
 (0)