Commit cb8e272e authored by hliu's avatar hliu
Browse files

ENH: Added CMake option for using OpenIGTLink library.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@7835 3bd1e089-480b-0410-8dfb-8563597acbee
parent f8d2d123
......@@ -174,34 +174,12 @@ endif(Slicer3_USE_BatchMake)
## MIDAS
option(Slicer3_USE_MIDAS "Build Slicer3 with MIDAS support." OFF)
## NaviTrack
option(Slicer3_USE_NAVITRACK "Build Slicer3 with NaviTrack support." OFF)
if(Slicer3_USE_NAVITRACK)
find_library(NAVITRACK_LIB
NAMES NaviTrack
PATHS ${NAVITRACK_LIB_DIR}
)
if(NAVITRACK_LIB-NOTFOUND)
message(FATAL_ERROR "Need NaviTrack to build")
endif(NAVITRACK_LIB-NOTFOUND)
# include file for OpenTracker 2.0
find_path(NAVITRACK_INC "OpenTracker/OpenTracker.h"
${NAVITRACK_INC_DIR}
)
if(NAVITRACK_INC-NOTFOUND)
message(FATAL_ERROR "Need OpenTracker.h to build")
endif(NAVITRACK_INC-NOTFOUND)
else(Slicer3_USE_NAVITRACK)
set(NAVITRACK_LIB "")
set(NAVITRACK_INC "")
endif(Slicer3_USE_NAVITRACK)
## IGSTK (Built in Slicer3-lib)
option(Slicer3_USE_IGSTK "Build Slicer3 with IGSTK support." OFF)
if(Slicer3_USE_IGSTK)
find_package(IGSTK REQUIRED)
include(${IGSTK_USE_FILE})
endif(Slicer3_USE_IGSTK)
## OpenIGTLink (Built in Slicer3-lib)
option(Slicer3_USE_OPENIGTLINK "Build Slicer3 with OpenIGTLink support." OFF)
if(Slicer3_USE_OPENIGTLINK)
find_package(OpenIGTLink REQUIRED)
include(${OpenIGTLink_USE_FILE})
endif(Slicer3_USE_OPENIGTLINK)
#-----------------------------------------------------------------------------
# Need some Tcl/Tk info
......
......@@ -136,7 +136,7 @@ set ::PYTHON_BIN_DIR $::Slicer3_LIB/python-build
set ::CMAKE_PATH $::Slicer3_LIB/CMake-build
set ::SOV_BINARY_DIR ""
set ::XVNC_EXECUTABLE " "
set ::OPENIGTLINK_DIR $::Slicer3_LIB/OpenIGTLink-build
set ::OpenIGTLink_DIR $::Slicer3_LIB/OpenIGTLink-build
set ::SLICERLIBCURL_SRC_DIR $::Slicer3_LIB/cmcurl
set ::SLICERLIBCURL_BUILD_DIR $::Slicer3_LIB/cmcurl-build
......@@ -147,7 +147,9 @@ set ::USE_SYSTEM_PYTHON "false"
set ::USE_PYTHON "off"
# CMake option for numerical Python, only matters if Python is on
set ::USE_NUMPY "ON"
# CMake Option for using OpenIGTLink library. Must be "OFF" or "ON", default is "OFF"
set ::USE_OPENIGTLINK "OFF"
switch $::tcl_platform(os) {
"SunOS" {
......@@ -195,7 +197,7 @@ switch $::tcl_platform(os) {
set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
set ::OPENIGTLINK_TEST_FILE $::OPENIGTLINK_DIR/bin/libOpenIGTLink.$shared_lib_ext
set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.$shared_lib_ext
set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
......@@ -235,7 +237,7 @@ switch $::tcl_platform(os) {
set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
set ::OPENIGTLINK_TEST_FILE $::OPENIGTLINK_DIR/bin/libOpenIGTLink.$shared_lib_ext
set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
}
......@@ -268,7 +270,7 @@ switch $::tcl_platform(os) {
set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
set ::OPENIGTLINK_TEST_FILE $::OPENIGTLINK_DIR/bin/libOpenIGTLink.$shared_lib_ext
set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
}
......@@ -302,7 +304,7 @@ switch $::tcl_platform(os) {
set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
set ::OPENIGTLINK_TEST_FILE $::OPENIGTLINK_DIR/bin/$::VTK_BUILD_TYPE/OpenIGTLink.lib
set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/$::VTK_BUILD_TYPE/OpenIGTLink.lib
set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.lib
}
default {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment