Massive reorganization of CMake files

This commit is contained in:
Paolo Andreetto
2020-06-29 14:44:26 +02:00
parent 9d899928b8
commit a60a21bfe4
14 changed files with 292 additions and 439 deletions

View File

@@ -1,53 +1,53 @@
set(HEADERS ContainerBox.h
Dense.h
Geometry.h
Transform.h
StructuredData.h
StructuredGrid.h
VoxImage.h
VoxRaytracer.h
Utils.h
VoxImageFilter.h
VoxImageFilter.hpp
VoxImageFilterLinear.hpp
VoxImageFilterMedian.hpp
VoxImageFilterABTrim.hpp
VoxImageFilterBilateral.hpp
VoxImageFilterThreshold.hpp
VoxImageFilter2ndStat.hpp
VoxImageFilterCustom.hpp
Accumulator.h
TriangleMesh.h
BitCode.h
Structured2DGrid.h
Structured4DGrid.h)
# HEADERS
set(HEADERS
ContainerBox.h
Dense.h
Geometry.h
Transform.h
StructuredData.h
StructuredGrid.h
VoxImage.h
VoxRaytracer.h
Utils.h
VoxImageFilter.h
VoxImageFilter.hpp
VoxImageFilterLinear.hpp
VoxImageFilterMedian.hpp
VoxImageFilterABTrim.hpp
VoxImageFilterBilateral.hpp
VoxImageFilterThreshold.hpp
VoxImageFilter2ndStat.hpp
VoxImageFilterCustom.hpp
Accumulator.h
TriangleMesh.h
BitCode.h
Structured2DGrid.h
Structured4DGrid.h
)
set(SOURCES VoxRaytracer.cpp
StructuredData.cpp
StructuredGrid.cpp
VoxImage.cpp
TriangleMesh.cpp
Dense.cpp
Structured2DGrid.cpp
Structured4DGrid.cpp)
set(LIBRARIES ${Eigen_LIBRARY}
${ROOT_LIBRARIES})
# SOURCES
set(SOURCES
VoxRaytracer.cpp
StructuredData.cpp
StructuredGrid.cpp
VoxImage.cpp
TriangleMesh.cpp
Dense.cpp
Structured2DGrid.cpp
Structured4DGrid.cpp
)
set(libname ${PACKAGE_LIBPREFIX}Math)
set(ULIB_SHARED_LIBRARIES ${ULIB_SHARED_LIBRARIES} ${libname} PARENT_SCOPE)
set(ULIB_SELECTED_MODULES ${ULIB_SELECTED_MODULES} Math PARENT_SCOPE)
set(LIBRARIES
${Boost_SERIALIZATION_LIBRARY}
${Boost_SIGNALS_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Eigen_LIBRARY}
${ROOT_LIBRARIES}
${PACKAGE_LIBPREFIX}Core
)
add_library(${libname} SHARED ${SOURCES})
set_target_properties(${libname} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_SOVERSION})
target_link_libraries(${libname} ${LIBRARIES})
install(TARGETS ${libname}
EXPORT "${PROJECT_NAME}Targets"
RUNTIME DESTINATION ${PACKAGE_INSTALL_BIN_DIR} COMPONENT bin
LIBRARY DESTINATION ${PACKAGE_INSTALL_LIB_DIR} COMPONENT lib)
install(FILES ${HEADERS} DESTINATION ${PACKAGE_INSTALL_INC_DIR}/Math)
uLib_add_shared_library(${uLib-module})
add_subdirectory(testing)

View File

@@ -28,11 +28,12 @@
#ifndef VOXIMAGEFILTERCUSTOM_HPP
#define VOXIMAGEFILTERCUSTOM_HPP
#include "Core/Macros.h"
#include <Math/Dense.h>
#include "Math/VoxImage.h"
#include "VoxImageFilter.h"
#define likely(expr) __builtin_expect(!!(expr), 1)
////////////////////////////////////////////////////////////////////////////////
///// VOXIMAGE FILTER CUSTOM /////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

View File

@@ -24,12 +24,12 @@
//////////////////////////////////////////////////////////////////////////////*/
#include <iostream>
#include "VoxRaytracer.h"
#include "Utils.h"
#include "Core/Macros.h"
#define unlikely(expr) __builtin_expect(!!(expr), 0)
inline float fast_sign(float f) { return 1 - 2 * (f < 0); }