CMakeLists.txt : add export

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-07 12:23:22 +08:00
parent 0402f2b7c3
commit 86ad397b39

View File

@ -22,3 +22,6 @@ install(EXPORT argparseConfig
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/argparse)
install(FILES ${CMAKE_CURRENT_LIST_DIR}/include/argparse/argparse.hpp
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/argparse)
export(EXPORT argparseConfig
NAMESPACE argparse::)