mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
improve json lib discovery for cmake
This commit is contained in:
committed by
Thomas Krijnen
parent
788217c73c
commit
8e5a7ed24e
@@ -221,10 +221,11 @@ endif()
|
|||||||
|
|
||||||
if(GLTF_SUPPORT OR CITYJSON_SUPPORT)
|
if(GLTF_SUPPORT OR CITYJSON_SUPPORT)
|
||||||
UNIFY_ENVVARS_AND_CACHE(JSON_INCLUDE_DIR)
|
UNIFY_ENVVARS_AND_CACHE(JSON_INCLUDE_DIR)
|
||||||
find_file(json_hpp "json.hpp" ${JSON_INCLUDE_DIR}/nlohmann)
|
find_path(json_header_path "json.hpp" ${JSON_INCLUDE_DIR} PATH_SUFFIXES "nlohmann")
|
||||||
|
set(JSON_INCLUDE_DIR ${json_header_path})
|
||||||
|
|
||||||
if(json_hpp)
|
if(json_header_path)
|
||||||
message(STATUS "JSON for Modern C++ header file found")
|
message(STATUS "JSON for Modern C++ header file found in ${JSON_INCLUDE_DIR}")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Unable to find JSON for Modern C++ header file, aborting")
|
message(FATAL_ERROR "Unable to find JSON for Modern C++ header file, aborting")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user