From 4566a20f9a753f95d6076ec28b534efd644cad7b Mon Sep 17 00:00:00 2001 From: Alexander Kraus Date: Tue, 17 May 2022 08:21:29 +0200 Subject: [PATCH] Fixed exports for submodule builds with external nlohmann json parser. (#237) --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 772c9e0..8058133 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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")