Commit 4d703b69 authored by David Frank's avatar David Frank

Install folder structure correclty, Remove folders from includes in elsa.h (fix examples)

parent cceaaf30
Pipeline #270180 passed with stages
in 49 minutes and 11 seconds
......@@ -26,3 +26,36 @@ function(InstallElsaModule ELSA_MODULE_NAME ELSA_MODULE_TARGET_NAME ELSA_MODULE_
)
endif(ELSA_INSTALL)
endfunction()
# Install a module using a directory
# Install the target "ELSA_MODULE_TARGET_NAME" with the exported name "ELSA_MODULE_EXPORT_TARGET"
# by installing all the files given in "MODULE_DIRECTORY" to installprefix/elsa/module_name
#
# This method preserves all the hierarchical structures of the directory (sub folders are preserved)
function(InstallElsaModuleDir ELSA_MODULE_NAME ELSA_MODULE_TARGET_NAME ELSA_MODULE_EXPORT_TARGET MODULE_DIRECTORY)
if(ELSA_INSTALL)
# This is required so that the exported target has the name core and not elsa_core
set_target_properties(${ELSA_MODULE_TARGET_NAME} PROPERTIES EXPORT_NAME ${ELSA_MODULE_NAME})
include(GNUInstallDirs)
# install the module
install(TARGETS ${ELSA_MODULE_TARGET_NAME}
EXPORT ${ELSA_MODULE_EXPORT_TARGET}
INCLUDES DESTINATION include
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# install the header files
install(DIRECTORY ${MODULE_DIRECTORY}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/elsa/${ELSA_MODULE_NAME}
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.cuh"
)
# create the config file for the module
install(EXPORT ${ELSA_MODULE_EXPORT_TARGET}
FILE ${ELSA_MODULE_EXPORT_TARGET}.cmake
NAMESPACE elsa::
DESTINATION ${INSTALL_CONFIG_DIR}
)
endif(ELSA_INSTALL)
endfunction()
......@@ -12,6 +12,7 @@ if(NOT elsa_FIND_COMPONENTS)
foreach(_comp ${_supported_components})
include(${CMAKE_CURRENT_LIST_DIR}/elsa_${_comp}Targets.cmake)
endforeach()
message(STATUS "elsa found at ${CMAKE_CURRENT_LIST_DIR}")
message(STATUS "elsa found, using all modules")
else()
foreach(_comp ${elsa_FIND_COMPONENTS})
......
......@@ -96,4 +96,4 @@ endif(ELSA_TESTING)
registerComponent(${ELSA_MODULE_NAME})
# install the module
InstallElsaModule(${ELSA_MODULE_NAME} ${ELSA_MODULE_TARGET_NAME} ${ELSA_MODULE_EXPORT_TARGET})
InstallElsaModuleDir(${ELSA_MODULE_NAME} ${ELSA_MODULE_TARGET_NAME} ${ELSA_MODULE_EXPORT_TARGET} "${CMAKE_CURRENT_SOURCE_DIR}/")
#pragma once
// Core headers
#include "core/elsaDefines.h"
#include "core/DataContainer.h"
#include "core/DataDescriptor.h"
#include "core/LinearOperator.h"
#include "core/IdenticalBlocksDescriptor.h"
#include "core/PartitionDescriptor.h"
#include "core/RandomBlocksDescriptor.h"
#include "elsaDefines.h"
#include "DataContainer.h"
#include "DataDescriptor.h"
#include "LinearOperator.h"
#include "IdenticalBlocksDescriptor.h"
#include "PartitionDescriptor.h"
#include "RandomBlocksDescriptor.h"
// Functional headers
#include "functionals/Functional.h"
#include "functionals/Residual.h"
#include "functionals/LinearResidual.h"
#include "functionals/Huber.h"
#include "functionals/L1Norm.h"
#include "functionals/L2NormPow2.h"
#include "functionals/WeightedL2NormPow2.h"
#include "functionals/LInfNorm.h"
#include "functionals/PseudoHuber.h"
#include "functionals/Quadric.h"
#include "functionals/EmissionLogLikelihood.h"
#include "functionals/TransmissionLogLikelihood.h"
#include "Functional.h"
#include "Residual.h"
#include "LinearResidual.h"
#include "Huber.h"
#include "L1Norm.h"
#include "L2NormPow2.h"
#include "WeightedL2NormPow2.h"
#include "LInfNorm.h"
#include "PseudoHuber.h"
#include "Quadric.h"
#include "EmissionLogLikelihood.h"
#include "TransmissionLogLikelihood.h"
// Generators headers
#include "generators/PhantomGenerator.h"
#include "generators/CircleTrajectoryGenerator.h"
#include "PhantomGenerator.h"
#include "CircleTrajectoryGenerator.h"
// IO headers
#include "io/EDFHandler.h"
#include "io/MHDHandler.h"
#include "EDFHandler.h"
#include "MHDHandler.h"
// Logging headers
#include "logging/Logger.h"
#include "logging/LogGuard.h"
#include "logging/Timer.h"
#include "Logger.h"
#include "LogGuard.h"
#include "Timer.h"
// Operator headers
#include "operators/Identity.h"
#include "operators/Scaling.h"
#include "operators/FiniteDifferences.h"
#include "operators/BlockLinearOperator.h"
#include "Identity.h"
#include "Scaling.h"
#include "FiniteDifferences.h"
#include "BlockLinearOperator.h"
// Problem headers
#include "problems/Problem.h"
#include "problems/RegularizationTerm.h"
#include "problems/QuadricProblem.h"
#include "problems/WLSProblem.h"
#include "problems/TikhonovProblem.h"
#include "Problem.h"
#include "RegularizationTerm.h"
#include "QuadricProblem.h"
#include "WLSProblem.h"
#include "TikhonovProblem.h"
// Projector headers
#include "projectors/Geometry.h"
#include "projectors/BinaryMethod.h"
#include "projectors/JosephsMethod.h"
#include "projectors/SiddonsMethod.h"
#include "Geometry.h"
#include "BinaryMethod.h"
#include "JosephsMethod.h"
#include "SiddonsMethod.h"
// CUDA projectors
#ifdef ELSA_CUDA_PROJECTORS
#include "projectors_cuda/SiddonsMethodCUDA.h"
#include "projectors_cuda/JosephsMethodCUDA.h"
#include "SiddonsMethodCUDA.h"
#include "JosephsMethodCUDA.h"
#endif
// Solver headers
#include "solvers/Solver.h"
#include "solvers/GradientDescent.h"
#include "solvers/CG.h"
#include "Solver.h"
#include "GradientDescent.h"
#include "CG.h"
Markdown is supported
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