[mapguide-commits] r9281 - in sandbox/jng/cmake_v2: . Oem
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Jan 5 06:39:01 PST 2018
Author: jng
Date: 2018-01-05 06:39:01 -0800 (Fri, 05 Jan 2018)
New Revision: 9281
Modified:
sandbox/jng/cmake_v2/CMakeLists.txt
sandbox/jng/cmake_v2/Oem/CMakeLists.txt
Log:
Add external project configuration for dbxml and rework external project configuration for httpd
Modified: sandbox/jng/cmake_v2/CMakeLists.txt
===================================================================
--- sandbox/jng/cmake_v2/CMakeLists.txt 2018-01-05 13:38:38 UTC (rev 9280)
+++ sandbox/jng/cmake_v2/CMakeLists.txt 2018-01-05 14:39:01 UTC (rev 9281)
@@ -70,7 +70,7 @@
set(LIB_INSTALL_DIR "${relbase}lib${LIB_SUFFIX}")
set(BIN_INSTALL_DIR "${relbase}bin")
endif(UNIX)
-endmacro(set_lib_install_dir)
+endmacro(set_install_subdir)
if(UNIX)
add_definitions(-DFULLPROTO -fPIC -DPIC)
Modified: sandbox/jng/cmake_v2/Oem/CMakeLists.txt
===================================================================
--- sandbox/jng/cmake_v2/Oem/CMakeLists.txt 2018-01-05 13:38:38 UTC (rev 9280)
+++ sandbox/jng/cmake_v2/Oem/CMakeLists.txt 2018-01-05 14:39:01 UTC (rev 9281)
@@ -1,31 +1,61 @@
+# ExternalProject configuration for dbxml
-set(LinuxApt_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/LinuxApt")
+# Copy source to build area
+message (STATUS "Preparing dbxml source for build")
+file(COPY "dbxml" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/DbXml_Build)
+
+# NOTE: Although Ubuntu (and possibly other distros) provide packages for xerces, xqilla, (berkeley) db
+# only xerces is the package that I am confident of getting dbxml to build against instead of having it
+# build its private copy
+# NOTE: Assumes system xerces is installed. Should adjust parameters based on find_package result for XercesC
+set(DbXml_WORKDIR "${CMAKE_CURRENT_BINARY_DIR}/DbXml_Build/dbxml")
+ExternalProject_Add(dbxml
+ DOWNLOAD_COMMAND ""
+ SOURCE_DIR ${DbXml_WORKDIR}
+ CONFIGURE_COMMAND ""
+ INSTALL_COMMAND ""
+ BUILD_COMMAND ${CMAKE_COMMAND} -E chdir ${DbXml_WORKDIR} ./buildall.sh --with-xerces=/usr --have-system-xerces
+ BUILD_IN_SOURCE 0
+)
+# This sounds dirty, but we need to communicate back to projects that use dbxml (in a different dir) where
+# the dbxml headers are
+set(MG_OEM_DBXML_INCLUDE_DIR "${DbXml_WORKDIR}/install/include" PARENT_SCOPE)
+set(MG_OEM_DBXML_LIB_DIR "${DbXml_WORKDIR}/install/lib" PARENT_SCOPE)
+
+# ExternalProject configuration for LinuxApt
set(HTTPD_VER 2.4.18)
set(TOMCAT_VER 7.0.68)
set(CONNECTOR_VER 1.2.41)
-set(LinuxAptHttpd_WORKDIR "${CMAKE_CURRENT_BINARY_DIR}/LinuxApt_Build/httpd")
+set(LinuxApt_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/LinuxApt")
+set(LinuxAptHttpd_WORKDIR_ROOT "${CMAKE_CURRENT_BINARY_DIR}/LinuxApt_Build/httpd")
+set(LinuxAptHttpd_WORKDIR "${LinuxAptHttpd_WORKDIR_ROOT}/httpd-${HTTPD_VER}")
+
+# Extract tarballs to build area
+if (NOT EXISTS ${LinuxAptHttpd_WORKDIR})
+ message (STATUS "Preparing httpd source for build")
+ file(MAKE_DIRECTORY ${LinuxAptHttpd_WORKDIR})
+ execute_process(COMMAND tar -jxf ${LinuxApt_SOURCE}/httpd-${HTTPD_VER}.tar.bz2 WORKING_DIRECTORY ${LinuxAptHttpd_WORKDIR_ROOT})
+ execute_process(COMMAND tar -jxf ${LinuxApt_SOURCE}/httpd-${HTTPD_VER}-deps.tar.bz2 WORKING_DIRECTORY ${LinuxAptHttpd_WORKDIR_ROOT})
+else (NOT EXISTS ${LinuxAptHttpd_WORKDIR})
+ message (STATUS "httpd source already prepared at: ${LinuxAptHttpd_WORKDIR}")
+endif (NOT EXISTS ${LinuxAptHttpd_WORKDIR})
+
ExternalProject_Add(httpd
- STAMP_DIR ${LinuxAptHttpd_WORKDIR}
- DOWNLOAD_DIR ${LinuxAptHttpd_WORKDIR}
- DOWNLOAD_COMMAND
- COMMAND tar -jxf ${LinuxApt_SOURCE}/httpd-${HTTPD_VER}.tar.bz2
- COMMAND tar -jxf ${LinuxApt_SOURCE}/httpd-${HTTPD_VER}-deps.tar.bz2
- PREFIX ${LinuxAptHttpd_WORKDIR}
+ DOWNLOAD_COMMAND ""
SOURCE_DIR ${LinuxAptHttpd_WORKDIR}
- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir ${LinuxAptHttpd_WORKDIR}/httpd-${HTTPD_VER} ./configure --prefix=${CMAKE_INSTALL_PREFIX}/webserverextensions/apache2 --enable-mods-shared-all --with-included-apr --with-port=${MG_HTTPD_PORT}
- BUILD_COMMAND ${CMAKE_COMMAND} -E chdir ${LinuxAptHttpd_WORKDIR}/httpd-${HTTPD_VER} make
INSTALL_COMMAND ""
- #INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir ${LinuxAptHttpd_WORKDIR}/httpd-${HTTPD_VER} make install
+ CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> ./configure --prefix=${CMAKE_INSTALL_PREFIX}/webserverextensions/apache2 --enable-mods-shared-all --with-included-apr --with-port=${MG_HTTPD_PORT}
+ BUILD_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> make
BUILD_IN_SOURCE 0
)
-#This sounds dirty, but we need to communicate back to ApacheAgent (in a different dir) where
-#the httpd headers are
+# This sounds dirty, but we need to communicate back to projects that use httpd (in a different dir) where
+# the httpd headers are
set(MG_OEM_HTTPD_SOURCE_DIR "${LinuxAptHttpd_WORKDIR}/httpd-${HTTPD_VER}" PARENT_SCOPE)
-#TODO: We have geos in-tree, which is CMake-enabled, so if required we can use
-#the internal copy of geos if required through an option like INTERNAL_GEOS
-#at the moment, we are just using the system-provided version of GEOS
+# TODO: We have geos in-tree, which is CMake-enabled, so if required we can use
+# the internal copy of geos if required through an option like INTERNAL_GEOS
+# at the moment, we are just using the system-provided version of GEOS
#set(GEOS_ENABLE_TESTS OFF)
#add_subdirectory(geos)
add_subdirectory(DWFTK)
More information about the mapguide-commits
mailing list