Merge topic 'private-FindJsonCpp'

a41d621d bootstrap: Add --(no-)system-jsoncpp options
a5768442 FindJsonCpp: Drop new module due to upstream jsoncpp providing package
This commit is contained in:
Brad King 2015-02-23 10:26:30 -05:00 committed by CMake Topic Stage
commit 1eb192905d
7 changed files with 10 additions and 12 deletions

View File

@ -382,10 +382,8 @@ macro (CMAKE_BUILD_UTILITIES)
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Build jsoncpp library. # Build jsoncpp library.
if(CMAKE_USE_SYSTEM_JSONCPP) if(CMAKE_USE_SYSTEM_JSONCPP)
if(EXISTS ${CMAKE_ROOT}/Modules/FindJsonCpp.cmake) if(NOT CMAKE_VERSION VERSION_LESS 3.0)
find_package(JsonCpp) include(${CMake_SOURCE_DIR}/Source/Modules/FindJsonCpp.cmake)
elseif(NOT CMAKE_VERSION VERSION_LESS 3.0)
include(${CMake_SOURCE_DIR}/Modules/FindJsonCpp.cmake)
else() else()
message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP requires CMake >= 3.0") message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP requires CMake >= 3.0")
endif() endif()

View File

@ -127,7 +127,6 @@ All Modules
/module/FindJava /module/FindJava
/module/FindJNI /module/FindJNI
/module/FindJPEG /module/FindJPEG
/module/FindJsonCpp
/module/FindKDE3 /module/FindKDE3
/module/FindKDE4 /module/FindKDE4
/module/FindLAPACK /module/FindLAPACK

View File

@ -1 +0,0 @@
.. cmake-module:: ../../Modules/FindJsonCpp.cmake

View File

@ -124,9 +124,6 @@ Modules
* A :module:`FindIntl` module was introduced to find the * A :module:`FindIntl` module was introduced to find the
Gettext ``libintl`` library. Gettext ``libintl`` library.
* A :module:`FindJsonCpp` module was introduced to find the
JsonCpp package.
* The :module:`FindLATEX` module learned to support components. * The :module:`FindLATEX` module learned to support components.
* The :module:`FindMPI` module learned to find MS-MPI on Windows. * The :module:`FindMPI` module learned to find MS-MPI on Windows.

View File

@ -93,7 +93,7 @@ unset(_JsonCpp_H_REGEX)
unset(_JsonCpp_H) unset(_JsonCpp_H)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) include(${CMAKE_CURRENT_LIST_DIR}/../../Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JsonCpp FIND_PACKAGE_HANDLE_STANDARD_ARGS(JsonCpp
FOUND_VAR JsonCpp_FOUND FOUND_VAR JsonCpp_FOUND
REQUIRED_VARS JsonCpp_LIBRARY JsonCpp_INCLUDE_DIR REQUIRED_VARS JsonCpp_LIBRARY JsonCpp_INCLUDE_DIR

View File

@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.1)
project(TestFindJsonCpp CXX) project(TestFindJsonCpp CXX)
include(CTest) include(CTest)
# CMake does not actually provide FindJsonCpp publicly.
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Source/Modules)
find_package(JsonCpp REQUIRED) find_package(JsonCpp REQUIRED)
add_executable(test_jsoncpp_tgt main.cxx) add_executable(test_jsoncpp_tgt main.cxx)

View File

@ -401,6 +401,8 @@ Configuration:
--no-system-curl use cmake-provided curl library (default) --no-system-curl use cmake-provided curl library (default)
--system-expat use system-installed expat library --system-expat use system-installed expat library
--no-system-expat use cmake-provided expat library (default) --no-system-expat use cmake-provided expat library (default)
--system-jsoncpp use system-installed jsoncpp library
--no-system-jsoncpp use cmake-provided jsoncpp library (default)
--system-zlib use system-installed zlib library --system-zlib use system-installed zlib library
--no-system-zlib use cmake-provided zlib library (default) --no-system-zlib use cmake-provided zlib library (default)
--system-bzip2 use system-installed bzip2 library --system-bzip2 use system-installed bzip2 library
@ -640,10 +642,10 @@ while test $# != 0; do
--init=*) cmake_init_file=`cmake_arg "$1"` ;; --init=*) cmake_init_file=`cmake_arg "$1"` ;;
--system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;; --system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;;
--no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;; --no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;;
--system-bzip2|--system-curl|--system-expat|--system-libarchive|--system-zlib) --system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-zlib)
lib=`cmake_arg "$1" "--system-"` lib=`cmake_arg "$1" "--system-"`
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;; cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;;
--no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-libarchive|--no-system-zlib) --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-zlib)
lib=`cmake_arg "$1" "--no-system-"` lib=`cmake_arg "$1" "--no-system-"`
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;; cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;;
--qt-gui) cmake_bootstrap_qt_gui="1" ;; --qt-gui) cmake_bootstrap_qt_gui="1" ;;