|
1 | | -cmake_minimum_required(VERSION 3.16.3...3.19.7 FATAL_ERROR) |
| 1 | +cmake_minimum_required(VERSION 3.17...4.0) |
2 | 2 |
|
3 | | -project(LayerDisplayableManager) |
| 3 | +project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION}) |
4 | 4 |
|
5 | | -#----------------------------------------------------------------------------- |
6 | | -# Extension meta-information |
7 | | -set(EXTENSION_HOMEPAGE "https://github.com/KitwareMedical/SlicerLayerDisplayableManager") |
8 | | -set(EXTENSION_CONTRIBUTORS "Thibault Pelletier (Kitware SAS)") |
9 | | -set(EXTENSION_DESCRIPTION "A 3D Slicer module introducing a new displayable manager architecture for layered rendering and interaction handling.") |
10 | | -set(EXTENSION_ICONURL "https://github.com/KitwareMedical/SlicerLayerDisplayableManager/raw/main/Docs/LayerDisplayableManager.png") |
11 | | -set(EXTENSION_SCREENSHOTURLS "https://github.com/KitwareMedical/SlicerLayerDisplayableManager/raw/main/Docs/LayeredDisplayableManager_UML.jpg") |
12 | | -set(EXTENSION_DEPENDS "NA") # Specified as a list or "NA" if no dependencies |
| 5 | +find_package(Slicer CONFIG REQUIRED) |
13 | 6 |
|
14 | | -#----------------------------------------------------------------------------- |
15 | | -# Extension dependencies |
16 | | -find_package(Slicer REQUIRED) |
17 | | -include(${Slicer_USE_FILE}) |
| 7 | +include(FetchContent) |
| 8 | +FetchContent_Declare(vtk-sdk-python-helper |
| 9 | + GIT_REPOSITORY https://github.com/Kitware/vtk-sdk-python-wheel-helper.git |
| 10 | + GIT_TAG main |
| 11 | +) |
| 12 | +FetchContent_MakeAvailable(vtk-sdk-python-helper) |
18 | 13 |
|
19 | | -#----------------------------------------------------------------------------- |
20 | | -# Extension modules |
21 | | -add_subdirectory(LayerDM) |
| 14 | +set(modules |
| 15 | + SlicerLayerDM::Logic |
| 16 | + SlicerLayerDM::MRML |
| 17 | + SlicerLayerDM::MRMLDisplayableManager |
| 18 | +) |
22 | 19 |
|
23 | | -#----------------------------------------------------------------------------- |
24 | | -include(${Slicer_EXTENSION_GENERATE_CONFIG}) |
25 | | -include(${Slicer_EXTENSION_CPACK}) |
| 20 | +# Install runtime only dependencies |
| 21 | +vtksdk_build_modules(${SKBUILD_PROJECT_NAME} |
| 22 | + MODULES ${modules} |
| 23 | + DEPENDENCIES slicer_core |
| 24 | +) |
| 25 | +vtksdk_generate_package_init(${SKBUILD_PROJECT_NAME} |
| 26 | + MODULES ${modules} |
| 27 | + DEPENDENCIES slicer_core |
| 28 | +) |
| 29 | + |
| 30 | +# Make this package part of the slicer meta package |
| 31 | +install(FILES |
| 32 | + ${CMAKE_SOURCE_DIR}/Python/slicer_layerdm.py |
| 33 | + DESTINATION slicer |
| 34 | +) |
0 commit comments