8 added files
gdml2/CPPGDML
diff -N CMakeLists.txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ CMakeLists.txt 10 Apr 2013 20:36:42 -0000 1.1
@@ -0,0 +1,89 @@
+#
+# CMake configuration for GDML package.
+#
+# FIXME: Currently does not build the examples.
+#
+# @author Jeremy McCormick <[log in to unmask]>
+#
+
+# minimum cmake version
+CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
+
+# project name
+PROJECT( GDML )
+
+# project version
+SET( GDML_VERSION_MAJOR 3 )
+SET( GDML_VERSION_MINOR 0 )
+SET( GDML_VERSION_PATCH 0 )
+
+# add path containing CMake macros for this project
+LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
+
+# macro for generating configuration output
+INCLUDE( MacroGeneratePackageConfigFiles )
+
+# find Xerces C++
+find_package ( XERCES REQUIRED )
+
+# error if no Xerces
+IF( NOT XERCES_FOUND )
+ MESSAGE( FATAL_ERROR "Xerces was not found! Define XERCES_DIR when calling cmake." )
+ENDIF()
+
+# Find Geant4
+find_package(Geant4 REQUIRED)
+if ( NOT Geant4_FOUND )
+ MESSAGE( FATAL_ERROR "Geant4 was not found! Define Geant4_DIR when calling cmake." )
+ELSE()
+ MESSAGE( STATUS "Found Geant4: ${Geant4_DIR}" )
+ENDIF()
+
+# make a list of source directories
+SET( library_source_dirs
+ ${PROJECT_SOURCE_DIR}/Common/Processes
+ ${PROJECT_SOURCE_DIR}/Common/Saxana
+ ${PROJECT_SOURCE_DIR}/Common/Schema
+ ${PROJECT_SOURCE_DIR}/Common/Writer
+ ${PROJECT_SOURCE_DIR}/G4Binding/G4Evaluator
+ ${PROJECT_SOURCE_DIR}/G4Binding/G4Processor
+ ${PROJECT_SOURCE_DIR}/G4Binding/G4Subscribers
+ ${PROJECT_SOURCE_DIR}/G4Binding/G4Writer
+)
+
+#MESSAGE( STATUS "library_source_dirs=${library_source_dirs}" )
+
+#FOREACH( _src ${library_source_dirs} )
+# MESSAGE( STATUS "src=${_src}")
+#ENDFOREACH()
+
+# macro for collating sources
+macro(GDML_COLLATE_APPLICATION_SOURCES source_dest_var source_dir )
+ FILE( GLOB_RECURSE local_source ${source_dir}/src/*.cpp )
+ LIST( APPEND ${source_dest_var} ${local_source} )
+ INCLUDE_DIRECTORIES( ${source_dir} )
+endmacro()
+
+# add application sources and include directories
+FOREACH( src ${library_source_dirs} )
+ GDML_COLLATE_APPLICATION_SOURCES( library_sources ${src} )
+ENDFOREACH()
+
+# default compilation flags
+ADD_DEFINITIONS( "-Wall -ansi -pedantic" )
+ADD_DEFINITIONS( "-Wno-long-long" )
+
+# additional compilation flags
+ADD_DEFINITIONS(${Geant4_DEFINITIONS})
+
+# include directories
+INCLUDE_DIRECTORIES( ${XERCES_INCLUDE_DIR} ${Geant4_INCLUDE_DIRS} )
+
+# libraries
+LINK_LIBRARIES( ${XERCES_LIBRARIES} ${Geant4_LIBRARIES} )
+
+# output shared library
+ADD_LIBRARY( gdml SHARED ${library_sources} )
+
+# generate package configuration
+GENERATE_PACKAGE_CONFIGURATION_FILES( GDMLConfig.cmake GDMLConfigVersion.cmake GDMLLibDeps.cmake )
\ No newline at end of file
gdml2/CPPGDML/cmake
diff -N FindPackageHandleStandardArgs.cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ FindPackageHandleStandardArgs.cmake 10 Apr 2013 20:36:42 -0000 1.1
@@ -0,0 +1,58 @@
+# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... )
+# This macro is intended to be used in FindXXX.cmake modules files.
+# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and
+# it also sets the <UPPERCASED_NAME>_FOUND variable.
+# The package is found if all variables listed are TRUE.
+# Example:
+#
+# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
+#
+# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and
+# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
+# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
+# independent whether QUIET was used or not.
+# If it is found, the location is reported using the VAR1 argument, so
+# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out.
+# If the second argument is DEFAULT_MSG, the message in the failure case will
+# be "Could NOT find LibXml2", if you don't like this message you can specify
+# your own custom failure message there.
+
+MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
+
+ IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
+ IF (${_NAME}_FIND_REQUIRED)
+ SET(_FAIL_MESSAGE "Could not find REQUIRED package ${_NAME}")
+ ELSE (${_NAME}_FIND_REQUIRED)
+ SET(_FAIL_MESSAGE "Could not find OPTIONAL package ${_NAME}")
+ ENDIF (${_NAME}_FIND_REQUIRED)
+ ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
+ SET(_FAIL_MESSAGE "${_FAIL_MSG}")
+ ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
+
+ STRING(TOUPPER ${_NAME} _NAME_UPPER)
+
+ SET(${_NAME_UPPER}_FOUND TRUE)
+ IF(NOT ${_VAR1})
+ SET(${_NAME_UPPER}_FOUND FALSE)
+ ENDIF(NOT ${_VAR1})
+
+ FOREACH(_CURRENT_VAR ${ARGN})
+ IF(NOT ${_CURRENT_VAR})
+ SET(${_NAME_UPPER}_FOUND FALSE)
+ ENDIF(NOT ${_CURRENT_VAR})
+ ENDFOREACH(_CURRENT_VAR)
+
+ IF (${_NAME_UPPER}_FOUND)
+ IF (NOT ${_NAME}_FIND_QUIETLY)
+ MESSAGE(STATUS "Found ${_NAME}: ${${_VAR1}}")
+ ENDIF (NOT ${_NAME}_FIND_QUIETLY)
+ ELSE (${_NAME_UPPER}_FOUND)
+ IF (${_NAME}_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}")
+ ELSE (${_NAME}_FIND_REQUIRED)
+ IF (NOT ${_NAME}_FIND_QUIETLY)
+ MESSAGE(STATUS "${_FAIL_MESSAGE}")
+ ENDIF (NOT ${_NAME}_FIND_QUIETLY)
+ ENDIF (${_NAME}_FIND_REQUIRED)
+ ENDIF (${_NAME_UPPER}_FOUND)
+ENDMACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
gdml2/CPPGDML/cmake
diff -N FindXERCES.cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ FindXERCES.cmake 10 Apr 2013 20:36:42 -0000 1.1
@@ -0,0 +1,14 @@
+if(WIN32)
+ set(XERCES_LIBRARY_NAMES xerces-c_3)
+else(WIN32)
+ set(XERCES_LIBRARY_NAMES xerces-c)
+endif(WIN32)
+
+FIND_PATH(XERCES_INCLUDE_DIR xercesc/sax/InputSource.hpp xercesc/dom/DOMDocument.hpp xercesc/dom/DOMErrorHandler.hpp ${XERCES_DIR}/include)
+
+FIND_LIBRARY(XERCES_LIBRARY ${XERCES_LIBRARY_NAMES} ${XERCES_DIR}/lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib)
+
+# Report the found libraries, quit with fatal error if any required library has not been found.
+INCLUDE(FindPackageHandleStandardArgs)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(XERCES DEFAULT_MSG XERCES_LIBRARY XERCES_INCLUDE_DIR)
\ No newline at end of file
gdml2/CPPGDML/cmake
diff -N GDMLConfig.cmake.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ GDMLConfig.cmake.in 10 Apr 2013 20:36:42 -0000 1.1
@@ -0,0 +1,20 @@
+##############################################################################
+# cmake configuration file for GDML
+#
+# GDML_INCLUDE_DIRS
+# GDML_LIBRARIES
+#
+# requires:
+# MacroCheckPackageLibs.cmake for checking package libraries
+##############################################################################
+
+SET( GDML_DIR "@CMAKE_INSTALL_PREFIX@" )
+SET( GDML_VERSION "@GDML_VERSION@" )
+
+SET(GDML_INCLUDE_DIRS "@library_source_dirs@" )
+
+SET(GDML_LIBRARIES gdml)
+
+INCLUDE( FindPackageHandleStandardArgs )
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS( GDML DEFAULT_MSG GDML_DIR GDML_INCLUDE_DIRS GDML_LIBRARIES ${GDML_COMPONENT_VARIABLES} )
\ No newline at end of file
gdml2/CPPGDML/cmake
diff -N GDMLConfigVersion.cmake.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ GDMLConfigVersion.cmake.in 10 Apr 2013 20:36:42 -0000 1.1
@@ -0,0 +1,11 @@
+##############################################################################
+# this file is parsed when FIND_PACKAGE is called with version argument
+##############################################################################
+
+SET( ${PACKAGE_FIND_NAME}_VERSION_MAJOR @GDML_VERSION_MAJOR@ )
+SET( ${PACKAGE_FIND_NAME}_VERSION_MINOR @GDML_VERSION_MINOR@ )
+SET( ${PACKAGE_FIND_NAME}_VERSION_PATCH @GDML_VERSION_PATCH@ )
+
+INCLUDE( "@[log in to unmask]" )
+
+CHECK_PACKAGE_VERSION( ${PACKAGE_FIND_NAME} @GDML_VERSION@ )
\ No newline at end of file
gdml2/CPPGDML/cmake
diff -N MacroCheckPackageLibs.cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ MacroCheckPackageLibs.cmake 10 Apr 2013 20:36:42 -0000 1.1
@@ -0,0 +1,164 @@
+##############################################################################
+# macro for checkin package libraries in ${PKG_ROOT}/lib
+#
+#
+# macro usage:
+# CHECK_PACKAGE_LIBS( PACKAGE_NAME stdlib1 stdlib2 ... stdlibn )
+# only standard libraries should be passed as arguments to the macro
+# component libraries are set by cmake in PKG_FIND_COMPONENTS (when
+# calling FIND_PACKAGE with COMPONENTS argument) or through the
+# variable PKG_USE_COMPONENTS
+#
+#
+# required variables:
+# PKG_ROOT : path to PKG root directory
+#
+#
+# returns following variables:
+# PKG_LIBRARY_DIRS : list of paths to be used with LINK_DIRECTORIES
+# PGK_LIBRARIES : list of STANDARD libraries (NOT including COMPONENTS)
+# PKG_COMPONENT_LIBRARIES : list of COMPONENT libraries
+# PKG_${COMPONENT}_FOUND : set to TRUE or FALSE for each library
+# PKG_${COMPONENT}_LIBRARY : path to each individual library
+#
+#
+# PKG_LIBRARIES and PKG_LIBRARY_DIRS will be empty if any of the standard
+# libraries is missing
+#
+# @author Jan Engels, Desy
+##############################################################################
+
+
+SET( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )
+
+MACRO( CHECK_PACKAGE_LIBS _pkgname )
+
+ SET( _std_lib_missing FALSE )
+ SET( _ext_lib_missing FALSE )
+
+ SET( _std_libnames ${ARGN} )
+ SET( _ext_libnames ${${_pkgname}_FIND_COMPONENTS} ${${_pkgname}_USE_COMPONENTS} )
+
+ IF( _ext_libnames )
+ SEPARATE_ARGUMENTS( _ext_libnames )
+ LIST( REMOVE_DUPLICATES _ext_libnames )
+ ENDIF()
+
+ IF( NOT ${_pkgname}_FIND_QUIETLY )
+ MESSAGE( STATUS "Check for ${_pkgname}_LIBRARIES: ${_std_libnames}" )
+ IF( _ext_libnames )
+ MESSAGE( STATUS "Check for ${_pkgname}_COMPONENT_LIBRARIES: ${_ext_libnames}" )
+ ENDIF()
+ ENDIF()
+
+ SET( ${_pkgname}_LIBRARY_DIRS )
+ MARK_AS_ADVANCED( ${_pkgname}_LIBRARY_DIRS )
+
+ SET( ${_pkgname}_LIBRARIES )
+ MARK_AS_ADVANCED( ${_pkgname}_LIBRARIES )
+
+ SET( ${_pkgname}_COMPONENT_LIBRARIES )
+ MARK_AS_ADVANCED( ${_pkgname}_COMPONENT_LIBRARIES )
+
+ SET( ${_pkgname}_COMPONENT_VARIABLES )
+ MARK_AS_ADVANCED( ${_pkgname}_COMPONENT_VARIABLES )
+
+ FOREACH( _libname ${_std_libnames} ${_ext_libnames} )
+
+ # flag to check if it is a standard or a component library
+ LIST( FIND _std_libnames "${_libname}" _aux )
+ IF( ${_aux} LESS 0 )
+ SET( _is_std_lib FALSE )
+ ELSE()
+ SET( _is_std_lib TRUE )
+ ENDIF()
+
+ # libname in upper case
+ STRING( TOUPPER ${_libname} _ulibname )
+
+ SET( ${_pkgname}_${_ulibname}_LIBRARY ${_pkgname}_${_ulibname}_LIBRARY-NOTFOUND )
+ MARK_AS_ADVANCED( ${_pkgname}_${_ulibname}_LIBRARY )
+
+ # WARNING: using PATH_SUFFIXES may cause problems when using variable CMAKE_FIND_ROOT_PATH
+ # this problem does not occur if expanding PATHS
+ # look in FindMySQL.cmake for more info
+ #FIND_LIBRARY( ${_pkgname}_${_ulibname}_LIBRARY NAMES ${_libname} PATHS
+ # ${${_pkgname}_ROOT} ${${_pkgname}_DIR} ${${_pkgname}_LIB_SEARCH_PATH}
+ # PATH_SUFFIXES lib64 lib
+ # NO_DEFAULT_PATH
+ #)
+
+ FIND_LIBRARY( ${_pkgname}_${_ulibname}_LIBRARY NAMES ${_libname} PATHS
+ ${${_pkgname}_ROOT}/lib64 ${${_pkgname}_ROOT}/lib
+ ${${_pkgname}_DIR}/lib64 ${${_pkgname}_DIR}/lib
+ ${${_pkgname}_LIB_SEARCH_PATH} ${${_pkgname}_LIB_SEARCH_PATH}/lib64 ${${_pkgname}_LIB_SEARCH_PATH}/lib
+ NO_DEFAULT_PATH
+ )
+
+ IF( NOT ${_pkgname}_DIR )
+ FIND_LIBRARY( ${_pkgname}_${_ulibname}_LIBRARY NAMES ${_libname} )
+ ENDIF()
+
+ IF( ${_pkgname}_FIND_REQUIRED )
+ LIST( APPEND ${_pkgname}_COMPONENT_VARIABLES ${_pkgname}_${_ulibname}_LIBRARY )
+ ENDIF()
+
+ IF( ${_pkgname}_${_ulibname}_LIBRARY ) # if library found
+
+ SET( ${_pkgname}_${_ulibname}_FOUND TRUE )
+
+ # split libraries in PKG_LIBRARIES and PKG_COMPONENT_LIBRARIES
+ IF( _is_std_lib )
+ LIST( APPEND ${_pkgname}_LIBRARIES ${${_pkgname}_${_ulibname}_LIBRARY} )
+ ELSE()
+ LIST( APPEND ${_pkgname}_COMPONENT_LIBRARIES ${${_pkgname}_${_ulibname}_LIBRARY} )
+ ENDIF()
+
+ GET_FILENAME_COMPONENT( _aux ${${_pkgname}_${_ulibname}_LIBRARY} PATH )
+ LIST( APPEND ${_pkgname}_LIBRARY_DIRS ${_aux} )
+
+ IF( NOT ${_pkgname}_FIND_QUIETLY )
+ MESSAGE( STATUS "Check for ${_pkgname}_${_ulibname}_LIBRARY: ${${_pkgname}_${_ulibname}_LIBRARY} -- ok" )
+ ENDIF()
+
+ ELSE() # library not found
+
+ SET( ${_pkgname}_${_ulibname}_FOUND FALSE )
+
+ IF( _is_std_lib )
+ SET( _std_lib_missing TRUE )
+ ELSE()
+ SET( _ext_lib_missing TRUE )
+ ENDIF()
+
+ IF( NOT ${_pkgname}_FIND_QUIETLY )
+ MESSAGE( STATUS "Check for ${_pkgname}_${_ulibname}_LIBRARY: ${_libname} -- failed" )
+ ENDIF()
+
+ ENDIF()
+
+ ENDFOREACH()
+
+ # clear PKG_LIBRARIES if standard library is missing
+ IF( _std_lib_missing )
+ SET( ${_pkgname}_LIBRARIES )
+ ENDIF()
+
+ # clear PKG_COMPONENT_LIBRARIES if a component library is missing and
+ # FIND_PACKAGE called with REQUIRED argument
+ IF( _ext_lib_missing AND ${_pkgname}_FIND_REQUIRED )
+ SET( ${_pkgname}_COMPONENT_LIBRARIES )
+ ENDIF()
+
+ # remove duplicate paths in PKG_LIBRARY_DIRS
+ IF( ${_pkgname}_LIBRARY_DIRS )
+ LIST( REMOVE_DUPLICATES ${_pkgname}_LIBRARY_DIRS )
+ ENDIF()
+
+ # debug
+ #MESSAGE( STATUS "${_pkgname}_LIBRARIES: ${${_pkgname}_LIBRARIES}" )
+ #MESSAGE( STATUS "${_pkgname}_COMPONENT_LIBRARIES: ${${_pkgname}_COMPONENT_LIBRARIES}" )
+ #MESSAGE( STATUS "${_pkgname}_LIBRARY_DIRS: ${${_pkgname}_LIBRARY_DIRS}" )
+
+ENDMACRO( CHECK_PACKAGE_LIBS _pkgname )
+
gdml2/CPPGDML/cmake
diff -N MacroCheckPackageVersion.cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ MacroCheckPackageVersion.cmake 10 Apr 2013 20:36:42 -0000 1.1
@@ -0,0 +1,108 @@
+##############################################################################
+# macro for checking a package version
+#
+# this macro should be called from your PKGVersion.cmake or from a
+# FindPKG.cmake module with the following arguments:
+# _pkgname : The package name
+# _iversion : The installed version of the package
+#
+#
+# the following conventions are used:
+#
+# if FIND_PACKAGE is called with EXACT argument than the version has to
+# match EXACTLY, i.e.:
+# 1.5 == 1.5
+# 1.5 == 1.5.0
+# 1.5 == 1.5.0.0
+# 1.5.2 == 1.5.2.0
+# 1.5.2.1 == 1.5.2.1
+# 1.5.2 != 1.5.2.1
+# 1.5 != 1.5.0.1
+#
+#
+# otherwise a MINIMUM_REQUIRED version is checked for, i.e. the same
+# behavior as with the cmake variable CMAKE_MINIMUM_REQUIRED, e.g.:
+# searching: 1.2 --> installed: 1.5.2.2 --> compatible
+# searching: 1.5 --> installed: 1.5.2.2 --> compatible
+# searching: 1.5.2.1 --> installed: 1.5.2.2 --> compatible
+# searching: 1.5.2.3 --> installed: 1.5.2.2 --> unsuitable
+# searching: 1.7 --> installed: 1.5.2.2 --> unsuitable
+#
+#
+# following variables are returned (internally to cmake):
+# PACKAGE_VERSION_EXACT : set to TRUE if exact version was found
+# PACKAGE_VERSION_COMPATIBLE : set to TRUE if version is compatible
+# PACKAGE_VERSION_UNSUITABLE : set to TRUE if version found is unsuitable
+#
+#
+# @author Jan Engels, Desy IT
+##############################################################################
+
+# these variables are evaluated internally by the cmake command FIND_PACKAGE to mark this
+# package as suitable or not depending on the required version
+SET( PACKAGE_VERSION_EXACT FALSE )
+SET( PACKAGE_VERSION_COMPATIBLE TRUE )
+SET( PACKAGE_VERSION_UNSUITABLE FALSE )
+
+
+# cmake internal variable PACKAGE_FIND_NAME is not defined on FindPKG.cmake
+# modules, therefore it is passed as an argument to the macro
+# _iversion is the installed version of the package
+# _sversion is the version searched by the user with FIND_PACKAGE
+#MACRO( CHECK_PACKAGE_VERSION _pkgname _iversion )
+MACRO( CHECK_PACKAGE_VERSION _pkgname ) # left with one argument only for backwards compatibility
+
+ IF( NOT "${ARGV1}" STREQUAL "" )
+ SET( _iversion ${ARGV1} )
+ ELSE()
+ SET( _iversion ${${_pkgname}_VERSION_MAJOR}.${${_pkgname}_VERSION_MINOR}.${${_pkgname}_VERSION_PATCH}.${${_pkgname}_VERSION_TWEAK} )
+ ENDIF()
+
+ #SET( _sversion_major ${${_pkgname}_FIND_VERSION_MAJOR} )
+ #SET( _sversion_minor ${${_pkgname}_FIND_VERSION_MINOR} )
+
+ SET( _sversion ${${_pkgname}_FIND_VERSION} )
+
+ IF( NOT ${_pkgname}_FIND_QUIETLY )
+ MESSAGE( STATUS "Check for ${_pkgname} (${_iversion})" )
+ ENDIF()
+
+ # only do work if FIND_PACKAGE called with a version argument
+ IF( _sversion )
+
+ #IF( NOT ${_pkgname}_FIND_QUIETLY )
+ # MESSAGE( STATUS "Check for ${_pkgname}: looking for version ${_sversion}" )
+ #ENDIF()
+
+ IF( ${_iversion} VERSION_EQUAL ${_sversion} ) # if version matches EXACTLY
+ #IF( NOT ${_pkgname}_FIND_QUIETLY )
+ # MESSAGE( STATUS "Check for ${_pkgname}: exact version found: ${_iversion}" )
+ #ENDIF()
+ SET( PACKAGE_VERSION_EXACT TRUE )
+ ELSE() # if version does not match EXACTLY, check if it is compatible/suitable
+
+ # installed version must be greater or equal than version searched by the user, i.e.
+ # like with the CMAKE_MINIMUM_REQUIRED commando
+ # if user asks for version 1.2.5 then any version >= 1.2.5 is suitable/compatible
+ IF( NOT ${_sversion} VERSION_LESS ${_iversion} )
+ SET( PACKAGE_VERSION_UNSUITABLE TRUE )
+ ENDIF()
+ # -------------------------------------------------------------------------------------
+
+ IF( ${_pkgname}_FIND_VERSION_EXACT ) # if exact version was required search must fail!!
+ #IF( NOT ${_pkgname}_FIND_QUIETLY )
+ # MESSAGE( "Check for ${_pkgname}: could not find exact version" )
+ #ENDIF()
+ SET( PACKAGE_VERSION_UNSUITABLE TRUE )
+ ENDIF()
+
+ ENDIF()
+
+ IF( PACKAGE_VERSION_UNSUITABLE )
+ SET( PACKAGE_VERSION_COMPATIBLE FALSE )
+ ENDIF()
+
+ ENDIF( _sversion )
+
+ENDMACRO( CHECK_PACKAGE_VERSION )
+
gdml2/CPPGDML/cmake
diff -N MacroGeneratePackageConfigFiles.cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ MacroGeneratePackageConfigFiles.cmake 10 Apr 2013 20:36:42 -0000 1.1
@@ -0,0 +1,44 @@
+#GET_FILENAME_COMPONENT( _current_dir ${CMAKE_CURRENT_LIST_FILE} PATH )
+
+# helper macro for generating project configuration file
+MACRO( GENERATE_PACKAGE_CONFIGURATION_FILES )
+
+ FOREACH( arg ${ARGN} )
+ IF( ${arg} MATCHES "Config.cmake" )
+ IF( EXISTS "${PROJECT_SOURCE_DIR}/cmake/${arg}.in" )
+ CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/cmake/${arg}.in"
+ "${PROJECT_BINARY_DIR}/${arg}" @ONLY
+ )
+ INSTALL( FILES "${PROJECT_BINARY_DIR}/${arg}" DESTINATION . )
+ #IF( EXISTS "${_current_dir}/MacroCheckPackageLibs.cmake" )
+ # INSTALL( FILES "${_current_dir}/MacroCheckPackageLibs.cmake" DESTINATION cmake )
+ #ENDIF()
+ #IF( EXISTS "${_current_dir}/MacroExportPackageDeps.cmake" )
+ # INSTALL( FILES "${_current_dir}/MacroExportPackageDeps.cmake" DESTINATION cmake )
+ #ENDIF()
+ ENDIF()
+ ENDIF()
+
+
+ IF( ${arg} MATCHES "ConfigVersion.cmake" )
+ # version configuration file
+ IF( EXISTS "${PROJECT_SOURCE_DIR}/cmake/${arg}.in" )
+ CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/cmake/${arg}.in"
+ "${PROJECT_BINARY_DIR}/${arg}" @ONLY
+ )
+ INSTALL( FILES "${PROJECT_BINARY_DIR}/${arg}" DESTINATION . )
+ #IF( EXISTS "${_current_dir}/MacroCheckPackageVersion.cmake" )
+ # INSTALL( FILES "${_current_dir}/MacroCheckPackageVersion.cmake" DESTINATION cmake )
+ #ENDIF()
+ ENDIF( EXISTS "${PROJECT_SOURCE_DIR}/cmake/${arg}.in" )
+ ENDIF()
+
+ IF( ${arg} MATCHES "LibDeps.cmake" )
+ EXPORT_LIBRARY_DEPENDENCIES( "${arg}" )
+ INSTALL( FILES "${PROJECT_BINARY_DIR}/${arg}" DESTINATION lib/cmake )
+ ENDIF()
+
+ ENDFOREACH()
+
+ENDMACRO( GENERATE_PACKAGE_CONFIGURATION_FILES )
+
CVSspam 0.2.12