Skip to content

Commit a2d0a8b

Browse files
authored
Add option to build all plugins in SuperBuild (#509)
1 parent c945972 commit a2d0a8b

File tree

6 files changed

+24
-5
lines changed

6 files changed

+24
-5
lines changed

.github/workflows/build-windows.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ jobs:
1818
fetch-depth: 0
1919

2020
- name: Configure CMake
21-
run: cmake IbisSuperBuild -G "Visual Studio 16 2019" -A x64 -B ${{github.workspace}}/b -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CONFIGURATION_TYPES=${{env.BUILD_TYPE}} -DQt5_DIR=D:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5
21+
run: cmake IbisSuperBuild
22+
-G "Visual Studio 16 2019" \
23+
-A x64 \
24+
-B ${{github.workspace}}/b \
25+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
26+
-DCMAKE_CONFIGURATION_TYPES=${{env.BUILD_TYPE}} \
27+
-DQt5_DIR=D:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5 \
28+
-DIBIS_BUILD_ELASTIX=TRUE \
29+
-DIBIS_BUILD_OPENCV=TRUE \
30+
-DIBIS_BUILD_ALL_PLUGINS:BOOL=TRUE
2231

2332
- name: Build
2433
run: cmake --build ${{github.workspace}}/b --config ${{env.BUILD_TYPE}} -j2

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ endif()
106106
# Create options to build or not the different dependent projects.
107107
#==================================================================
108108
option( IBIS_BUILD_DEFAULT_HARDWARE_MODULE "Build hardware module based on OpenIGTLink and dependencies (OpenIGTLink and OpenIGTLinkIO)" ON )
109+
option( IBIS_BUILD_ALL_PLUGINS "Build every plugin contained in the IbisPlugins and Extra directories" OFF )
109110

110111
find_package ( OpenCL QUIET )
111112
include(${CMAKE_COMMON_DIR}/OpenCLMacros.cmake)

IbisPlugins/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ endmacro()
7676
set( allEnabledIbisPlugins )
7777
foreach( ibisPlugin ${allIbisPlugins} )
7878
if( ${${${ibisPlugin}Option}} )
79-
CheckPlugin("${ibisPlugin}" "" "")
80-
list( APPEND allIbisEnabledPlugins ${ibisPlugin} )
79+
CheckPlugin( "${ibisPlugin}" "" "" )
80+
list( APPEND allIbisEnabledPlugins ${ibisPlugin} )
81+
elseif( ${IBIS_BUILD_ALL_PLUGINS} )
82+
list( APPEND allIbisEnabledPlugins ${ibisPlugin} )
8183
endif()
8284
endforeach()
8385

IbisPlugins/PedicleScrewNavigation/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ set( PluginHdrMoc
2020
set( PluginUi vertebraregistrationwidget.ui screwnavigationwidget.ui screwtablewidget.ui )
2121

2222
IF (NOT IBIS_PLUGINS_BUILD_GPU_RigidRegistration)
23-
message( SEND_ERROR "Cannot find the GPU_RigidRegistration plugin. PedicleScrewNavigation Plugin depends on GPU_RigidRegistration.\n" )
23+
message( WARNING "PedicleScrewNavigation Plugin depends on GPU_RigidRegistration, enabling it.\n" )
24+
set( IBIS_PLUGINS_BUILD_GPU_RigidRegistration ON )
2425
ENDIF()
2526

2627
IF (NOT IBIS_PLUGINS_BUILD_GPU_VolumeReconstruction)
27-
message( SEND_ERROR "Cannot find the GPU_VolumeReconstruction plugin. PedicleScrewNavigation Plugin depends on GPU_VolumeReconstruction.\n" )
28+
message( WARNING "PedicleScrewNavigation Plugin depends on GPU_VolumeReconstruction. enabling it.\n" )
29+
set( IBIS_PLUGINS_BUILD_GPU_VolumeReconstruction ON )
2830
ENDIF()
2931

3032
add_subdirectory( itkWeightRegistration )

IbisSuperBuild/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ option( IBIS_BUILD_MINIMAL_VTK "Build only the minimal set of VTK modules requir
4040
if( IBIS_BUILD_ELASTIX )
4141
option( IBIS_BUILD_MINIMAL_ELASTIX "Build only the minimal set of Elastix modules required by Ibis during the superbuild" ON )
4242
endif()
43+
option( IBIS_BUILD_ALL_PLUGINS "Build every plugin contained in the IbisPlugins and Extra directories" OFF )
4344

4445
# Build All External Dependencies except Qt (vtk, Itk, minc, etc.)
4546
set( vtk_name vtk-${IBIS_VTK_LONG_VERSION} )
@@ -89,4 +90,5 @@ ExternalProject_Add(
8990
-DOpenIGTLink_DIR:PATH=${IBIS_OPENIGTLINK_DIR}
9091
-DOpenIGTLinkIO_DIR:PATH=${IBIS_OPENIGTLINKIO_DIR}
9192
-DIBIS_BUILD_DEFAULT_HARDWARE_MODULE:BOOL=${IBIS_BUILD_IGTL_HARDWARE_SUPPORT}
93+
-DIBIS_BUILD_ALL_PLUGINS:BOOL=${IBIS_BUILD_ALL_PLUGINS}
9294
DEPENDS ${ibis_dependencies} )

IbisSuperBuild/IbisDeps/External_OpenCV.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ ExternalProject_Add( ${opencv_name}
2828
-DWITH_ITT:BOOL=OFF
2929
-DBUILD_opencv_python2:BOOL=FALSE
3030
-DBUILD_opencv_python3:BOOL=FALSE
31+
-DBUILD_opencv_python_bindings_generator:BOOL=FALSE
32+
-DBUILD_opencv_python_tests:BOOL=FALSE
33+
-DOPENCV_PYTHON_SKIP_DETECTION=ON
3134
-DBUILD_opencv_apps:BOOL=FALSE
3235
-DBUILD_JAVA:BOOL=FALSE
3336
-DBUILD_PACKAGE:BOOL=FALSE

0 commit comments

Comments
 (0)