Skip to content

Commit 84494cb

Browse files
authored
Fix target check for tomlplusplus in CMakeLists
The check for the tomlplusplus target uses the wrong target name, so an externally provided tomlplusplus target is never detected and CMake always falls back to find_package. It needs to use the same target name that is referenced in the adjacent target_link_libraries.
1 parent c732e45 commit 84494cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ if (REFLECTCPP_TOML OR REFLECTCPP_CHECK_HEADERS)
356356
list(APPEND REFLECT_CPP_SOURCES
357357
src/reflectcpp_toml.cpp
358358
)
359-
if (NOT TARGET tomlplusplus)
359+
if (NOT TARGET tomlplusplus::tomlplusplus)
360360
find_package(tomlplusplus)
361361
endif()
362362
target_link_libraries(reflectcpp PUBLIC tomlplusplus::tomlplusplus)

0 commit comments

Comments
 (0)