diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d7fef92..2365a28f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,8 +56,7 @@ if(REFLECTCPP_USE_BUNDLED_DEPENDENCIES) target_include_directories( reflectcpp PUBLIC $ - $ - $) + $) else() add_library(reflectcpp INTERFACE) @@ -66,7 +65,6 @@ else() $ $ ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DREFLECTCPP_NO_BUNDLED_DEPENDENCIES") target_compile_features(reflectcpp INTERFACE cxx_std_20) find_package(ctre CONFIG REQUIRED) diff --git a/include/rfl/PatternValidator.hpp b/include/rfl/PatternValidator.hpp index 3034daf0..b3e178fd 100644 --- a/include/rfl/PatternValidator.hpp +++ b/include/rfl/PatternValidator.hpp @@ -3,7 +3,7 @@ #include -#ifdef REFLECTCPP_NO_BUNDLED_DEPENDENCIES +#if __has_include() #include #else #include "thirdparty/ctre.hpp" diff --git a/include/rfl/json/Reader.hpp b/include/rfl/json/Reader.hpp index 8d885b4f..b0e0102a 100644 --- a/include/rfl/json/Reader.hpp +++ b/include/rfl/json/Reader.hpp @@ -1,7 +1,7 @@ #ifndef RFL_JSON_READER_HPP_ #define RFL_JSON_READER_HPP_ -#ifdef REFLECTCPP_NO_BUNDLED_DEPENDENCIES +#if __has_include() #include #else #include "../thirdparty/yyjson.h" diff --git a/include/rfl/json/Writer.hpp b/include/rfl/json/Writer.hpp index ef5774c7..a254a3c0 100644 --- a/include/rfl/json/Writer.hpp +++ b/include/rfl/json/Writer.hpp @@ -1,7 +1,7 @@ #ifndef RFL_JSON_WRITER_HPP_ #define RFL_JSON_WRITER_HPP_ -#ifdef REFLECTCPP_NO_BUNDLED_DEPENDENCIES +#if __has_include() #include #else #include "../thirdparty/yyjson.h" diff --git a/include/rfl/json/read.hpp b/include/rfl/json/read.hpp index a5c1edf3..359a20fb 100644 --- a/include/rfl/json/read.hpp +++ b/include/rfl/json/read.hpp @@ -1,7 +1,7 @@ #ifndef RFL_JSON_READ_HPP_ #define RFL_JSON_READ_HPP_ -#ifdef REFLECTCPP_NO_BUNDLED_DEPENDENCIES +#if __has_include() #include #else #include "../thirdparty/yyjson.h" diff --git a/include/rfl/json/save.hpp b/include/rfl/json/save.hpp index e6f66bc3..c2010f55 100644 --- a/include/rfl/json/save.hpp +++ b/include/rfl/json/save.hpp @@ -1,7 +1,7 @@ #ifndef RFL_JSON_SAVE_HPP_ #define RFL_JSON_SAVE_HPP_ -#ifdef REFLECTCPP_NO_BUNDLED_DEPENDENCIES +#if __has_include() #include #else #include "../thirdparty/yyjson.h" diff --git a/include/rfl/json/to_schema.hpp b/include/rfl/json/to_schema.hpp index fb61589b..d3badef6 100644 --- a/include/rfl/json/to_schema.hpp +++ b/include/rfl/json/to_schema.hpp @@ -1,7 +1,7 @@ #ifndef RFL_JSON_TOSCHEMA_HPP_ #define RFL_JSON_TOSCHEMA_HPP_ -#ifdef REFLECTCPP_NO_BUNDLED_DEPENDENCIES +#if __has_include() #include #else #include "../thirdparty/yyjson.h" diff --git a/include/rfl/json/write.hpp b/include/rfl/json/write.hpp index 58776621..cf8f9688 100644 --- a/include/rfl/json/write.hpp +++ b/include/rfl/json/write.hpp @@ -1,7 +1,7 @@ #ifndef RFL_JSON_WRITE_HPP_ #define RFL_JSON_WRITE_HPP_ -#ifdef REFLECTCPP_NO_BUNDLED_DEPENDENCIES +#if __has_include() #include #else #include "../thirdparty/yyjson.h"