Commit 8f972ac0 authored by Bryan Berthou's avatar Bryan Berthou
Browse files

refs#16

PARTONS_release : initial import.
parent c4d41fe8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1310068718">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1310068718" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.1310068718" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.1310068718." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.797122068" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1132366596" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
<builder buildPath="${workspace_loc:/PARTONS_release}/Release" id="cdt.managedbuild.target.gnu.builder.exe.release.103893049" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.2047399871" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.660505732" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.666051460" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.86162490" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.297616553" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PARTONS/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${QT_INCLUDE_DIR}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/ElementaryUtils/include}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.225668457" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1196931413" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1513863241" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.release.option.debugging.level.1499810173" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1243320830" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.989377401" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1260779478" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1739145660" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.1456941912" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.322751552" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="PARTONS_release.cdt.managedbuild.target.gnu.exe.1779676615" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.166533528;cdt.managedbuild.config.gnu.exe.debug.166533528.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.406432794;cdt.managedbuild.tool.gnu.cpp.compiler.input.318171998">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1310068718;cdt.managedbuild.config.gnu.exe.release.1310068718.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.1196931413;cdt.managedbuild.tool.gnu.c.compiler.input.1243320830">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.166533528;cdt.managedbuild.config.gnu.exe.debug.166533528.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1450207306;cdt.managedbuild.tool.gnu.c.compiler.input.1215254765">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1310068718;cdt.managedbuild.config.gnu.exe.release.1310068718.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.660505732;cdt.managedbuild.tool.gnu.cpp.compiler.input.225668457">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
</cproject>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>PARTONS_release</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.cdt.managedbuilder.core.genmakebuilder (8).launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>
cmake_minimum_required(VERSION 2.6)
#Configuration du projet
project(PARTONS_release CXX)
# Force C++98
add_definitions(-std=c++98)
# Tell CMake to run moc when necessary:
set(CMAKE_AUTOMOC ON)
# As moc files are generated in the binary dir, tell CMake
# to always look for includes there:
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# this command finds Qt4 libraries and sets all required variables
# note that it's Qt4, not QT4 or qt4
FIND_PACKAGE( Qt4 REQUIRED QtCore QtSql )
# add some useful macros and variables
# (QT_USE_FILE is a variable defined by FIND_PACKAGE( Qt4 ) that contains a path to CMake script)
INCLUDE( ${QT_USE_FILE})
ADD_DEFINITIONS (${QT_DEFINITIONS})
# placez vos exécutables dans des dossiers portant le nom du type de compilation (Release, Debug...). Ce dernier est défini par la variable CMAKE_BUILD_TYPE (qui n'a d'effet seulement si le générateur choisi est basé sur Make)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
# Recherche de librairies
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
FIND_PACKAGE(ROOT COMPONENTS Core Hist REQUIRED)
find_package(SFML COMPONENTS system REQUIRED)
# NumA++
set(NUMA_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../NumA++/include")
set(NUMA_LIB_DIR "${CMAKE_SOURCE_DIR}/../NumA++/lib")
set(NUMA_LIBRARIES NumA++)
# PARTONS
set(PARTONS_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../PARTONS/include")
set(PARTONS_LIB_DIR "${CMAKE_SOURCE_DIR}/../PARTONS/lib")
set(PARTONS_LIBRARIES PARTONS)
# ElementaryUtils
set(ELEMENTARY_UTILS_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../ElementaryUtils/include")
set(ELEMENTARY_UTILS_LIB_DIR "${CMAKE_SOURCE_DIR}/../ElementaryUtils/lib")
set(ELEMENTARY_UTILS_LIBRARIES ElementaryUtils)
# Inclusion de librairies
INCLUDE_DIRECTORIES( ${ELEMENTARY_UTILS_INCLUDE_DIR} ${QT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIR} ${PARTONS_INCLUDE_DIR} ${NUMA_INCLUDE_DIR} ${SFML_INCLUDE_DIR})
LINK_DIRECTORIES( ${ELEMENTARY_UTILS_LIB_DIR} ${PARTONS_LIB_DIR} ${NUMA_LIB_DIR})
#Génération de la liste des fichiers sources
file(
GLOB_RECURSE
source_files
src/*
)
add_executable(
PARTONS_release
${source_files}
)
#Configuration de l'édition de liens
target_link_libraries(
PARTONS_release
${PARTONS_LIBRARIES}
${ELEMENTARY_UTILS_LIBRARIES}
${ROOT_LIBRARIES}
${NUMA_LIBRARIES}
${QT_LIBRARIES}
${SFML_LIBRARIES}
)
\ No newline at end of file
# Enable logger job TRUE or FALSE
enable = true
# General system policy - values are ERROR, WARN, INFO, DEBUG
default.level = INFO
# Print mode values are COUT, FILE or BOTH
print.mode = BOTH
log.file.path = /home/debian/workspace/PARTONS_release/bin/partons.log
#logger.AcObservable = DEBUG
#logger.GV2008Model = DEBUG
#logger.DVCSModule = DEBUG
#logger.DVCSCFFModel = DEBUG
#logger.GK11Model.preCompute = DEBUG
#logger.GK11Model.compute = DEBUG
#logger.DVCSCFFHeavyQuarkModel = DEBUG
#logger.RunningAlphaStrong = DEBUG
#logger.BaseObjectManager = DEBUG
#logger.DVCSCFFModel.compute = DEBUG
\ No newline at end of file
log.file.path = /home/debian/workspace/PARTONS_release/bin/logger.cfg
scenario.directory = /home/debian/workspace/PARTONS/data/scenario/
grid.directory = /home/debian/workspace/PARTONS/data/grid/
##### database #####
# SQLITE or MYSQL
database.production.type = MYSQL
database.production.url = localhost
database.production.dbname = partons
database.production.user = partons
database.production.passwd = partons
##### system #####
# Environment configuration
environment.configuration.file.path = /home/debian/workspace/PARTONS/environment_configuration.dat
# Thread
computation.nb.processor = 1
# Automation
xml.schema.file.path = /home/debian/workspace/PARTONS/data/automation/xmlSchema.xsd
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project name="PARTONS_release">
<property name="build" location="${basedir}/build" />
<property name="bin" location="${basedir}/bin" />
<record name="${build}/build.log" loglevel="debug" action="start" />
<target name="clean">
<delete dir="${build}/CMakeFiles" />
<delete file="${build}/cmake_install.cmake" />
<delete file="${build}/Makefile" />
<delete file="${build}/CMakeCache.txt" />
</target>
<target name="cmake">
<exec command="cmake -G&quot;Unix Makefiles&quot; ${basedir} -DCMAKE_BUILD_TYPE=Debug -DROOT_HOME=/usr/local/root/v5.34.32" failonerror="true" dir="${build}" />
</target>
<target name="build" depends="cmake">
<exec executable="make" failonerror="true" dir="${build}" />
</target>
</project>
\ No newline at end of file
###############################################################################
# cmake module for finding ROOT
#
# Following cmake variables are returned by this module:
#
# ROOT_FOUND # set to TRUE if ROOT was successfully found
# ROOT_INCLUDE_DIRS # list of directories where ROOT headers live
# ROOT_LIBRARIES # list of all ROOT libraries (including components)
# ROOT_DEFINITIONS # definitions set by this module (-DUSE_ROOT ...)
# ROOT_${COMPONENT}_FOUND # for ROOT components, e.g. Minuit2 MathMore ...
#
#
# Please note that by convention components should be entered exactly as
# the library names, i.e. the component name equivalent to the library
# $ROOTSYS/lib/libMathMore.so should be called MathMore and NOT:
# mathmore or Mathmore or MATHMORE
#
# However to follow the usual cmake convention it is agreed that the
# ROOT_${COMPONENT}_FOUND variables are ALL uppercase, i.e. the MathMore
# component returns: ROOT_MATHMORE_FOUND and NOT ROOT_MathMore_FOUND
#
#
# The additional ROOT components can be defined directly in the cmake commando:
# FIND_PACKAGE( ROOT COMPONENTS MathMore Gdml Geo ...)
#
# Or in the variable ROOT_USE_COMPONENTS before calling find_package, i.e.:
# SET( ROOT_USE_COMPONENTS MathMore Gdml Geo )
# FIND_PACKAGE( ROOT )
#
# The Minuit2 component is always added for backwards compatibility.
#
# @author Jan Engels, DESY
###############################################################################
SET( ROOT_FOUND FALSE )
MARK_AS_ADVANCED( ROOT_FOUND )
# Threads library is needed for root
#FIND_PACKAGE( Threads REQUIRED)
# set ROOTSYS for running root-config
IF( DEFINED ROOT_HOME )
SET( ENV{ROOTSYS} "${ROOT_HOME}" )
ENDIF()
# ==============================================
# === ROOT_INCLUDE_DIR ===
# ==============================================
# get include dir from root-config output
EXEC_PROGRAM( "${ROOT_HOME}/bin/root-config" "${ROOT_HOME}/bin"
ARGS --incdir
OUTPUT_VARIABLE ROOT_INC_DIR
RETURN_VALUE exit_code
)
IF( NOT exit_code EQUAL 0 )
# clear ROOT_INC_DIR if root-config exits with error
# it could have garbage output
SET( ROOT_INC_DIR )
ENDIF()
SET( ROOT_INCLUDE_DIR ROOT_INCLUDE_DIR-NOTFOUND )
MARK_AS_ADVANCED( ROOT_INCLUDE_DIR )
FIND_PATH( ROOT_INCLUDE_DIR
NAMES TH1.h
PATHS ${ROOT_HOME}/include ${ROOT_INC_DIR}
NO_DEFAULT_PATH )
IF( NOT ROOT_INCLUDE_DIR AND NOT ROOT_FIND_QUIETLY )
MESSAGE( STATUS "Check for ROOT: ${ROOT_HOME}"
" -- failed to find ROOT include directory!!" )
ENDIF()
# ==============================================
# === ROOT_LIBRARIES ===
# ==============================================
# check if this flag is set to FALSE at the end of
# this module to make sure all libraries were found
SET( ROOT_FINDLIB_FAILED FALSE )
MARK_AS_ADVANCED( ROOT_FINDLIB_FAILED )
# get library dir from root-config output
EXEC_PROGRAM( "${ROOT_HOME}/bin/root-config" "${ROOT_HOME}/bin"
ARGS --libdir
OUTPUT_VARIABLE ROOT_LIB_DIR
RETURN_VALUE exit_code
)
IF( NOT exit_code EQUAL 0 )
# clear ROOT_LIB_DIR if root-config exits with error
# it could have garbage output
SET( ROOT_LIB_DIR )
ENDIF()
# ========== look for standard root libraries =================
# standard root libraries (without components)
SET( ROOT_LIB_NAMES )
SET( ROOT_LIBS )
MARK_AS_ADVANCED( ROOT_LIB_NAMES ROOT_LIBS )
# get standard root libraries from 'root-config --libs' output
EXEC_PROGRAM( "${ROOT_HOME}/bin/root-config" "${ROOT_HOME}/bin"
#ARGS --noauxlibs --glibs
ARGS --noauxlibs --libs
OUTPUT_VARIABLE cmd_output
RETURN_VALUE exit_code
)
IF( exit_code EQUAL 0 )
# create a list out of the output
SEPARATE_ARGUMENTS( cmd_output )
# remove first item -L compiler flag
LIST( REMOVE_AT cmd_output 0 )
FOREACH( lib ${cmd_output} )
# extract libnames from -l compiler flags
STRING( REGEX REPLACE "^-.(.*)$" "\\1" libname "${lib}")
# append all library names into a list
LIST( APPEND ROOT_LIB_NAMES ${libname} )
SET( ROOT_LIB_${libname} ROOT_LIB_${libname}-NOTFOUND )
MARK_AS_ADVANCED( ROOT_LIB_${libname} )
FIND_LIBRARY( ROOT_LIB_${libname}
NAMES ${libname}
PATHS ${ROOT_HOME}/lib ${ROOT_LIB_DIR}
NO_DEFAULT_PATH
)
IF( NOT ROOT_LIB_${libname} )
SET( ROOT_FINDLIB_FAILED TRUE )
IF( NOT ROOT_FIND_QUIETLY )
MESSAGE( STATUS "Check for ROOT: ${ROOT_HOME}"
" -- failed to find ROOT library: ${libname}" )
ENDIF()
ELSE()
LIST( APPEND ROOT_LIBS ${ROOT_LIB_${libname}} )
ENDIF()
ENDFOREACH()
IF( NOT ROOT_FIND_QUIETLY )
MESSAGE( STATUS "Check for ROOT: detected libraries: ${ROOT_LIB_NAMES}" )
ENDIF()
ELSE()
SET( ROOT_FINDLIB_FAILED TRUE )
ENDIF()
# ========== look for additional root components =================
SET( ROOT_COMPONENT_LIBS )
MARK_AS_ADVANCED( ROOT_COMPONENT_LIBS )
# Minuit2 is always included (for backwards compatibility )
LIST( APPEND ROOT_FIND_COMPONENTS Minuit2 )
# append components defined in the variable ROOT_USE_COMPONENTS
IF( DEFINED ROOT_USE_COMPONENTS )
LIST( APPEND ROOT_FIND_COMPONENTS ${ROOT_USE_COMPONENTS} )
ENDIF()
# REMOVE_DUPLICATES is only available in cmake versions >= 2.6
# it is not a problem if a component is duplicated in the list, this is just done
# for consistency and to display the message below without duplicate components
IF( ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 2.6 OR
${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.6 )
IF( ROOT_FIND_COMPONENTS )
LIST(REMOVE_DUPLICATES ROOT_FIND_COMPONENTS)
ENDIF()
ENDIF()
IF( NOT ROOT_FIND_QUIETLY )
MESSAGE( STATUS "Check for ROOT: additional components: ${ROOT_FIND_COMPONENTS}" )
ENDIF()
FOREACH( libname ${ROOT_FIND_COMPONENTS} )
# name of the component in upper case
STRING( TOUPPER ${libname} upper_component_name)
SET( ROOT_LIB_${libname} ROOT_LIB_${libname}-NOTFOUND )
MARK_AS_ADVANCED( ROOT_LIB_${libname} )
FIND_LIBRARY( ROOT_LIB_${libname}
NAMES ${libname}
PATHS ${ROOT_HOME}/lib ${ROOT_LIB_DIR}
NO_DEFAULT_PATH
)
IF( NOT ROOT_LIB_${libname} )
#SET( ROOT_FINDLIB_FAILED TRUE )
IF( NOT ROOT_FIND_QUIETLY )
MESSAGE( STATUS "Check for ROOT: ${ROOT_HOME}"
" -- failed to find ROOT component: ${libname}" )
ENDIF()
ELSE()
SET( ROOT_${upper_component}_FOUND TRUE )
LIST( APPEND ROOT_COMPONENT_LIBS ${ROOT_LIB_${libname}} )
ENDIF()
ENDFOREACH()
# ====== DL LIBRARY ==================================================
# comment out this code due to cmake bug in 64 bit:
# see: http://public.kitware.com/mantis/view.php?id=10813
#
#FIND_LIBRARY( DL_LIB NAMES ${CMAKE_DL_LIBS} dl )
#IF( NOT DL_LIB AND NOT ROOT_FIND_QUIETLY )
# MESSAGE( STATUS "Check for ROOT: failed to find libdl.so" )
# SET( ROOT_FINDLIB_FAILED TRUE )
#ELSE()
# MESSAGE( STATUS "Check for ROOT: using dl library: ${DL_LIB}" )
#ENDIF()
# set variables and display results
IF( ROOT_INCLUDE_DIR AND NOT ROOT_FINDLIB_FAILED )
SET( ROOT_FOUND TRUE )
SET( ROOT_INCLUDE_DIRS ${ROOT_INCLUDE_DIR} )
#SET( ROOT_LIBRARIES ${ROOT_LIBS} ${DL_LIB} ${CMAKE_THREAD_LIBS_INIT} )
#SET( ROOT_LIBRARIES ${ROOT_LIBS} ${ROOT_COMPONENT_LIBS} ${DL_LIB} )
SET( ROOT_LIBRARIES ${ROOT_LIBS} ${ROOT_COMPONENT_LIBS} )
SET( ROOT_DEFINITIONS "-DUSEROOT -DUSE_ROOT -DMARLIN_USE_ROOT" )
MARK_AS_ADVANCED( ROOT_LIBRARIES ROOT_DEFINITIONS )
MESSAGE( STATUS "Check for ROOT: ${ROOT_HOME} -- works" )
ELSE()
IF( ROOT_FIND_REQUIRED )
MESSAGE( FATAL_ERROR "did you set ROOT_HOME with -DROOT_HOME=<path_to_ROOT>?" )
ENDIF()
IF( NOT ROOT_FIND_QUIETLY )
MESSAGE( STATUS "Check for ROOT -- failed!! skip this package..." )
ENDIF()
ENDIF()
# This script locates the SFML library
# ------------------------------------
#
# Usage
# -----
#
# When you try to locate the SFML libraries, you must specify which modules you want to use (system, window, graphics, network, audio, main).
# If none is given, the SFML_LIBRARIES variable will be empty and you'll end up linking to nothing.
# example:
# find_package(SFML COMPONENTS graphics window system) // find the graphics, window and system modules
#
# You can enforce a specific version, either MAJOR.MINOR or only MAJOR.
# If nothing is specified, the version won't be checked (i.e. any version will be accepted).
# example:
# find_package(SFML COMPONENTS ...) // no specific version required
# find_package(SFML 2 COMPONENTS ...) // any 2.x version
# find_package(SFML 2.4 COMPONENTS ...) // version 2.4 or greater
#
# By default, the dynamic libraries of SFML will be found. To find the static ones instead,
# you must set the SFML_STATIC_LIBRARIES variable to TRUE before calling find_package(SFML ...).
# Since you have to link yourself all the SFML dependencies when you link it statically, the following
# additional variables are defined: SFML_XXX_DEPENDENCIES and SFML_DEPENDENCIES (see their detailed
# description below).
# In case of static linking, the SFML_STATIC macro will also be defined by this script.
# example:
# set(SFML_STATIC_LIBRARIES TRUE)
# find_package(SFML 2 COMPONENTS network system)
#
# On Mac OS X if SFML_STATIC_LIBRARIES is not set to TRUE then by default CMake will search for frameworks unless
# CMAKE_FIND_FRAMEWORK is set to "NEVER" for example. Please refer to CMake documentation for more details.
# Moreover, keep in mind that SFML frameworks are only available as release libraries unlike dylibs which
# are available for both release and debug modes.
#
# If SFML is not installed in a standard path, you can use the SFML_ROOT CMake (or environment) variable
# to tell CMake where SFML is.
#
# Output
# ------
#
# This script defines the following variables:
# - For each specified module XXX (system, window, graphics, network, audio, main):
# - SFML_XXX_LIBRARY_DEBUG: the name of the debug library of the xxx module (set to SFML_XXX_LIBRARY_RELEASE is no debug version is found)
# - SFML_XXX_LIBRARY_RELEASE: the name of the release library of the xxx module (set to SFML_XXX_LIBRARY_DEBUG is no release version is found)
# - SFML_XXX_LIBRARY: the name of the library to link to for the xxx module (includes both debug and optimized names if necessary)
# - SFML_XXX_FOUND: true if either the debug or release library of the xxx module is found
# - SFML_XXX_DEPENDENCIES: the list of libraries the module depends on, in case of static linking
# - SFML_LIBRARIES: the list of all libraries corresponding to the required modules
# - SFML_FOUND: true if all the required modules are found
# - SFML_INCLUDE_DIR: the path where SFML headers are located (the directory containing the SFML/Config.hpp file)
# - SFML_DEPENDENCIES: the list of libraries SFML depends on, in case of static linking
#
# example:
# find_package(SFML 2 COMPONENTS system window graphics audio REQUIRED)
# include_directories(${SFML_INCLUDE_DIR})
# add_executable(myapp ...)
# target_link_libraries(myapp ${SFML_LIBRARIES})
# define the SFML_STATIC macro if static build was chosen
if(SFML_STATIC_LIBRARIES)
add_definitions(-DSFML_STATIC)
endif()
# define the list of search paths for headers and libraries
set(FIND_SFML_PATHS
${SFML_ROOT}
$ENV{SFML_ROOT}
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr/local/sfml/v2.3.2
/usr
/sw
/opt/local
/opt/csw
/opt)
# find the SFML include directory
find_path(SFML_INCLUDE_DIR SFML/Config.hpp
PATH_SUFFIXES include
PATHS ${FIND_SFML_PATHS})
# check the version number
set(SFML_VERSION_OK TRUE)
if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR)
# extract the major and minor version numbers from SFML/Config.hpp
# we have to handle framework a little bit differently:
if("${SFML_INCLUDE_DIR}" MATCHES "SFML.framework")
set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/Headers/Config.hpp")
else()
set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/SFML/Config.hpp")
endif()
FILE(READ "${SFML_CONFIG_HPP_INPUT}" SFML_CONFIG_HPP_CONTENTS)
STRING(REGEX REPLACE ".*#define SFML_VERSION_MAJOR ([0-9]+).*" "\\1" SFML_VERSION_MAJOR "${SFML_CONFIG_HPP_CONTENTS}")
STRING(REGEX REPLACE ".*#define SFML_VERSION_MINOR ([0-9]+).*" "\\1" SFML_VERSION_MINOR "${SFML_CONFIG_HPP_CONTENTS}")
STRING(REGEX REPLACE ".*#define SFML_VERSION_PATCH ([0-9]+).*" "\\1" SFML_VERSION_PATCH "${SFML_CONFIG_HPP_CONTENTS}")
if (NOT "${SFML_VERSION_PATCH}" MATCHES "^[0-9]+$")
set(SFML_VERSION_PATCH 0)
endif()