Skip to content
This repository was archived by the owner on Sep 15, 2021. It is now read-only.

Commit fc16632

Browse files
committed
COMP: Improve support for building as a "Slicer Remote module"
This commit allows to remove the workaround added to the Slicer build system to ensure OpenIGTLink was found before building OpenIGTLinkIF. See https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_system/Remote_Module
1 parent 87eaa9b commit fc16632

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ set(MODULE_TITLE "OpenIGTLink I/F")
66
string(TOUPPER ${MODULE_NAME} MODULE_NAME_UPPER)
77

88
#-----------------------------------------------------------------------------
9-
find_package(Slicer REQUIRED)
10-
include(${Slicer_USE_FILE})
9+
if(Slicer_SOURCE_DIR)
10+
find_package(OpenIGTLink REQUIRED)
11+
include(${OpenIGTLink_USE_FILE})
12+
else()
13+
find_package(Slicer REQUIRED)
14+
include(${Slicer_USE_FILE})
15+
endif()
1116

1217
# --------------------------------------------------------------------------
1318
# Check if version 2 protocol is available
@@ -94,7 +99,6 @@ slicerMacroBuildQtModule(
9499
RESOURCES ${MODULE_RESOURCES}
95100
)
96101

97-
98102
if(BUILD_TESTING)
99103
#add_subdirectory(Testing)
100104
endif()

0 commit comments

Comments
 (0)