summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--Help/manual/cmake-modules.7.rst1
-rw-r--r--Help/module/FindJsonCpp.rst1
-rw-r--r--Help/release/3.2.rst3
-rw-r--r--Source/Modules/FindJsonCpp.cmake (renamed from Modules/FindJsonCpp.cmake)2
-rw-r--r--Tests/FindJsonCpp/Test/CMakeLists.txt3
6 files changed, 6 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e61621d..1250a94 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -382,10 +382,8 @@ macro (CMAKE_BUILD_UTILITIES)
#---------------------------------------------------------------------
# Build jsoncpp library.
if(CMAKE_USE_SYSTEM_JSONCPP)
- if(EXISTS ${CMAKE_ROOT}/Modules/FindJsonCpp.cmake)
- find_package(JsonCpp)
- elseif(NOT CMAKE_VERSION VERSION_LESS 3.0)
- include(${CMake_SOURCE_DIR}/Modules/FindJsonCpp.cmake)
+ if(NOT CMAKE_VERSION VERSION_LESS 3.0)
+ include(${CMake_SOURCE_DIR}/Source/Modules/FindJsonCpp.cmake)
else()
message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP requires CMake >= 3.0")
endif()
diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst
index db56010..965eede 100644
--- a/Help/manual/cmake-modules.7.rst
+++ b/Help/manual/cmake-modules.7.rst
@@ -126,7 +126,6 @@ All Modules
/module/FindJava
/module/FindJNI
/module/FindJPEG
- /module/FindJsonCpp
/module/FindKDE3
/module/FindKDE4
/module/FindLAPACK
diff --git a/Help/module/FindJsonCpp.rst b/Help/module/FindJsonCpp.rst
deleted file mode 100644
index ba87ece..0000000
--- a/Help/module/FindJsonCpp.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. cmake-module:: ../../Modules/FindJsonCpp.cmake
diff --git a/Help/release/3.2.rst b/Help/release/3.2.rst
index ddc3d86..ef26dbe 100644
--- a/Help/release/3.2.rst
+++ b/Help/release/3.2.rst
@@ -124,9 +124,6 @@ Modules
* A :module:`FindIntl` module was introduced to find the
Gettext ``libintl`` library.
-* A :module:`FindJsonCpp` module was introduced to find the
- JsonCpp package.
-
* The :module:`FindLATEX` module learned to support components.
* The :module:`FindMPI` module learned to find MS-MPI on Windows.
diff --git a/Modules/FindJsonCpp.cmake b/Source/Modules/FindJsonCpp.cmake
index cbb4fb3..014d3bd 100644
--- a/Modules/FindJsonCpp.cmake
+++ b/Source/Modules/FindJsonCpp.cmake
@@ -93,7 +93,7 @@ unset(_JsonCpp_H_REGEX)
unset(_JsonCpp_H)
#-----------------------------------------------------------------------------
-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/../../Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JsonCpp
FOUND_VAR JsonCpp_FOUND
REQUIRED_VARS JsonCpp_LIBRARY JsonCpp_INCLUDE_DIR
diff --git a/Tests/FindJsonCpp/Test/CMakeLists.txt b/Tests/FindJsonCpp/Test/CMakeLists.txt
index 4e1e271..d1dc647 100644
--- a/Tests/FindJsonCpp/Test/CMakeLists.txt
+++ b/Tests/FindJsonCpp/Test/CMakeLists.txt
@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.1)
project(TestFindJsonCpp CXX)
include(CTest)
+# CMake does not actually provide FindJsonCpp publicly.
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Source/Modules)
+
find_package(JsonCpp REQUIRED)
add_executable(test_jsoncpp_tgt main.cxx)