From 0ff6dc067ee9e3bdb2c63081dca1806aad3a2bca Mon Sep 17 00:00:00 2001
From: Olivier LIESS <olivier.liess@eurodecision.com>
Date: Mon, 3 Jun 2019 12:37:45 +0200
Subject: [PATCH] version.h : wrong file was deployed, added required include
 path and

---
 include/CMakeLists.txt      |  6 +++++-
 include/json/version.h      | 22 ----------------------
 src/lib_json/CMakeLists.txt |  5 +++--
 3 files changed, 8 insertions(+), 25 deletions(-)
 delete mode 100644 include/json/version.h

diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 7f1cb9822..facfab1c5 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -1,2 +1,6 @@
 file(GLOB INCLUDE_FILES "json/*.h")
-install(FILES ${INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/json)
+install(FILES
+    ${INCLUDE_FILES}
+    ${PROJECT_BINARY_DIR}/include/json/version.h
+    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/json)
+
diff --git a/include/json/version.h b/include/json/version.h
deleted file mode 100644
index 027f73173..000000000
--- a/include/json/version.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// DO NOT EDIT. This file (and "version") is generated by CMake.
-// Run CMake configure step to update it.
-#ifndef JSON_VERSION_H_INCLUDED
-#define JSON_VERSION_H_INCLUDED
-
-#define JSONCPP_VERSION_STRING "1.8.4"
-#define JSONCPP_VERSION_MAJOR 1
-#define JSONCPP_VERSION_MINOR 8
-#define JSONCPP_VERSION_PATCH 4
-#define JSONCPP_VERSION_QUALIFIER
-#define JSONCPP_VERSION_HEXA                                                   \
-  ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) |             \
-   (JSONCPP_VERSION_PATCH << 8))
-
-#ifdef JSONCPP_USING_SECURE_MEMORY
-#undef JSONCPP_USING_SECURE_MEMORY
-#endif
-#define JSONCPP_USING_SECURE_MEMORY 0
-// If non-zero, the library zeroes any memory that it has allocated before
-// it frees its memory.
-
-#endif // JSON_VERSION_H_INCLUDED
diff --git a/src/lib_json/CMakeLists.txt b/src/lib_json/CMakeLists.txt
index fc4e7a08f..2d6986330 100644
--- a/src/lib_json/CMakeLists.txt
+++ b/src/lib_json/CMakeLists.txt
@@ -47,7 +47,7 @@ set( PUBLIC_HEADERS
     ${JSONCPP_INCLUDE_DIR}/json/reader.h
     ${JSONCPP_INCLUDE_DIR}/json/writer.h
     ${JSONCPP_INCLUDE_DIR}/json/assertions.h
-    ${JSONCPP_INCLUDE_DIR}/json/version.h
+    ${PROJECT_BINARY_DIR}/include/json/version.h
     )
 
 source_group( "Public API" FILES ${PUBLIC_HEADERS} )
@@ -141,5 +141,6 @@ install( TARGETS jsoncpp_lib ${INSTALL_EXPORT}
 if(NOT CMAKE_VERSION VERSION_LESS 2.8.11)
     target_include_directories( jsoncpp_lib PUBLIC
                                 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
-                                $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/${JSONCPP_INCLUDE_DIR}>)
+                                $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/${JSONCPP_INCLUDE_DIR}>
+                                $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/json>)
 endif()