Skip to content

Commit 2c852e5

Browse files
authored
Merge pull request #28 from tribal-tec/master
Support CMake's find_package()
2 parents c636502 + f86ff6c commit 2c852e5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Async++Config.cmake.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
find_dependency(Threads)
2+
include("${CMAKE_CURRENT_LIST_DIR}/Async++.cmake")

CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,16 @@ if (NOT USE_CXX_EXCEPTIONS)
111111
endif()
112112
endif()
113113

114+
include(CMakePackageConfigHelpers)
115+
configure_package_config_file("${CMAKE_CURRENT_LIST_DIR}/Async++Config.cmake.in"
116+
"${PROJECT_BINARY_DIR}/Async++Config.cmake"
117+
INSTALL_DESTINATION cmake
118+
)
119+
120+
install(FILES "${PROJECT_BINARY_DIR}/Async++Config.cmake"
121+
DESTINATION cmake
122+
)
123+
114124
# Install the library and produce a CMake export script
115125
install(TARGETS Async++
116126
EXPORT Async++

0 commit comments

Comments
 (0)