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_ ...@@ -26,3 +26,36 @@ function(InstallElsaModule ELSA_MODULE_NAME ELSA_MODULE_TARGET_NAME ELSA_MODULE_
) )
endif(ELSA_INSTALL) endif(ELSA_INSTALL)
endfunction() 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) ...@@ -12,6 +12,7 @@ if(NOT elsa_FIND_COMPONENTS)
foreach(_comp ${_supported_components}) foreach(_comp ${_supported_components})
include(${CMAKE_CURRENT_LIST_DIR}/elsa_${_comp}Targets.cmake) include(${CMAKE_CURRENT_LIST_DIR}/elsa_${_comp}Targets.cmake)
endforeach() endforeach()
message(STATUS "elsa found at ${CMAKE_CURRENT_LIST_DIR}")
message(STATUS "elsa found, using all modules") message(STATUS "elsa found, using all modules")
else() else()
foreach(_comp ${elsa_FIND_COMPONENTS}) foreach(_comp ${elsa_FIND_COMPONENTS})
......
...@@ -96,4 +96,4 @@ endif(ELSA_TESTING) ...@@ -96,4 +96,4 @@ endif(ELSA_TESTING)
registerComponent(${ELSA_MODULE_NAME}) registerComponent(${ELSA_MODULE_NAME})
# install the module # 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 #pragma once
// Core headers // Core headers
#include "core/elsaDefines.h" #include "elsaDefines.h"
#include "core/DataContainer.h" #include "DataContainer.h"
#include "core/DataDescriptor.h" #include "DataDescriptor.h"
#include "core/LinearOperator.h" #include "LinearOperator.h"
#include "core/IdenticalBlocksDescriptor.h" #include "IdenticalBlocksDescriptor.h"
#include "core/PartitionDescriptor.h" #include "PartitionDescriptor.h"
#include "core/RandomBlocksDescriptor.h" #include "RandomBlocksDescriptor.h"
// Functional headers // Functional headers
#include "functionals/Functional.h" #include "Functional.h"
#include "functionals/Residual.h" #include "Residual.h"
#include "functionals/LinearResidual.h" #include "LinearResidual.h"
#include "functionals/Huber.h" #include "Huber.h"
#include "functionals/L1Norm.h" #include "L1Norm.h"
#include "functionals/L2NormPow2.h" #include "L2NormPow2.h"
#include "functionals/WeightedL2NormPow2.h" #include "WeightedL2NormPow2.h"
#include "functionals/LInfNorm.h" #include "LInfNorm.h"
#include "functionals/PseudoHuber.h" #include "PseudoHuber.h"
#include "functionals/Quadric.h" #include "Quadric.h"
#include "functionals/EmissionLogLikelihood.h" #include "EmissionLogLikelihood.h"
#include "functionals/TransmissionLogLikelihood.h" #include "TransmissionLogLikelihood.h"
// Generators headers // Generators headers
#include "generators/PhantomGenerator.h" #include "PhantomGenerator.h"
#include "generators/CircleTrajectoryGenerator.h" #include "CircleTrajectoryGenerator.h"
// IO headers // IO headers
#include "io/EDFHandler.h" #include "EDFHandler.h"
#include "io/MHDHandler.h" #include "MHDHandler.h"
// Logging headers // Logging headers
#include "logging/Logger.h" #include "Logger.h"
#include "logging/LogGuard.h" #include "LogGuard.h"
#include "logging/Timer.h" #include "Timer.h"
// Operator headers // Operator headers
#include "operators/Identity.h" #include "Identity.h"
#include "operators/Scaling.h" #include "Scaling.h"
#include "operators/FiniteDifferences.h" #include "FiniteDifferences.h"
#include "operators/BlockLinearOperator.h" #include "BlockLinearOperator.h"
// Problem headers // Problem headers
#include "problems/Problem.h" #include "Problem.h"
#include "problems/RegularizationTerm.h" #include "RegularizationTerm.h"
#include "problems/QuadricProblem.h" #include "QuadricProblem.h"
#include "problems/WLSProblem.h" #include "WLSProblem.h"
#include "problems/TikhonovProblem.h" #include "TikhonovProblem.h"
// Projector headers // Projector headers
#include "projectors/Geometry.h" #include "Geometry.h"
#include "projectors/BinaryMethod.h" #include "BinaryMethod.h"
#include "projectors/JosephsMethod.h" #include "JosephsMethod.h"
#include "projectors/SiddonsMethod.h" #include "SiddonsMethod.h"
// CUDA projectors // CUDA projectors
#ifdef ELSA_CUDA_PROJECTORS #ifdef ELSA_CUDA_PROJECTORS
#include "projectors_cuda/SiddonsMethodCUDA.h" #include "SiddonsMethodCUDA.h"
#include "projectors_cuda/JosephsMethodCUDA.h" #include "JosephsMethodCUDA.h"
#endif #endif
// Solver headers // Solver headers
#include "solvers/Solver.h" #include "Solver.h"
#include "solvers/GradientDescent.h" #include "GradientDescent.h"
#include "solvers/CG.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