Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake V2 + Cpp20 + (Almost) Header only #1757

Merged
merged 67 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
fc6fba2
Update CMake version
BDoignies Jan 10, 2025
535f7b0
C++20 + start to remove cpp files
BDoignies Jan 10, 2025
aa8d6fc
Remove .cpp files in base
BDoignies Jan 13, 2025
a8e8f99
Fix compilation (C++20 allocator + forgot inline)
BDoignies Jan 13, 2025
a066a0a
WIP new CMake
BDoignies Jan 14, 2025
7531e01
Move dependancies to deps/ folder
BDoignies Jan 14, 2025
16f0a0a
C++20 enum deprecation
BDoignies Jan 14, 2025
9f3069a
Added example, removes unnecessary global functions
BDoignies Jan 14, 2025
c3aa17c
Added back .in files
BDoignies Jan 14, 2025
04f7926
New CMake managment
BDoignies Jan 15, 2025
24be192
Remove legacy CMakeLists
BDoignies Jan 15, 2025
e355433
Reinstate doxygen
BDoignies Jan 15, 2025
058b4c9
Fixs
BDoignies Jan 16, 2025
238cb3e
Activate github actions for main2.0
dcoeurjo Jan 17, 2025
3be5942
Color does not include Common.h anymore
dcoeurjo Jan 17, 2025
139612c
Merging dgtal variable names (tbc)
dcoeurjo Jan 1, 2025
6d45063
Merge branch 'renamingCmakeVars' into CMakev2
BDoignies Jan 17, 2025
ae48a70
Fixe compil errors
BDoignies Jan 17, 2025
56a3ea0
Update ITK to run on gh
BDoignies Jan 17, 2025
d8c03d2
Debug message to see standard set by windows
BDoignies Jan 17, 2025
dd50ae6
Set conan standard (hopefully)
BDoignies Jan 20, 2025
7029072
Move add_subdirectory for target to be available everywhere
BDoignies Jan 20, 2025
18dc885
Fix compil bugs
BDoignies Jan 20, 2025
5900502
All tests for debug purposes
BDoignies Jan 20, 2025
cd9d8f7
Resotre conan and set standard in profile
BDoignies Jan 20, 2025
f55c94c
Fix compile warnings
BDoignies Jan 20, 2025
f666133
Conan file 3rd try
BDoignies Jan 20, 2025
8340041
Fix warning + conanfile
BDoignies Jan 21, 2025
dfee5da
Build shared / static lib depending on option
BDoignies Jan 22, 2025
ff7eec9
Test fixing ubuntu compil warnings
BDoignies Jan 22, 2025
5d71d23
Fix windows
BDoignies Jan 22, 2025
b48c9b2
Remove warning (known issue of GCC)
BDoignies Jan 22, 2025
734f4c4
Add ref to for-range loop
BDoignies Jan 22, 2025
bbc7acd
How can it be wrong?
BDoignies Jan 22, 2025
4b140f0
Fix unitialized variable
BDoignies Jan 22, 2025
1a60e18
Trying with auto
BDoignies Jan 22, 2025
e2aac2d
Fix declaration order
BDoignies Jan 23, 2025
9ed9fd4
Replace std w/ boost reverse_it
BDoignies Jan 23, 2025
e4afa0f
Boost reverse_iterator fix
BDoignies Jan 23, 2025
3bd1b9b
Fix documentation
BDoignies Jan 23, 2025
90eb3f3
Provide path for find_package
BDoignies Jan 23, 2025
26af8c1
Fix DGtalTools (/ \ tests & examples disabled)
BDoignies Jan 24, 2025
eedcd4b
Add fPIC to BoostAddons for Python wraping to link properly
BDoignies Feb 7, 2025
cda4615
Updated ChangeLog to notify ITK upgrade
BDoignies Feb 7, 2025
63d18a4
Remove unused parameters instead of ((void))
BDoignies Feb 7, 2025
bf581b8
Remove commented code
BDoignies Feb 7, 2025
743698e
Remove bad indent
BDoignies Feb 7, 2025
c3163ee
Remove comment for unused variable
BDoignies Feb 7, 2025
62169e2
Conflicts
dcoeurjo Feb 11, 2025
482fab9
Updated documentation and changelog
BDoignies Feb 11, 2025
77b8f27
Fix missing typename
BDoignies Feb 12, 2025
1475de5
Fix DGTalConfig.cmake exported variables
BDoignies Feb 12, 2025
d994142
ReAdd compile definition removed in #1754 (necessary for DGtalTools)
BDoignies Feb 12, 2025
b83a465
New workflow file for PR on main2.0
BDoignies Feb 12, 2025
9a10cdc
Fix indents of new workflow style
BDoignies Feb 12, 2025
64d1bbb
Fix order of new workflow
BDoignies Feb 12, 2025
6b5a9d2
Debug File to see why CMake does not find modules
BDoignies Feb 12, 2025
219308c
Make DGTalTargets.cmake available to DGTalConfig.cmake in build direc…
BDoignies Feb 12, 2025
34ec924
Add namespace to export
BDoignies Feb 13, 2025
e07c0c2
Filter ITK include paths
BDoignies Feb 13, 2025
41a026b
Cleaning workflow file
BDoignies Feb 13, 2025
8ca7fa8
Move python tests to base action file (not same requirements)
BDoignies Feb 13, 2025
7b3419c
Activate tests and other system build
BDoignies Feb 13, 2025
8ffe538
Forgot to run tests
BDoignies Feb 13, 2025
01e77aa
Remove python config
BDoignies Feb 13, 2025
efb5efe
Fix codacity report
BDoignies Feb 13, 2025
4a5dc60
Update .github/workflows/build-PR2.0.yml
dcoeurjo Feb 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions .github/workflows/build-PR2.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: CI (linux/macOS/windows), PR (2.0)

on:
push:
branches: [ main2.0 ]
pull_request:
branches: [ main2.0 ]

env:
TESTBLACKLIST: "(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels)"
CONFIG_GLOBAL: -DDGTAL_BUILD_EXAMPLES=true -DDGTAL_BUILD_TESTS=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10
CONFIG_LINUX: -DUSE_CCACHE=NO -DDGTAL_WITH_OPENMP=true -DDGTAL_WITH_GMP=true -DDGTAL_WITH_FFTW3=true -DDGTAL_WITH_CGAL=true -DDGTAL_WITH_LIBIGL=true -DWARNING_AS_ERROR=ON -DDGTAL_WITH_HDF5=true -DWITH_QGLVIEWER=true -DDGTAL_WITH_CAIRO=true -DDGTAL_WITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DDGTAL_BUILD_POLYSCOPE_EXAMPLES=true
CONFIG_MAC: -DUSE_CCACHE=NO -DDGTAL_WITH_GMP=true -DDGTAL_BUILD_POLYSCOPE_EXAMPLES=true -DDGTAL_WITH_CGAL=true -DDGTAL_WITH_LIBIGL=true
CONFIG_WINDOWS: -DDGTAL_WITH_OPENMP=true #-DDGTAL_WITH_GMP=true -DDGTAL_WITH_FFTW3=true -DDGTAL_WITH_CAIRO=true -DDGTAL_WITH_ITK=true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
BUILD_TYPE: [Release]
python-version: ["3.9"]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install linux deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install ccache zsh libqglviewer-dev-qt5 libcgal-dev libboost-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit5-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev

- name: Install macOS deps
if: matrix.os == 'macOS-latest'
run: brew install boost ninja gmp libomp ccache cgal

- name: Install conan
if: matrix.os == 'windows-latest'
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 2.4.0

- name: Create conan default profile
if: matrix.os == 'windows-latest'
run: |
conan profile detect --force


- uses: actions/cache@v4
if: matrix.os == 'windows-latest'
with:
path: ~/.conan2
key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }}

- name: Get white list of tests
run: |
echo "::set-output name=WHITELIST::$(${{runner.workspace}}/DGtal/.github/workflows/create_whitelist.sh)"
id: whitelist

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake (linux)
if: matrix.os == 'ubuntu-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_LINUX -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" -G Ninja

- name: Configure CMake (macOS)
if: matrix.os == 'macOS-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_MAC -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"


- name: Configure CMake (windows)
if: matrix.os == 'windows-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
conan install $GITHUB_WORKSPACE --build=missing -s:a compiler.cppstd=20
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"

- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config ${{ matrix.BUILD_TYPE }} --parallel 3

- name: Test
working-directory: ${{runner.workspace}}/build
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
shell: bash
run: |
echo ctest -C ${{ matrix.BUILD_TYPE }} --output-on-failure -E $TESTBLACKLIST
ctest -C $${{ matrix.BUILD_TYPE }} --output-on-failure -E $TESTBLACKLIST

- name: DGtalTools (linux only, we check this PR against DGtalTools PR main2.0)
if: matrix.os == 'ubuntu-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
git clone --depth 1 https://github.com/DGtal-team/DGtalTools.git
cd DGtalTools
git fetch origin pull/467/head:main2.0
git checkout main2.0
mkdir buildDGtalTools
cd buildDGtalTools
cmake .. -DCMAKE_MODULE_PATH=${{runner.workspace}}/DGtal/cmake/deps -DDGtal_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
ninja


# Documentatin (build, check and deploy)
Documentation:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up
run: |
sudo apt-get update
sudo apt-get install libboost-dev graphviz texlive doxygen

- name: Building pages
run: |
mkdir build
cd build
cmake ..
wget --no-check-certificate -O "${{runner.workspace}}/DGtal/build/DGtalTools-tagfile" http://dgtal.org/doc/tags/DGtalTools-tagfile;
make doc > buildDoc.log

- name: Checking doc
run: |
pwd
export BUILD_DIR=${{runner.workspace}}/DGtal/build
export SRC_DIR=${{runner.workspace}}/DGtal/
.github/workflows/checkDoxygenDocumentation.sh
#&& .github/workflows/check_src_file_tag.sh
4 changes: 2 additions & 2 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI (linux/macOS/windows), master

on:
push:
branches: [ master, main2.0 ]
branches: [ master ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
conan install $GITHUB_WORKSPACE --build=missing
conan install $GITHUB_WORKSPACE --build=missing -s:a compiler.cppstd=20
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"

- name: Build
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/buildAndDocumentation-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: CI (linux/macOS/windows), PR

on:
pull_request:
branches: [ master, main2.0 ]
branches: [ master ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
TESTBLACKLIST: "(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels)"
CONFIG_GLOBAL: -DDGTAL_BUILD_EXAMPLES=true -DDGTAL_BUILD_TESTS=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10
CONFIG_GLOBAL: -DDGTAL_BUILD_EXAMPLES=true -DDGTAL_BUILD_TESTS=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10
CONFIG_LINUX: -DUSE_CCACHE=NO -DDGTAL_WITH_OPENMP=true -DDGTAL_WITH_GMP=true -DDGTAL_WITH_CGAL=true -DDGTAL_WITH_LIBIGL=true -DDGTAL_WITH_FFTW3=true -DWARNING_AS_ERROR=ON -DDGTAL_WITH_HDF5=true -DWITH_QGLVIEWER=true -DDGTAL_WITH_CAIRO=true -DDGTAL_WITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DDGTAL_BUILD_POLYSCOPE_EXAMPLES=true
CONFIG_MAC: -DUSE_CCACHE=NO -DDGTAL_WITH_GMP=true -DDGTAL_BUILD_POLYSCOPE_EXAMPLES=true -DDGTAL_WITH_CGAL=true -DDGTAL_WITH_LIBIGL=true
CONFIG_WINDOWS: -DDGTAL_WITH_OPENMP=true #-DDGTAL_WITH_GMP=true -DDGTAL_WITH_FFTW3=true -DDGTAL_WITH_CAIRO=true -DDGTAL_WITH_ITK=true
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
conan install $GITHUB_WORKSPACE --build=missing
conan install $GITHUB_WORKSPACE --build=missing -s:a compiler.cppstd=20
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"

- name: Build
Expand Down Expand Up @@ -118,8 +118,9 @@ jobs:
cd DGtalTools
mkdir buildDGtalTools
cd buildDGtalTools
echo cmake .. -DDGTAL_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
cmake .. -DDGtal_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
ls
echo cmake .. -DCMAKE_PREFIX_PATH=${{runner.workspace}}/DGtal/cmake/deps -DDGTAL_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
cmake .. -DCMAKE_PREFIX_PATH=${{runner.workspace}}/DGtal/cmake/deps -DDGtal_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
ninja

# Documentatin (build, check and deploy)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pythonBindings-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev libcgal-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit5-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev libcgal-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit5-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev

- name: Installing dependencies (macOS)
if: matrix.os == 'macOS-latest'
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
conan install $GITHUB_WORKSPACE --build=missing
conan install $GITHUB_WORKSPACE --build=missing -s:a compiler.cppstd=20
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_WINDOWS


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonBindings-Pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
conan install $GITHUB_WORKSPACE --build=missing
conan install $GITHUB_WORKSPACE --build=missing -s:a compiler.cppstd=20
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_WINDOWS

- name: Setting build informations (Windows)
Expand Down
84 changes: 20 additions & 64 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -----------------------------------------------------------------------------
# Project definition
# -----------------------------------------------------------------------------
cmake_minimum_required (VERSION 3.11)
cmake_policy(SET CMP0057 NEW) # the new interpretation of IN_LIST is by default not set (at least until 3.21.1).
project (DGtal)
cmake_minimum_required (VERSION 3.20)
project (DGtal VERSION 2.0.0)

# -----------------------------------------------------------------------------
# By default, do not warn when built on machines using only VS Express:
Expand All @@ -12,27 +11,30 @@ if(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
endif()

# -----------------------------------------------------------------------------
# Define variables and cmake parameters, and display some information
# -----------------------------------------------------------------------------
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/deps)

# @TODO : See if those variable are still usefull,
# Note that they are set in source code !
set(DGtal_VERSION_MAJOR ${CMAKE_PROJECT_VERSION_MAJOR})
set(DGtal_VERSION_MINOR ${CMAKE_PROJECT_VERSION_MINOR})
set(DGtal_VERSION_PATCH ${CMAKE_PROJECT_VERSION_PATCH})
set(DGTAL_VERSION ${CMAKE_PROJECT_VERSION})
set(PROJECT_VERSION ${CMAKE_PROJECT_VERSION})
set(VERSION ${CMAKE_PROJECT_VERSION})


set(DGtal_VERSION_MAJOR 2)
set(DGtal_VERSION_MINOR 0)
set(DGtal_VERSION_PATCH beta)
set(DGTAL_VERSION "${DGtal_VERSION_MAJOR}.${DGtal_VERSION_MINOR}.${DGtal_VERSION_PATCH}")
set(PROJECT_VERSION "${DGtal_VERSION_MAJOR}.${DGtal_VERSION_MINOR}.${DGtal_VERSION_PATCH}")
set(VERSION ${DGtal_VERSION_MAJOR}.${DGtal_VERSION_MINOR}.${DGtal_VERSION_PATCH})
# -----------------------------------------------------------------------------
# Common build options/settings
# -----------------------------------------------------------------------------
include(Common)

#------------------------------------------------------------------------------
# Add DGtal library
#------------------------------------------------------------------------------
add_subdirectory(src)

# -----------------------------------------------------------------------------
# Development and debug options
# -----------------------------------------------------------------------------
Expand All @@ -45,58 +47,12 @@ message(STATUS "Downloading external projects")
include(FetchExternalDeps)
message(STATUS "Done.")

#------------------------------------------------------------------------------
# Add DGtal library
#------------------------------------------------------------------------------
# Include CPP files to add to the library target
#
# each subdir can contain a ModuleSRC.txt file
# with a set command on the variable ${DGTAL_SRC}
#
include(src/DGtal/base/ModuleSRC.cmake)
include(src/DGtal/io/ModuleSRC.cmake)
include(src/DGtal/helpers/ModuleSRC.cmake)
## Board dependency
include(src/Board/ModuleSRC.cmake)
## Boost Add-ons
include(src/BoostAddons/ModuleSRC.cmake)

list(TRANSFORM DGTAL_SRC PREPEND "src/")
list(TRANSFORM BOARD_SRC PREPEND "src/")
list(TRANSFORM DGTALIO_SRC PREPEND "src/")

# DGtal Target. Library is added on the top directory to use target_link_libraries for CMake < 3.13
add_library (DGtal ${DGTAL_SRC} ${DGTALIO_SRC} ${BOARD_SRC} )
target_include_directories(DGtal PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/src>
# INSTALL_INTERFACE must not contain absolute paths
$<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR_RELATIVE}>
)

# -----------------------------------------------------------------------------
# Check mandatory and optional dependencies
# -----------------------------------------------------------------------------
include(CheckDGtalDependencies)
include(CheckDGtalOptionalDependencies)

# -----------------------------------------------------------------------------
# Install
# -----------------------------------------------------------------------------
install(TARGETS DGtal
# IMPORTANT: Add the DGtal library to the "export-set"
EXPORT DGtalLibraryDepends
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT bin
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT shlib
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
#PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}/DGtal"
COMPONENT dev)

# -----------------------------------------------------------------------------
# Common build options/settings
# -----------------------------------------------------------------------------
include(OSDependentSettings)

# -----------------------------------------------------------------------------
# Randomized build 1/2.
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -138,11 +94,6 @@ include(GeneratorSpecific)
# -----------------------------------------------------------------------------
include(OSDependentSettings)

# -----------------------------------------------------------------------------
# Install settings
# -----------------------------------------------------------------------------
include(Install)

#------------------------------------------------------------------------------
# Python wrappings
#------------------------------------------------------------------------------
Expand All @@ -152,3 +103,8 @@ include(PythonWrappings)
# Unzip and install topology Look up Tables.
# -----------------------------------------------------------------------------
include(NeighborhoodTablesConfig)

# -----------------------------------------------------------------------------
# Unzip and install topology Look up Tables.
# -----------------------------------------------------------------------------
include(Install)
11 changes: 11 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# DGtal 2.0

- *General*
- Upgrade of ITK to version 5 and above (Bastien Doignies, [#1757](https://github.com/DGtal-team/DGtal/pull/1757))
- C++20 support and new minimal standard (Bastien Doignies, [#1757](https://github.com/DGtal-team/DGtal/pull/1757))
- Library is now (almost) header only (Bastien Doignies, [#1757](https://github.com/DGtal-team/DGtal/pull/1757))
- Fix compilation warnings (Bastien Doignies, [#1757](https://github.com/DGtal-team/DGtal/pull/1757))

- *CMake*
- Updated to version 3.20 minimum (contemporary version of C++20's new minimal standard) (Bastien Doignies, [#1757](https://github.com/DGtal-team/DGtal/pull/1757))
- Updated export and install commands to more modern cmake (Bastien Doignies, [#1757](https://github.com/DGtal-team/DGtal/pull/1757))
- Dependancies of DGTal are now build as separate targets (Bastien Doignies, [#1757](https://github.com/DGtal-team/DGtal/pull/1757))

- *Build*
- Prefixing main cmake variables with `DGTAL_` (David Coeurjolly, [#1753](https://github.com/DGtal-team/DGtal/pull/1753))
- Add a cmake option to use the ITK EIGEN configuration to solve the issue [#347](https://github.com/DGtal-team/DGtalTools/issues/437) of DGTalTools. (Bertrand Kerautret, [#1759](https://github.com/DGtal-team/DGtal/pull/1759)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RUN apt -y install doxygen

RUN apt -y install libcgal-dev

#RUN apt-get -y install libinsighttoolkit4-dev
#RUN apt-get -y install libinsighttoolkit5-dev

#RUN apt -y install libqglviewer-dev-qt5

Expand Down
Loading
Loading