From: <ai...@us...> - 2013-12-01 01:06:01
|
Revision: 12785 http://sourceforge.net/p/plplot/code/12785 Author: airwin Date: 2013-12-01 01:05:55 +0000 (Sun, 01 Dec 2013) Log Message: ----------- Initial commit of xmlcatalog-wrapper configuration which was inadvertently not added to the svn repository. Added Paths: ----------- trunk/cmake/epa_build/xmlcatalog-wrapper/ trunk/cmake/epa_build/xmlcatalog-wrapper/CMakeLists.txt trunk/cmake/epa_build/xmlcatalog-wrapper/bp.cmake trunk/cmake/epa_build/xmlcatalog-wrapper/filter_arguments.cmake trunk/cmake/epa_build/xmlcatalog-wrapper/xmlcatalog-wrapper.sh.in Added: trunk/cmake/epa_build/xmlcatalog-wrapper/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/xmlcatalog-wrapper/CMakeLists.txt (rev 0) +++ trunk/cmake/epa_build/xmlcatalog-wrapper/CMakeLists.txt 2013-12-01 01:05:55 UTC (rev 12785) @@ -0,0 +1,60 @@ +# Top-level CMakeLists.txt for the CMake-based build system +# of the xmlcatalog-wrapper software. + +# Copyright (C) 2013 Alan W. Irwin + +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this file; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# This project is one method of beating the argument mangling issue +# for xmlcatalog when xmlcatalog is run directly from a shell (such +# as bash.exe) which is linked to the MSYS runtime. +project(xmlcatalog-wrapper NONE) + +message(STATUS "CMake version = ${CMAKE_VERSION}") +message(STATUS "CMAKE_SYSTEM_NAME = ${CMAKE_SYSTEM_NAME}") + +cmake_minimum_required(VERSION 2.8.10.2 FATAL_ERROR) + +# Do nothing unless WIN32 AND NOT CYGWIN +# Jury is still out whether this is required for Cygwin, but I +# presume not until proven otherwise. + +if(WIN32 AND NOT CYGWIN) + # Configure xmlcatalog-wrapper.sh.in to xmlcatalog and install it. + # The xmlcatalog name of the configured script does not clash with + # the name of the executable xmlcatalog.exe on Windows platforms and + # will be executed in preference to xmlcatalog.exe whenever an + # autotools configure script or other shell environment runs the + # command "xmlcatalog". + set(XMLCATALOG_EXECUTABLE ${CMAKE_INSTALL_PREFIX}/bin/xmlcatalog.exe) + set(FILTER_ARGUMENTS_SCRIPT_LOCATION ${CMAKE_INSTALL_PREFIX}/share/xmlcatalog-wrapper/filter_arguments.cmake) + configure_file( + ${CMAKE_SOURCE_DIR}/xmlcatalog-wrapper.sh.in + ${CMAKE_BINARY_DIR}/xmlcatalog + @ONLY + ) + + # Use relative (to CMAKE_INSTALL_PREFIX) installation locations + # which must be consistent with the above XMLCATALOG_EXECUTABLE + # and FILTER_ARGUMENTS_SCRIPT_LOCATION variables. + install( + PROGRAMS ${CMAKE_BINARY_DIR}/xmlcatalog + DESTINATION bin + ) + install( + FILES ${CMAKE_SOURCE_DIR}/filter_arguments.cmake + DESTINATION share/xmlcatalog-wrapper + ) + +endif(WIN32 AND NOT CYGWIN) Property changes on: trunk/cmake/epa_build/xmlcatalog-wrapper/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/cmake/epa_build/xmlcatalog-wrapper/bp.cmake =================================================================== --- trunk/cmake/epa_build/xmlcatalog-wrapper/bp.cmake (rev 0) +++ trunk/cmake/epa_build/xmlcatalog-wrapper/bp.cmake 2013-12-01 01:05:55 UTC (rev 12785) @@ -0,0 +1,88 @@ +# xmlcatalog-wrapper/bp.cmake +# This file should be included directly or indirectly from a top-level +# CMakeLists.txt file to configure the build of xmlcatalog-wrapper. + +# Copyright (C) 2013 Alan W. Irwin + +# This file is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with this file; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# The top-level CMakeLists.txt file that includes this file should +# have run "include(ExternalProject)" and set EP_BASE variable (and +# corresponding directory property) as well as various BP variables +# used below that configure how the External_Project functions +# operate. + +# Protect against configuring a build twice in one CMake call +if(xmlcatalog-wrapper_configured) + return() +endif(xmlcatalog-wrapper_configured) +set(xmlcatalog-wrapper_configured ON) + +# List of dependencies (most of which are build tools) which should be +# ignored. +set(BP_ignored_dependencies_LIST pkg-config;bison;flex;python2-devel;libXft ${extra_ignored_dependencies_list}) + +set(xmlcatalog-wrapper_dependencies_LIST) +# Remove dependencies that should be ignored. +if(xmlcatalog-wrapper_dependencies_LIST) + list(REMOVE_ITEM xmlcatalog-wrapper_dependencies_LIST ${BP_ignored_dependencies_LIST}) +endif(xmlcatalog-wrapper_dependencies_LIST) + +set(xmlcatalog-wrapper_dependencies_targets) +foreach(build_configuration ${xmlcatalog-wrapper_dependencies_LIST}) + if(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) + include(${build_configuration}/bp.cmake) + list(APPEND xmlcatalog-wrapper_dependencies_targets build_${build_configuration}) + else(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) + message(STATUS "Warning: A build_configuration for ${build_configuration} does not exist so it is assumed this dependency of xmlcatalog-wrapper has been installed another way.") + endif(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) +endforeach(build_configuration ${xmlcatalog-wrapper_dependences_LIST}) + +# This can be safely done only after above includes. +set(BP_PACKAGE xmlcatalog-wrapper) + +# Data that is related to downloads. +# This directory is the source directory +set(${BP_PACKAGE}_URL ${CMAKE_SOURCE_DIR}/xmlcatalog-wrapper) + +# Data that is related to the PATH that must be used. +if(MSYS_PLATFORM) + #set(BP_PATH_NODLL "${BP_PATH}") + #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}") + determine_msys_path(BP_PATH "${BP_PATH}") + # Must have all elements of env command in MSYS platform form + determine_msys_path(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}") + set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}") +else(MSYS_PLATFORM) + set(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}") + set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}") +endif(MSYS_PLATFORM) +#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}") + +ExternalProject_Add( + build_${BP_PACKAGE} + DEPENDS ${${BP_PACKAGE}_dependencies_targets} + URL ${${BP_PACKAGE}_URL} + #URL_HASH ${${BP_PACKAGE}_DOWNLOAD_HASH_TYPE}=${${BP_PACKAGE}_DOWNLOAD_HASH} + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE} + BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} + BUILD_IN_SOURCE OFF + INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install + ) + +list(APPEND build_target_LIST build_${BP_PACKAGE}) +# Restore BP_PATH to original state. +set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}") +#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}") Added: trunk/cmake/epa_build/xmlcatalog-wrapper/filter_arguments.cmake =================================================================== --- trunk/cmake/epa_build/xmlcatalog-wrapper/filter_arguments.cmake (rev 0) +++ trunk/cmake/epa_build/xmlcatalog-wrapper/filter_arguments.cmake 2013-12-01 01:05:55 UTC (rev 12785) @@ -0,0 +1,8 @@ +execute_process( + COMMAND ${executable} ${argument_list} + RESULT_VARIABLE return_code + ) + +if(NOT return_code EQUAL 0) + message(FATAL_ERROR "${executable} returned return_code = ${return_code}") +endif(NOT return_code EQUAL 0) Added: trunk/cmake/epa_build/xmlcatalog-wrapper/xmlcatalog-wrapper.sh.in =================================================================== --- trunk/cmake/epa_build/xmlcatalog-wrapper/xmlcatalog-wrapper.sh.in (rev 0) +++ trunk/cmake/epa_build/xmlcatalog-wrapper/xmlcatalog-wrapper.sh.in 2013-12-01 01:05:55 UTC (rev 12785) @@ -0,0 +1,5 @@ +#!/bin/bash +# Prepare bash argument_list variable as a semicolon-separated CMake list +# of the arguments to this script. +IFS=';' +cmake -Dexecutable:FILEPATH=@XMLCATALOG_EXECUTABLE@ -Dargument_list:STRING="$*" -P @FILTER_ARGUMENTS_SCRIPT_LOCATION@ \ No newline at end of file Property changes on: trunk/cmake/epa_build/xmlcatalog-wrapper/xmlcatalog-wrapper.sh.in ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |