diff --git a/Async++Config.cmake.in b/Async++Config.cmake.in new file mode 100644 index 0000000..2b590c4 --- /dev/null +++ b/Async++Config.cmake.in @@ -0,0 +1,2 @@ +find_dependency(Threads) +include("${CMAKE_CURRENT_LIST_DIR}/Async++.cmake") diff --git a/CMakeLists.txt b/CMakeLists.txt index 6929b22..2dfe589 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,6 +111,16 @@ if (NOT USE_CXX_EXCEPTIONS) endif() endif() +include(CMakePackageConfigHelpers) +configure_package_config_file("${CMAKE_CURRENT_LIST_DIR}/Async++Config.cmake.in" + "${PROJECT_BINARY_DIR}/Async++Config.cmake" + INSTALL_DESTINATION cmake +) + +install(FILES "${PROJECT_BINARY_DIR}/Async++Config.cmake" + DESTINATION cmake +) + # Install the library and produce a CMake export script install(TARGETS Async++ EXPORT Async++