From: <pat...@us...> - 2012-07-30 15:14:28
|
Revision: 703 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=703&view=rev Author: patrickh Date: 2012-07-30 15:14:17 +0000 (Mon, 30 Jul 2012) Log Message: ----------- Merge the following changes from the trunk: r698: Remove empty directories. r699: Generate verison.h based on the version information from the CMake scripts. This officially breaks the SCons build. r700: Correct the usage of lib and lib64 based on the build type. r701: Correct the usage of lib and lib64 based on the build type. r702: Only install SpiritParser.h if it is built into the library. r703: Add cppdom-config back into the install target. Submitted by: Doug McCorkle Revision Links: -------------- http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=698&view=rev http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=699&view=rev http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=700&view=rev http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=701&view=rev http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=702&view=rev http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=703&view=rev Modified Paths: -------------- branches/1.2/CMakeLists.txt branches/1.2/cppdom/CMakeLists.txt Added Paths: ----------- branches/1.2/cppdom/version.h.in Removed Paths: ------------- branches/1.2/cmake/cmake-2.8.0-modules/ branches/1.2/cmake/cmake-2.8.1-modules/ branches/1.2/cmake/cmake-2.8.3-modules/ branches/1.2/cmake/cmake-2.8.4-modules/ branches/1.2/cmake/cmake-2.9.0-modules/ branches/1.2/cmake/ghost-fake-stl/ branches/1.2/cmake/launcher-templates/ branches/1.2/cmake/module-docs/ branches/1.2/cmake/nested_targets/ branches/1.2/cmake/package/ branches/1.2/cmake/package-licensing/ branches/1.2/cmake/workarounds/ branches/1.2/cppdom/version.h Modified: branches/1.2/CMakeLists.txt =================================================================== --- branches/1.2/CMakeLists.txt 2012-07-30 15:05:22 UTC (rev 702) +++ branches/1.2/CMakeLists.txt 2012-07-30 15:14:17 UTC (rev 703) @@ -14,19 +14,28 @@ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") set(VERSION_UNDERSCORES "${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}_${CPACK_PACKAGE_VERSION_PATCH}") + ### # Set up options ### +# TODO this is not ideal/complete +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(arch "x86_64") + set(ARCH_DIR lib64) +else() + set(arch "x86") + set(ARCH_DIR lib) +endif() + # Define directories set(BIN_DIR bin) -set(ARCH_DIR lib) set(FLAGPOLL_INFO_DIR share/flagpoll) if(WIN32) set(LIB_DIR bin) set(INCLUDE_DIR include) else() - set(LIB_DIR lib) + set(LIB_DIR ${ARCH_DIR}) set(INCLUDE_DIR include/cppdom-${CPACK_PACKAGE_VERSION}) endif() @@ -37,12 +46,7 @@ set(exec_prefix "\${prefix}") set(includedir "\${fp_file_cwd}/../../${INCLUDE_DIR}") set(libdir "\${fp_file_cwd}/../../${LIB_DIR}") -# TODO this is not ideal/complete -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(arch "x86_64") -else() - set(arch "x86") -endif() + if(CMAKE_COMPILER_IS_GNUCXX) set(cppdom_cxxflags "-Wno-deprecated") set(include_path_flag "-I") @@ -60,6 +64,10 @@ DESTINATION ${FLAGPOLL_INFO_DIR} COMPONENT Development) +install(FILES cppdom-config + DESTINATION ${BIN_DIR} + COMPONENT Development) + ### # Perform build configuration of dependencies ### Modified: branches/1.2/cppdom/CMakeLists.txt =================================================================== --- branches/1.2/cppdom/CMakeLists.txt 2012-07-30 15:05:22 UTC (rev 702) +++ branches/1.2/cppdom/CMakeLists.txt 2012-07-30 15:14:17 UTC (rev 703) @@ -2,13 +2,16 @@ # 2009-2011 Ryan Pavlik <rp...@ia...> # http://academic.cleardefinition.com/ # Iowa State University HCI Graduate Program/VRAC +set(CPPDOM_VERSION_MAJOR "${CPACK_PACKAGE_VERSION_MAJOR}") +set(CPPDOM_VERSION_MINOR "${CPACK_PACKAGE_VERSION_MINOR}") +set(CPPDOM_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}") +configure_file(version.h.in "${CMAKE_CURRENT_SOURCE_DIR}/version.h" @ONLY) set(API config.h cppdom.h predicates.h shared_ptr.h - SpiritParser.h xmlparser.h xmltokenizer.h version.h) @@ -23,6 +26,7 @@ if(BOOST_FOUND) include_directories(${Boost_INCLUDE_DIRS}) list(APPEND SOURCES SpiritParser.cpp) + list(APPEND API SpiritParser.h) endif() add_definitions(-DCPPDOM_EXPORTS) Deleted: branches/1.2/cppdom/version.h =================================================================== --- branches/1.2/cppdom/version.h 2012-07-30 15:05:22 UTC (rev 702) +++ branches/1.2/cppdom/version.h 2012-07-30 15:14:17 UTC (rev 703) @@ -1,139 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil c-basic-offset: 3 -*- */ -// vim:cindent:ts=3:sw=3:et:tw=80:sta: -/*************************************************************** cppdom-cpr beg - * - * cppdom was forked from the original xmlpp version 0.6 under the LGPL. This - * new, branched xmlpp is under the same LGPL (of course) and is being - * maintained by: - * Kevin Meinert <sub...@us...> - * Allen Bierbaum <al...@us...> - * Ben Scott <non...@us...> - * - * ----------------------------------------------------------------- - * - * xmlpp - an xml parser and validator written in C++ - * copyright (c) 2000-2001 Michael Fink - * - * This library 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; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * ----------------------------------------------------------------- - * File: $RCSfile$ - * Date modified: $Date$ - * Version: $Revision$ - * ----------------------------------------------------------------- - * - ************************************************************ cppdom-cpr-end */ -#ifndef CPPDOM_VERSION_H -#define CPPDOM_VERSION_H - -/** @file version.h - * This file contains two useful items. - * - 1. The preprocessor friendly CPPDOM_VERSION "string". It is in the form - * <major><minor><patch> where each part has exactly 3 digits. - * - 2. The C++ friendly variable, version, that contains the version as a - * string. It is in the form of <major>.<minor>.<patch> where each part - * has anywhere from 1 to 3 digits. - */ - -/** - * This is the "human-readable" CPPDOM version _string_. It is of the form - * <major><minor><patch>. Each part has exactly 3 digits. - */ -// The major/minor/patch version (up to 3 digits each). -#define CPPDOM_VERSION_MAJOR 1 -#define CPPDOM_VERSION_MINOR 2 -#define CPPDOM_VERSION_PATCH 0 - -//-------------------------------------------------------------------------- -//-------------------------------------------------------------------------- -// To update the version number, do not modify anything below this line!!!! -//-------------------------------------------------------------------------- -//-------------------------------------------------------------------------- - - -//-------------------------------------------------------------------------- -// Define the helper macros -//-------------------------------------------------------------------------- - -// These helper macros are used build up the CPPDOM_VERSION macro -#define CPPDOM_GLUE(a,b) a ## b -#define CPPDOM_XGLUE(a,b) CPPDOM_GLUE(a,b) - -// These helpr macros are used to facilitate a zero left fill -#define CPPDOM_ZEROFILL(a) 0 ## a -#define CPPDOM_XZEROFILL(a) CPPDOM_ZEROFILL(a) - -// Fix up the major version by doing a zero left fill -#if CPPDOM_VERSION_MAJOR < 10 -# define CPPDOM_VERSION_MAJOR_FILLED \ - CPPDOM_XZEROFILL(CPPDOM_XZEROFILL(CPPDOM_VERSION_MAJOR)) -#elif CPPDOM_VERSION_MAJOR < 100 -# define CPPDOM_VERSION_MAJOR_FILLED CPPDOM_XZEROFILL(CPPDOM_VERSION_MAJOR) -#else -# define CPPDOM_VERSION_MAJOR_FILLED CPPDOM_VERSION_MAJOR -#endif - -// Fix up the minor version by doing a zero left fill -#if CPPDOM_VERSION_MINOR < 10 -# define CPPDOM_VERSION_MINOR_FILLED \ - CPPDOM_XZEROFILL(CPPDOM_XZEROFILL(CPPDOM_VERSION_MINOR)) -#elif CPPDOM_VERSION_MINOR < 100 -# define CPPDOM_VERSION_MINOR_FILLED CPPDOM_XZEROFILL(CPPDOM_VERSION_MINOR) -#else -# define CPPDOM_VERSION_MINOR_FILLED CPPDOM_VERSION_MINOR -#endif - -// Fix up the patch version by doing a zero left fill -#if CPPDOM_VERSION_PATCH < 10 -# define CPPDOM_VERSION_PATCH_FILLED \ - CPPDOM_XZEROFILL(CPPDOM_XZEROFILL(CPPDOM_VERSION_PATCH)) -#elif CPPDOM_VERSION_PATCH < 100 -# define CPPDOM_VERSION_PATCH_FILLED CPPDOM_XZEROFILL(CPPDOM_VERSION_PATCH) -#else -# define CPPDOM_VERSION_PATCH_FILLED CPPDOM_VERSION_PATCH -#endif - -//-------------------------------------------------------------------------- -// Define the CPPDOM_VERSION macro -//-------------------------------------------------------------------------- - -// Build up the CPPDOM_VERSION macro by pasting the individual parts together -/** - * The is the preprocessor-friendly version string. It is in the form of - * <major><minor><patch>. Each part has exactly 3 digits. - */ -#define CPPDOM_VERSION \ - CPPDOM_XGLUE( \ - CPPDOM_XGLUE(CPPDOM_VERSION_MAJOR_FILLED, CPPDOM_VERSION_MINOR_FILLED), \ - CPPDOM_VERSION_PATCH_FILLED \ - ) - -//-------------------------------------------------------------------------- -// Cleanup after ourselves and undef all internal macros. -//-------------------------------------------------------------------------- - -// Undef the all helper macros -#undef CPPDOM_XGLUE -#undef CPPDOM_GLUE -#undef CPPDOM_ZEROFILL -#undef CPPDOM_XZEROFILL - -// Undef the XXX_FILLED temporary macros -#undef CPPDOM_VERSION_MAJOR_FILLED -#undef CPPDOM_VERSION_MINOR_FILLED -#undef CPPDOM_VERSION_PATCH_FILLED - -#endif Copied: branches/1.2/cppdom/version.h.in (from rev 702, trunk/cppdom/version.h.in) =================================================================== --- branches/1.2/cppdom/version.h.in (rev 0) +++ branches/1.2/cppdom/version.h.in 2012-07-30 15:14:17 UTC (rev 703) @@ -0,0 +1,139 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil c-basic-offset: 3 -*- */ +// vim:cindent:ts=3:sw=3:et:tw=80:sta: +/*************************************************************** cppdom-cpr beg + * + * cppdom was forked from the original xmlpp version 0.6 under the LGPL. This + * new, branched xmlpp is under the same LGPL (of course) and is being + * maintained by: + * Kevin Meinert <sub...@us...> + * Allen Bierbaum <al...@us...> + * Ben Scott <non...@us...> + * + * ----------------------------------------------------------------- + * + * xmlpp - an xml parser and validator written in C++ + * copyright (c) 2000-2001 Michael Fink + * + * This library 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; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * ----------------------------------------------------------------- + * File: $RCSfile$ + * Date modified: $Date: 2011-05-01 11:07:55 -0500 (Sun, 01 May 2011) $ + * Version: $Revision: 683 $ + * ----------------------------------------------------------------- + * + ************************************************************ cppdom-cpr-end */ +#ifndef CPPDOM_VERSION_H +#define CPPDOM_VERSION_H + +/** @file version.h + * This file contains two useful items. + * - 1. The preprocessor friendly CPPDOM_VERSION "string". It is in the form + * <major><minor><patch> where each part has exactly 3 digits. + * - 2. The C++ friendly variable, version, that contains the version as a + * string. It is in the form of <major>.<minor>.<patch> where each part + * has anywhere from 1 to 3 digits. + */ + +/** + * This is the "human-readable" CPPDOM version _string_. It is of the form + * <major><minor><patch>. Each part has exactly 3 digits. + */ +// The major/minor/patch version (up to 3 digits each). +#define CPPDOM_VERSION_MAJOR @CPPDOM_VERSION_MAJOR@ +#define CPPDOM_VERSION_MINOR @CPPDOM_VERSION_MINOR@ +#define CPPDOM_VERSION_PATCH @CPPDOM_VERSION_PATCH@ + +//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- +// To update the version number, do not modify anything below this line!!!! +//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- + + +//-------------------------------------------------------------------------- +// Define the helper macros +//-------------------------------------------------------------------------- + +// These helper macros are used build up the CPPDOM_VERSION macro +#define CPPDOM_GLUE(a,b) a ## b +#define CPPDOM_XGLUE(a,b) CPPDOM_GLUE(a,b) + +// These helpr macros are used to facilitate a zero left fill +#define CPPDOM_ZEROFILL(a) 0 ## a +#define CPPDOM_XZEROFILL(a) CPPDOM_ZEROFILL(a) + +// Fix up the major version by doing a zero left fill +#if CPPDOM_VERSION_MAJOR < 10 +# define CPPDOM_VERSION_MAJOR_FILLED \ + CPPDOM_XZEROFILL(CPPDOM_XZEROFILL(CPPDOM_VERSION_MAJOR)) +#elif CPPDOM_VERSION_MAJOR < 100 +# define CPPDOM_VERSION_MAJOR_FILLED CPPDOM_XZEROFILL(CPPDOM_VERSION_MAJOR) +#else +# define CPPDOM_VERSION_MAJOR_FILLED CPPDOM_VERSION_MAJOR +#endif + +// Fix up the minor version by doing a zero left fill +#if CPPDOM_VERSION_MINOR < 10 +# define CPPDOM_VERSION_MINOR_FILLED \ + CPPDOM_XZEROFILL(CPPDOM_XZEROFILL(CPPDOM_VERSION_MINOR)) +#elif CPPDOM_VERSION_MINOR < 100 +# define CPPDOM_VERSION_MINOR_FILLED CPPDOM_XZEROFILL(CPPDOM_VERSION_MINOR) +#else +# define CPPDOM_VERSION_MINOR_FILLED CPPDOM_VERSION_MINOR +#endif + +// Fix up the patch version by doing a zero left fill +#if CPPDOM_VERSION_PATCH < 10 +# define CPPDOM_VERSION_PATCH_FILLED \ + CPPDOM_XZEROFILL(CPPDOM_XZEROFILL(CPPDOM_VERSION_PATCH)) +#elif CPPDOM_VERSION_PATCH < 100 +# define CPPDOM_VERSION_PATCH_FILLED CPPDOM_XZEROFILL(CPPDOM_VERSION_PATCH) +#else +# define CPPDOM_VERSION_PATCH_FILLED CPPDOM_VERSION_PATCH +#endif + +//-------------------------------------------------------------------------- +// Define the CPPDOM_VERSION macro +//-------------------------------------------------------------------------- + +// Build up the CPPDOM_VERSION macro by pasting the individual parts together +/** + * The is the preprocessor-friendly version string. It is in the form of + * <major><minor><patch>. Each part has exactly 3 digits. + */ +#define CPPDOM_VERSION \ + CPPDOM_XGLUE( \ + CPPDOM_XGLUE(CPPDOM_VERSION_MAJOR_FILLED, CPPDOM_VERSION_MINOR_FILLED), \ + CPPDOM_VERSION_PATCH_FILLED \ + ) + +//-------------------------------------------------------------------------- +// Cleanup after ourselves and undef all internal macros. +//-------------------------------------------------------------------------- + +// Undef the all helper macros +#undef CPPDOM_XGLUE +#undef CPPDOM_GLUE +#undef CPPDOM_ZEROFILL +#undef CPPDOM_XZEROFILL + +// Undef the XXX_FILLED temporary macros +#undef CPPDOM_VERSION_MAJOR_FILLED +#undef CPPDOM_VERSION_MINOR_FILLED +#undef CPPDOM_VERSION_PATCH_FILLED + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |