Commit 5d0b6e70 authored by Nabil Chouika's avatar Nabil Chouika
Browse files

refs#16

In Elementary_utils (trunk):
- Add the installation routines in CMakeLists.
- Add doxyfile.

In NumA++ (trunk):
- Add the installation routines in CMakeLists.
- Add FindElementaryUtils.cmake module and adapt CMakeLists.

In NumA++_Tests (trunk):
- Add FindElementaryUtils.cmake & FindNumA++.cmake modules and adapt CMakeLists.

In PARTONS (trunk):
- Add the installation routines in CMakeLists.
- Add FindElementaryUtils.cmake & FindNumA++.cmake modules and adapt CMakeLists.

In PARTONS_exe, PARTONS_release, PARTONS_Tests, PARTONS_Fits (trunk):
- Add FindElementaryUtils.cmake, FindNumA++.cmake & FindPARTONS.cmake modules and adapt CMakeLists.
parent f5787919
......@@ -32,26 +32,33 @@ 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)
# ElementaryUtils
FIND_PACKAGE(ElementaryUtils REQUIRED)
# Awful hack not need anymore:
#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)
# NumA++
set(NUMA_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../NumA++/include")
set(NUMA_LIB_DIR "${CMAKE_SOURCE_DIR}/../NumA++/lib")
set(NUMA_LIBRARIES NumA++)
FIND_PACKAGE(NumA++ REQUIRED)
# Awful hack not need anymore:
#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)
FIND_PACKAGE(PARTONS REQUIRED)
# Awful hack not need anymore:
#set(PARTONS_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../PARTONS/include")
#set(PARTONS_LIB_DIR "${CMAKE_SOURCE_DIR}/../PARTONS/lib")
#set(PARTONS_LIBRARIES PARTONS)
# 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})
# Link libraries # not needed anymore
#LINK_DIRECTORIES( ${ELEMENTARY_UTILS_LIB_DIR} ${PARTONS_LIB_DIR} ${NUMA_LIB_DIR})
#Génération de la liste des fichiers sources
......
# - Try to find ElementaryUtils (both in system folders if it was installed, and in the current workspace)
#
# Once done this will define
#
# ELEMENTARY_UTILS_FOUND - system has Elementary_Utils lib
# ELEMENTARY_UTILS_LIBRARIES - the path of the library
# ELEMENTARY_UTILS_INCLUDE_DIR - the include directory
if (ELEMENTARY_UTILS_INCLUDE_DIR)
# in cache already
set(ELEMENTARY_UTILS_FOUND TRUE)
else (ELEMENTARY_UTILS_INCLUDE_DIR)
find_path(ELEMENTARY_UTILS_INCLUDE_DIR ElementaryUtils/PropertiesManager.h
PATHS
${CMAKE_INSTALL_PREFIX}/include/
${CMAKE_SOURCE_DIR}/../ElementaryUtils/include
PATH_SUFFIXES PARTONS
)
find_library(ELEMENTARY_UTILS_LIBRARIES
NAMES ElementaryUtils
PATHS
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${CMAKE_SOURCE_DIR}/../ElementaryUtils/lib
PATH_SUFFIXES PARTONS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ELEMENTARY_UTILS DEFAULT_MSG ELEMENTARY_UTILS_INCLUDE_DIR ELEMENTARY_UTILS_LIBRARIES)
endif(ELEMENTARY_UTILS_INCLUDE_DIR)
# - Try to find NumA++ (both in system folders if it was installed, and in the current workspace)
#
# Once done this will define
#
# NUMA_FOUND - system has NumA++ lib
# NUMA_LIBRARIES - the path of the library
# NUMA_INCLUDE_DIR - the include directory
if (NUMA_INCLUDE_DIR)
# in cache already
set(NUMA_FOUND TRUE)
else (NUMA_INCLUDE_DIR)
find_path(NUMA_INCLUDE_DIR NAMES NumA/integration/Integrator.h NumA++/integration/Integrator.h
PATHS
${CMAKE_INSTALL_PREFIX}/include/
${CMAKE_SOURCE_DIR}/../NumA/include
${CMAKE_SOURCE_DIR}/../NumA++/include
PATH_SUFFIXES PARTONS
)
find_library(NUMA_LIBRARIES
NAMES NumA NumA++
PATHS
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${CMAKE_SOURCE_DIR}/../NumA++/lib
${CMAKE_SOURCE_DIR}/../NumA/lib
PATH_SUFFIXES PARTONS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(NUMA DEFAULT_MSG NUMA_INCLUDE_DIR NUMA_LIBRARIES)
endif(NUMA_INCLUDE_DIR)
# - Try to find PARTONS (both in system folders if it was installed, and in the current workspace)
#
# Once done this will define
#
# PARTONS_FOUND - system has PARTONS lib
# PARTONS_LIBRARIES - the path of the library
# PARTONS_INCLUDE_DIR - the include directory
if (PARTONS_INCLUDE_DIR)
# in cache already
set(PARTONS_FOUND TRUE)
else (PARTONS_INCLUDE_DIR)
find_path(PARTONS_INCLUDE_DIR NAMES partons/Partons.h
PATHS
${CMAKE_INSTALL_PREFIX}/include/
${CMAKE_SOURCE_DIR}/../PARTONS/include
PATH_SUFFIXES PARTONS
)
find_library(PARTONS_LIBRARIES
NAMES PARTONS
PATHS
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${CMAKE_SOURCE_DIR}/../PARTONS/lib
PATH_SUFFIXES PARTONS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PARTONS DEFAULT_MSG PARTONS_INCLUDE_DIR PARTONS_LIBRARIES)
endif(PARTONS_INCLUDE_DIR)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment