Commit 9e4f7810 authored by Bryan Berthou's avatar Bryan Berthou
Browse files

refs#16

- NumA++ : create tag for r686
parent 3cb65d09
<?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.so.debug.268917433">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.so.debug.268917433" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/NumA++"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/NumA++/Debug"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/NumA++"/>
<entry flags="RESOLVED" kind="libraryFile" name="NumA++" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" 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"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" 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.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.so.debug.268917433" name="Debug" parent="cdt.managedbuild.config.gnu.so.debug">
<folderInfo id="cdt.managedbuild.config.gnu.so.debug.268917433." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.so.debug.313179161" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.so.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.so.debug.1546879730" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.so.debug"/>
<builder buildPath="${workspace_loc:/NumA++}" id="cdt.managedbuild.target.gnu.builder.so.debug.54502403" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.so.debug"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1680042854" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.so.debug.716919598" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.so.debug">
<option id="gnu.cpp.compiler.so.debug.option.optimization.level.1953895208" name="Optimization Level" superClass="gnu.cpp.compiler.so.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.so.debug.option.debugging.level.48377409" name="Debug Level" superClass="gnu.cpp.compiler.so.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.other.pic.1348297619" name="Position Independent Code (-fPIC)" superClass="gnu.cpp.compiler.option.other.pic" value="true" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.include.paths.1123292064" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;../${EIGEN_INCLUDE_DIR}&quot;"/>
<listOptionValue builtIn="false" value="&quot;../${ROOT_INCLUDE_DIR}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/ElementaryUtils/include}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1517022876" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.so.debug.434667659" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.so.debug.option.optimization.level.1194413988" name="Optimization Level" superClass="gnu.c.compiler.so.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.so.debug.option.debugging.level.172208605" name="Debug Level" superClass="gnu.c.compiler.so.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1729313613" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.so.debug.1023219015" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.debug">
<option defaultValue="true" id="gnu.c.link.so.debug.option.shared.71651028" name="Shared (-shared)" superClass="gnu.c.link.so.debug.option.shared" valueType="boolean"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.so.debug.25565819" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.so.debug">
<option defaultValue="true" id="gnu.cpp.link.so.debug.option.shared.1044971448" name="Shared (-shared)" superClass="gnu.cpp.link.so.debug.option.shared" valueType="boolean"/>
<option id="gnu.cpp.link.option.paths.1271225687" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths"/>
<option id="gnu.cpp.link.option.libs.305271451" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1255548896" 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.so.debug.605304475" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.so.debug">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.790604425" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="CMakeFiles" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="NumA++.cdt.managedbuild.target.gnu.so.890648310" name="Shared Library" projectType="cdt.managedbuild.target.gnu.so"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.268917433;cdt.managedbuild.config.gnu.so.debug.268917433.;cdt.managedbuild.tool.gnu.cpp.compiler.so.debug.716919598;cdt.managedbuild.tool.gnu.cpp.compiler.input.1517022876">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.268917433;cdt.managedbuild.config.gnu.so.debug.268917433.;cdt.managedbuild.tool.gnu.c.compiler.so.debug.434667659;cdt.managedbuild.tool.gnu.c.compiler.input.1729313613">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.1236619972;cdt.managedbuild.config.gnu.so.release.1236619972.;cdt.managedbuild.tool.gnu.c.compiler.so.release.511618330;cdt.managedbuild.tool.gnu.c.compiler.input.1954696730">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.1236619972;cdt.managedbuild.config.gnu.so.release.1236619972.;cdt.managedbuild.tool.gnu.cpp.compiler.so.release.692453438;cdt.managedbuild.tool.gnu.cpp.compiler.input.66031832">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/NumA++"/>
</configuration>
<configuration configurationName="Release">
<resource resourceType="PROJECT" workspacePath="/NumA++"/>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.cdt.managedbuilder.core.genmakebuilder"/>
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>NumA++</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 (1).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(NumA++ CXX)
# 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(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)
# set(CMAKE_VERBOSE_MAKEFILE ON)
# Recherche de librairies
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
FIND_PACKAGE( SFML COMPONENTS system REQUIRED)
FIND_PACKAGE( Eigen3 REQUIRED)
FIND_PACKAGE( ROOT COMPONENTS Core Hist MathMore REQUIRED)
# 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 librarie ROOT
include_directories(${SFML_INCLUDE_DIR} ${ELEMENTARY_UTILS_INCLUDE_DIR} ${ROOT_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR})
# Link libraries
LINK_DIRECTORIES(${ELEMENTARY_UTILS_LIB_DIR})
#Inclusion des en-têtes publics
include_directories(include)
#Génération de la liste des fichiers sources
file(
GLOB_RECURSE
source_files
src/*
)
add_library(
NumA++
SHARED
${source_files}
)
#Configuration de l'édition de liens
target_link_libraries(
NumA++
${ELEMENTARY_UTILS_LIBRARIES}
${ROOT_LIBRARIES}
${SFML_LIBRARIES}
)
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<project name="NumA++">
<property name="build" location="${basedir}/build" />
<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
# - Try to find Eigen3 lib
#
# This module supports requiring a minimum version, e.g. you can do
# find_package(Eigen3 3.1.2)
# to require version 3.1.2 or newer of Eigen3.
#
# Once done this will define
#
# EIGEN3_FOUND - system has eigen lib with correct version
# EIGEN3_INCLUDE_DIR - the eigen include directory
# EIGEN3_VERSION - eigen version
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
if(NOT Eigen3_FIND_VERSION)
if(NOT Eigen3_FIND_VERSION_MAJOR)
set(Eigen3_FIND_VERSION_MAJOR 2)
endif(NOT Eigen3_FIND_VERSION_MAJOR)
if(NOT Eigen3_FIND_VERSION_MINOR)
set(Eigen3_FIND_VERSION_MINOR 91)
endif(NOT Eigen3_FIND_VERSION_MINOR)
if(NOT Eigen3_FIND_VERSION_PATCH)
set(Eigen3_FIND_VERSION_PATCH 0)
endif(NOT Eigen3_FIND_VERSION_PATCH)
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
endif(NOT Eigen3_FIND_VERSION)
macro(_eigen3_check_version)
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK FALSE)
else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK TRUE)
endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
if(NOT EIGEN3_VERSION_OK)
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
"but at least version ${Eigen3_FIND_VERSION} is required")
endif(NOT EIGEN3_VERSION_OK)
endmacro(_eigen3_check_version)
if (EIGEN3_INCLUDE_DIR)
# in cache already
_eigen3_check_version()
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
else (EIGEN3_INCLUDE_DIR)
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
PATHS
${CMAKE_INSTALL_PREFIX}/include
${KDE4_INCLUDE_DIR}
PATH_SUFFIXES eigen3 eigen
)
if(EIGEN3_INCLUDE_DIR)
_eigen3_check_version()
endif(EIGEN3_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
mark_as_advanced(EIGEN3_INCLUDE_DIR)
endif(EIGEN3_INCLUDE_DIR)
###############################################################################
# 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