make the project to be used from a build directory
reference: https://cmake.org/cmake/help/latest/guide/tutorial/index.html#adding-export-configuration-step-11
This commit is contained in:
Ubpa 2020-11-03 01:01:39 +08:00 committed by GitHub
parent 02e33b6b18
commit 0e8bec0dc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,3 +45,6 @@ install(EXPORT ${PROJECT_NAME}Config
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include
DESTINATION .) DESTINATION .)
export(EXPORT ${PROJECT_NAME}Config
NAMESPACE ${PROJECT_NAME}::)