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)