summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-20 08:15:43 -0500
committerBrad King <brad.king@kitware.com>2015-02-20 08:22:02 -0500
commita5768442636c7fe909e8afc205fd19ac13b9fbc2 (patch)
treeaf7f2655b1115192c0435d74c3965169b0eafba0 /CMakeLists.txt
parentda92cdab5206d0556822ee12350636300ec73160 (diff)
downloadcmake-a5768442636c7fe909e8afc205fd19ac13b9fbc2.tar.gz
FindJsonCpp: Drop new module due to upstream jsoncpp providing package
Since jsoncpp 0.7.0 (2014-11-20) the upstream may provide a CMake package configuration file such that find_package(jsoncpp) will find a jsoncppConfig.cmake file. In order to avoid conflicting with this (especially on case-insensitive filesystems), and since we always prefer projects to provide package config files (that they maintain), it is better to not provide FindJsonCpp publicly. Move FindJsonCpp into a private source directory that is not installed so that we can still use it for building CMake itself. Reported-by: Ryan Pavlik <ryan.pavlik@gmail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 2 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e61621d148..1250a94775 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()