diff --git a/CMakeLists.txt b/CMakeLists.txt index 25774b0a..a7d13c64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,14 +59,20 @@ if(REFLECTCPP_USE_BUNDLED_DEPENDENCIES) $ $) else() - add_library(reflectcpp INTERFACE) + if (REFLECTCPP_BUILD_SHARED) + add_library(reflectcpp SHARED) + else() + add_library(reflectcpp STATIC) + endif() + + target_sources(reflectcpp PRIVATE src/reflectcpp.cpp) target_include_directories( reflectcpp PUBLIC $ - $ ) + $) - target_compile_features(reflectcpp INTERFACE cxx_std_20) + target_compile_features(reflectcpp PUBLIC cxx_std_20) find_package(ctre CONFIG REQUIRED) find_package(yyjson CONFIG REQUIRED)