Skip to content

Commit

Permalink
More changes to get magic_enum working
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed Nov 14, 2023
1 parent 99dbcc1 commit 5da1d33
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* text=auto
third_party/* linguist-vendored
11 changes: 0 additions & 11 deletions cmake/InstallRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 3 additions & 0 deletions cmake/in/assert-config-cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5da1d33

Please sign in to comment.