Skip to content
Snippets Groups Projects
Commit 5cd333b6 authored by Steven Hahn's avatar Steven Hahn
Browse files

Fix name of the jsoncpp forwarding header

The header name depends on whether the
source files have been amalgamated.
parent f6893838
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,14 @@ if (WIN32 AND VTK_USE_SYSTEM_JSONCPP)
mark_as_advanced(VTK_SYSTEM_JSONCPP_SHARED)
endif()
if (VTK_USE_SYSTEM_JSONCPP)
if (EXISTS "${JsonCpp_INCLUDE_DIR}/json/json_forwards.h")
set (JsonCpp_FORWARDING_HEADER_NAME "json_forwards.h")
else ()
set (JsonCpp_FORWARDING_HEADER_NAME "forwards.h")
endif ()
endif ()
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/vtk_jsoncpp_fwd.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/vtk_jsoncpp_fwd.h")
......
......@@ -18,7 +18,7 @@
/* Use the JsonCpp library configured for VTK. */
#cmakedefine VTK_USE_SYSTEM_JSONCPP
#ifdef VTK_USE_SYSTEM_JSONCPP
# include <json/json-forward.h>
# include <json/@JsonCpp_FORWARDING_HEADER_NAME@>
#else
# include <vtkjsoncpp/json/json-forwards.h>
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment