From b828fe16f5375afb15da15f1f62152013f4eb582 Mon Sep 17 00:00:00 2001 From: neargye Date: Tue, 10 Nov 2020 19:13:46 +0200 Subject: [PATCH] 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 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d54ffee..908117c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,4 +47,7 @@ if(MAGIC_ENUM_OPT_INSTALL) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include DESTINATION .) + + export(EXPORT ${PROJECT_NAME}Config + NAMESPACE ${PROJECT_NAME}::) endif()