diff --git a/CMakeLists.txt b/CMakeLists.txt index c653d61..a5d9980 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,6 +94,8 @@ endif() if(ASSERT_USE_MAGIC_ENUM) target_compile_definitions(assert PUBLIC ASSERT_USE_MAGIC_ENUM) + find_package(magic_enum CONFIG REQUIRED) + target_link_libraries(assert PUBLIC magic_enum::magic_enum) endif() if(NOT "${ASSERT_FAIL}" STREQUAL "") diff --git a/include/assert.hpp b/include/assert.hpp index b49c633..299a47e 100644 --- a/include/assert.hpp +++ b/include/assert.hpp @@ -34,7 +34,7 @@ #ifdef ASSERT_USE_MAGIC_ENUM // this is a temporary hack to make testing thing in compiler explorer quicker (it disallows simple relative includes) #include \ - "../third_party/magic_enum.hpp" + #endif #define LIBASSERT_IS_CLANG 0