[mapguide-commits] r9825 - in sandbox/jng/vanilla_swig: . Oem/jsoncpp
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Dec 9 03:35:29 PST 2020
Author: jng
Date: 2020-12-09 03:35:29 -0800 (Wed, 09 Dec 2020)
New Revision: 9825
Added:
sandbox/jng/vanilla_swig/Oem/jsoncpp/CMakeLists.txt
Modified:
sandbox/jng/vanilla_swig/
sandbox/jng/vanilla_swig/cmake_bootstrap.sh
Log:
Merged revision(s) 9824 from trunk/MgDev:
Add a CMakeLists.txt to jsoncpp so we can build it with CMake instead of relying on scons, which it and/or Python has to be in a particular version range for the build to work. Also speed up common libs subset build by using the (undiscovered until now) --build-one flag in dbxml's buildall.sh to only build xerces and skip everything else
........
Index: sandbox/jng/vanilla_swig
===================================================================
--- sandbox/jng/vanilla_swig 2020-12-09 11:31:23 UTC (rev 9824)
+++ sandbox/jng/vanilla_swig 2020-12-09 11:35:29 UTC (rev 9825)
Property changes on: sandbox/jng/vanilla_swig
___________________________________________________________________
Modified: svn:mergeinfo
## -38,4 +38,5 ##
/sandbox/jng/v30:8212-8227
/sandbox/jng/v4:9511-9519
/sandbox/jng/wfs_hits:9569-9577
-/sandbox/rfc94:5099-5163
\ No newline at end of property
+/sandbox/rfc94:5099-5163
+/trunk/MgDev:9824
\ No newline at end of property
Copied: sandbox/jng/vanilla_swig/Oem/jsoncpp/CMakeLists.txt (from rev 9824, trunk/MgDev/Oem/jsoncpp/CMakeLists.txt)
===================================================================
--- sandbox/jng/vanilla_swig/Oem/jsoncpp/CMakeLists.txt (rev 0)
+++ sandbox/jng/vanilla_swig/Oem/jsoncpp/CMakeLists.txt 2020-12-09 11:35:29 UTC (rev 9825)
@@ -0,0 +1,15 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib_json
+)
+set(JsonCpp_SRCS
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib_json/json_reader.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib_json/json_value.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib_json/json_writer.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib_json/stdafx.cpp
+)
+add_library(lib_json SHARED ${JsonCpp_SRCS})
+# Pump the library out to ${CMAKE_CURRENT_SOURCE_DIR}/lib so that
+# our existing local jsoncpp detection script still works without modification
+set_target_properties(lib_json PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
\ No newline at end of file
Modified: sandbox/jng/vanilla_swig/cmake_bootstrap.sh
===================================================================
--- sandbox/jng/vanilla_swig/cmake_bootstrap.sh 2020-12-09 11:31:23 UTC (rev 9824)
+++ sandbox/jng/vanilla_swig/cmake_bootstrap.sh 2020-12-09 11:35:29 UTC (rev 9825)
@@ -290,9 +290,12 @@
echo "Building JsonCpp (internal)"
cp -Rf "${SOURCE_DIR}/Oem/jsoncpp" "${OEM_WORK_DIR}/jsoncpp"
cd "${OEM_WORK_DIR}/jsoncpp" || exit
- # Use system scons
- scons platform=linux-gcc
+ mkdir -p build
+ cd build || exit
+ cmake ..
check_build
+ make
+ check_build
fi
if [ "$INTERNAL_GEOS" = "1" ]; then
echo "Building GEOS (internal)"
@@ -350,31 +353,42 @@
echo "Has DBXML Library: $HAS_DBXML_LIB"
echo "Has XQilla Library: $HAS_XQILLA_LIB"
-# Even if building the common libs subset, xerces is wedded to the dbxml build script, so we have to build
-# the lot
-#
-# (Re)build DBXML if any of the above is false
-if test $HAS_DBXML_HEADERS -eq 0 -o $HAS_DBCXX_LIB -eq 0 -o $HAS_DBXML_LIB -eq 0 -o $HAS_XQILLA_LIB -eq 0; then
- echo "Re-building DBXML (${BUILD_CONFIG})"
+if [ "$COMMON_SUBSET_ONLY" == "1" ]; then
cp -Rf "${SOURCE_DIR}/Oem/dbxml" "${OEM_WORK_DIR}/dbxml"
cd "${OEM_WORK_DIR}/dbxml" || exit
- if test $HAVE_SYSTEM_XERCES -eq 1; then
- echo "Building DBXML with system-installed xerces. Please wait"
- if test "$BUILD_CONFIG" == Debug; then
- ./buildall.sh --enable-debug --with-xerces=/usr --have-system-xerces 2>&1 | tee "$OEM_WORK_DIR/dbxml_build.log"
- check_build
- else
- ./buildall.sh --with-xerces=/usr --have-system-xerces 2>&1 | tee "$OEM_WORK_DIR/dbxml_build.log"
- check_build
- fi
+ # The buildall.sh script supports a --build-one flag so we can only build xerces and skip everything else
+ echo "Building only xerces. Please wait"
+ if test "$BUILD_CONFIG" == Debug; then
+ ./buildall.sh --enable-debug --build-one=xerces 2>&1 | tee "$OEM_WORK_DIR/dbxml_build.log"
+ check_build
else
- echo "Building DBXML with internal copy of xerces. Please wait"
- if test "$BUILD_CONFIG" == Debug; then
- ./buildall.sh --enable-debug 2>&1 | tee "$OEM_WORK_DIR/dbxml_build.log"
- check_build
+ ./buildall.sh --build-one=xerces 2>&1 | tee "$OEM_WORK_DIR/dbxml_build.log"
+ check_build
+ fi
+else
+ # (Re)build DBXML if any of the above is false
+ if test $HAS_DBXML_HEADERS -eq 0 -o $HAS_DBCXX_LIB -eq 0 -o $HAS_DBXML_LIB -eq 0 -o $HAS_XQILLA_LIB -eq 0; then
+ echo "Re-building DBXML (${BUILD_CONFIG})"
+ cp -Rf "${SOURCE_DIR}/Oem/dbxml" "${OEM_WORK_DIR}/dbxml"
+ cd "${OEM_WORK_DIR}/dbxml" || exit
+ if test $HAVE_SYSTEM_XERCES -eq 1; then
+ echo "Building DBXML with system-installed xerces. Please wait"
+ if test "$BUILD_CONFIG" == Debug; then
+ ./buildall.sh --enable-debug --with-xerces=/usr --have-system-xerces 2>&1 | tee "$OEM_WORK_DIR/dbxml_build.log"
+ check_build
+ else
+ ./buildall.sh --with-xerces=/usr --have-system-xerces 2>&1 | tee "$OEM_WORK_DIR/dbxml_build.log"
+ check_build
+ fi
else
- ./buildall.sh 2>&1 | tee "$OEM_WORK_DIR/dbxml_build.log"
- check_build
+ echo "Building DBXML with internal copy of xerces. Please wait"
+ if test "$BUILD_CONFIG" == Debug; then
+ ./buildall.sh --enable-debug 2>&1 | tee "$OEM_WORK_DIR/dbxml_build.log"
+ check_build
+ else
+ ./buildall.sh 2>&1 | tee "$OEM_WORK_DIR/dbxml_build.log"
+ check_build
+ fi
fi
fi
fi
More information about the mapguide-commits
mailing list