Skip to content

Commit

Permalink
Make sure that library compiles without bundled dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzicheng1987 authored Jul 3, 2024
1 parent c8d9710 commit c00e98c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,20 @@ if(REFLECTCPP_USE_BUNDLED_DEPENDENCIES)
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/rfl/thirdparty>)
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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include> )
$<INSTALL_INTERFACE:include>)

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)
Expand Down

0 comments on commit c00e98c

Please sign in to comment.