Skip to content

Commit

Permalink
added include guard for inlined dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
RalphSteinhagen authored and wirew0rm committed Nov 9, 2023
1 parent f531e47 commit 9f24bac
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,15 @@ if (EMSCRIPTEN)
endif ()

# include header-only libraries that have been inlined to simplify builds w/o requiring access to the internet
add_library(refl-cpp INTERFACE)
target_include_directories(refl-cpp ${CMAKE_EXT_DEP_WARNING_GUARD} INTERFACE ${PROJECT_SOURCE_DIR}/third_party/refl-cpp/)
if (NOT(TARGET refl-cpp))
add_library(refl-cpp INTERFACE)
target_include_directories(refl-cpp ${CMAKE_EXT_DEP_WARNING_GUARD} INTERFACE ${PROJECT_SOURCE_DIR}/third_party/refl-cpp/)
endif ()

add_library(magic_enum INTERFACE)
target_include_directories(magic_enum ${CMAKE_EXT_DEP_WARNING_GUARD} INTERFACE ${PROJECT_SOURCE_DIR}/third_party/magic_enum/)
if (NOT(TARGET magic_enum))
add_library(magic_enum INTERFACE)
target_include_directories(magic_enum ${CMAKE_EXT_DEP_WARNING_GUARD} INTERFACE ${PROJECT_SOURCE_DIR}/third_party/magic_enum/)
endif ()

include(FetchContent)
FetchContent_Declare(
Expand Down

0 comments on commit 9f24bac

Please sign in to comment.