Fixed exports for submodule builds with external nlohmann json parser. (#237)

This commit is contained in:
Alexander Kraus
2022-05-17 08:21:29 +02:00
committed by GitHub
parent 88bd611257
commit 4566a20f9a

View File

@@ -59,6 +59,8 @@ else()
# If target already exists, e.g. by git submodules
if(TARGET nlohmann_json)
set(INJA_SELECTED_JSON_LIBRARY "nlohmann_json::nlohmann_json")
install(TARGETS nlohmann_json EXPORT injaTargets)
else()
find_package(nlohmann_json REQUIRED)
set(INJA_SELECTED_JSON_LIBRARY "nlohmann_json::nlohmann_json")