mirror-chatterino2/cmake/FindMagicEnum.cmake
pajlada e327ed4166
Update magic_enum from v0.9.3 to v0.9.5 (#4992)
* Fix include path for magic enum
* Update .clang-format to ensure magic enum is caught as a third party library
2023-12-01 15:03:04 +01:00

14 lines
468 B
CMake

include(FindPackageHandleStandardArgs)
find_path(MagicEnum_INCLUDE_DIR magic_enum/magic_enum.hpp HINTS ${CMAKE_SOURCE_DIR}/lib/magic_enum/include)
find_package_handle_standard_args(MagicEnum DEFAULT_MSG MagicEnum_INCLUDE_DIR)
if (MagicEnum_FOUND)
add_library(MagicEnum INTERFACE IMPORTED)
set_target_properties(MagicEnum PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${MagicEnum_INCLUDE_DIR}"
)
endif ()
mark_as_advanced(MagicEnum_INCLUDE_DIR)