From 5da1d3397d534246ef643f10b910dcdb9cb20cc3 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Mon, 13 Nov 2023 22:22:50 -0500 Subject: [PATCH] More changes to get magic_enum working --- .gitattributes | 1 - cmake/InstallRules.cmake | 11 ----------- cmake/in/assert-config-cmake.in | 3 +++ 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.gitattributes b/.gitattributes index 2cfd9173..176a458f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ * text=auto -third_party/* linguist-vendored diff --git a/cmake/InstallRules.cmake b/cmake/InstallRules.cmake index 1cead74a..70819c82 100644 --- a/cmake/InstallRules.cmake +++ b/cmake/InstallRules.cmake @@ -8,19 +8,8 @@ install( "${PROJECT_BINARY_DIR}/include/" # generated header files DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT ${package_name}-development - PATTERN "**/third_party" EXCLUDE # skip third party directory - PATTERN "**/third_party/**" EXCLUDE # skip third party files ) -# conditionally copy third party header files to CMAKE_INSTALL_INCLUDEDIR -if(ASSERT_USE_MAGIC_ENUM) - install( - FILES "${PROJECT_SOURCE_DIR}/include/assert/third_party/magic_enum.hpp" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/assert/third_party" - COMPONENT ${package_name}-development - ) -endif() - # copy target build output artifacts to OS dependent locations # (Except includes, that just sets a compiler flag with the path) install( diff --git a/cmake/in/assert-config-cmake.in b/cmake/in/assert-config-cmake.in index 0fe550aa..e87e6a95 100644 --- a/cmake/in/assert-config-cmake.in +++ b/cmake/in/assert-config-cmake.in @@ -3,6 +3,9 @@ # no dependencies or special setup find_package(cpptrace REQUIRED) +if(ASSERT_USE_MAGIC_ENUM) + find_package(magic_enum REQUIRED) +endif() # we cannot modify an existing IMPORT target if(NOT TARGET assert::assert)