Skip to content

Commit

Permalink
Add option to build all plugins in SuperBuild (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
errollgarner authored Jun 28, 2023
1 parent c945972 commit a2d0a8b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ jobs:
fetch-depth: 0

- name: Configure CMake
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
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 \
-DIBIS_BUILD_ELASTIX=TRUE \
-DIBIS_BUILD_OPENCV=TRUE \
-DIBIS_BUILD_ALL_PLUGINS:BOOL=TRUE

- name: Build
run: cmake --build ${{github.workspace}}/b --config ${{env.BUILD_TYPE}} -j2
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ endif()
# Create options to build or not the different dependent projects.
#==================================================================
option( IBIS_BUILD_DEFAULT_HARDWARE_MODULE "Build hardware module based on OpenIGTLink and dependencies (OpenIGTLink and OpenIGTLinkIO)" ON )
option( IBIS_BUILD_ALL_PLUGINS "Build every plugin contained in the IbisPlugins and Extra directories" OFF )

find_package ( OpenCL QUIET )
include(${CMAKE_COMMON_DIR}/OpenCLMacros.cmake)
Expand Down
6 changes: 4 additions & 2 deletions IbisPlugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ endmacro()
set( allEnabledIbisPlugins )
foreach( ibisPlugin ${allIbisPlugins} )
if( ${${${ibisPlugin}Option}} )
CheckPlugin("${ibisPlugin}" "" "")
list( APPEND allIbisEnabledPlugins ${ibisPlugin} )
CheckPlugin( "${ibisPlugin}" "" "" )
list( APPEND allIbisEnabledPlugins ${ibisPlugin} )
elseif( ${IBIS_BUILD_ALL_PLUGINS} )
list( APPEND allIbisEnabledPlugins ${ibisPlugin} )
endif()
endforeach()

Expand Down
6 changes: 4 additions & 2 deletions IbisPlugins/PedicleScrewNavigation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ set( PluginHdrMoc
set( PluginUi vertebraregistrationwidget.ui screwnavigationwidget.ui screwtablewidget.ui )

IF (NOT IBIS_PLUGINS_BUILD_GPU_RigidRegistration)
message( SEND_ERROR "Cannot find the GPU_RigidRegistration plugin. PedicleScrewNavigation Plugin depends on GPU_RigidRegistration.\n" )
message( WARNING "PedicleScrewNavigation Plugin depends on GPU_RigidRegistration, enabling it.\n" )
set( IBIS_PLUGINS_BUILD_GPU_RigidRegistration ON )
ENDIF()

IF (NOT IBIS_PLUGINS_BUILD_GPU_VolumeReconstruction)
message( SEND_ERROR "Cannot find the GPU_VolumeReconstruction plugin. PedicleScrewNavigation Plugin depends on GPU_VolumeReconstruction.\n" )
message( WARNING "PedicleScrewNavigation Plugin depends on GPU_VolumeReconstruction. enabling it.\n" )
set( IBIS_PLUGINS_BUILD_GPU_VolumeReconstruction ON )
ENDIF()

add_subdirectory( itkWeightRegistration )
Expand Down
2 changes: 2 additions & 0 deletions IbisSuperBuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ option( IBIS_BUILD_MINIMAL_VTK "Build only the minimal set of VTK modules requir
if( IBIS_BUILD_ELASTIX )
option( IBIS_BUILD_MINIMAL_ELASTIX "Build only the minimal set of Elastix modules required by Ibis during the superbuild" ON )
endif()
option( IBIS_BUILD_ALL_PLUGINS "Build every plugin contained in the IbisPlugins and Extra directories" OFF )

# Build All External Dependencies except Qt (vtk, Itk, minc, etc.)
set( vtk_name vtk-${IBIS_VTK_LONG_VERSION} )
Expand Down Expand Up @@ -89,4 +90,5 @@ ExternalProject_Add(
-DOpenIGTLink_DIR:PATH=${IBIS_OPENIGTLINK_DIR}
-DOpenIGTLinkIO_DIR:PATH=${IBIS_OPENIGTLINKIO_DIR}
-DIBIS_BUILD_DEFAULT_HARDWARE_MODULE:BOOL=${IBIS_BUILD_IGTL_HARDWARE_SUPPORT}
-DIBIS_BUILD_ALL_PLUGINS:BOOL=${IBIS_BUILD_ALL_PLUGINS}
DEPENDS ${ibis_dependencies} )
3 changes: 3 additions & 0 deletions IbisSuperBuild/IbisDeps/External_OpenCV.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ ExternalProject_Add( ${opencv_name}
-DWITH_ITT:BOOL=OFF
-DBUILD_opencv_python2:BOOL=FALSE
-DBUILD_opencv_python3:BOOL=FALSE
-DBUILD_opencv_python_bindings_generator:BOOL=FALSE
-DBUILD_opencv_python_tests:BOOL=FALSE
-DOPENCV_PYTHON_SKIP_DETECTION=ON
-DBUILD_opencv_apps:BOOL=FALSE
-DBUILD_JAVA:BOOL=FALSE
-DBUILD_PACKAGE:BOOL=FALSE
Expand Down

0 comments on commit a2d0a8b

Please sign in to comment.