-
Notifications
You must be signed in to change notification settings - Fork 0
/
External_BiiGOptitrack.cmake
73 lines (67 loc) · 2.93 KB
/
External_BiiGOptitrack.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#/*=========================================================================
#Date: Ag 2015
#Authors include:
#- Eugenio Marinetto [*][ç] emarinetto@hggm.es
#- Laura Sanz [*] lsanz@hggm.es
#- Javier Pascau [*][ç] jpascau@hggm.es
#[*] Laboratorio de Imagen Medica, Hospital Gregorio Maranon - http://image.hggm.es/
#[ç] Departamento de Bioingeniería e Ingeniería Aeroespacial. Universidad Carlos III de Madrid
#=========================================================================*/
IF(BiiGOptitrack_DIR)
# OpenIGTLink has been built already
FIND_PACKAGE(BiiGOptitrack REQUIRED PATHS ${BiiGOptitrack_DIR} NO_DEFAULT_PATH)
MESSAGE(STATUS "Using BiiGOptitrack available at: ${BiiGOptitrack_DIR}")
# Copy libraries to PLUS_EXECUTABLE_OUTPUT_PATH
IF ( ${CMAKE_GENERATOR} MATCHES "Visual Studio" )
FILE(COPY
${BiiGOptitrack_LIBRARY_DIRS}/
DESTINATION ${PLUS_EXECUTABLE_OUTPUT_PATH}/Release
FILES_MATCHING REGEX .*${CMAKE_SHARED_LIBRARY_SUFFIX}
)
FILE(COPY
${BiiGOptitrack_LIBRARY_DIRS}/
DESTINATION ${PLUS_EXECUTABLE_OUTPUT_PATH}/Debug
FILES_MATCHING REGEX .*${CMAKE_SHARED_LIBRARY_SUFFIX}
)
ELSE()
FILE(COPY
${BiiGOptitrack_LIBRARY_DIRS}/
DESTINATION ${PLUS_EXECUTABLE_OUTPUT_PATH}
FILES_MATCHING REGEX .*${CMAKE_SHARED_LIBRARY_SUFFIX}
)
ENDIF()
SET (PLUS_BiiGOptitrack_DIR "${BiiGOptitrack_DIR}" CACHE INTERNAL "Path to store BiiGOptitrack binaries")
ELSE(BiiGOptitrack_DIR)
# NPTrackingTools has not been built yet, so download and build it as an external project
SET (PLUS_BiiGOptitrack_SRC_DIR "${CMAKE_BINARY_DIR}/BiiGOptitrack")
SET (PLUS_BiiGOptitrack_DIR "${CMAKE_BINARY_DIR}/BiiGOptitrack-bin" CACHE INTERNAL "Path to store BiiGOptitrack binaries")
ExternalProject_Add( BiiGOptitrack
SOURCE_DIR "${PLUS_BiiGOptitrack_SRC_DIR}"
BINARY_DIR "${PLUS_BiiGOptitrack_DIR}"
#--Download step--------------
GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/HGGM-LIM/BiiGOptitrack"
GIT_TAG "PLUS-v2.0"
#--Configure step-------------
CMAKE_ARGS
${ep_common_args}
-DLIBRARY_OUTPUT_PATH:STRING=${PLUS_EXECUTABLE_OUTPUT_PATH}
-DBUILD_SHARED_LIBS:BOOL=${PLUSBUILD_BUILD_SHARED_LIBS}
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DBiiGOptitrack_USE_FAK_NPAPI:BOOL=OFF
-DUSE_CalibrationValidation:BOOL=OFF
-DUSE_IGTLinkPython:BOOL=OFF
-DUSE_Python:BOOL=OFF
-DUSE_OptitrackClient:BOOL=OFF
-DUSE_OptitrackServer:BOOL=OFF
-DUSE_TestOptitrack:BOOL=OFF
-DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
-DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
-DBiiGOptitrack_OpenIGTLink_EXTERNAL_DIR:PATH=${PLUS_OpenIGTLink_DIR}
-DBiiGOptitrack_ITK_EXTERNAL_DIR:PATH=${ITK_DIR}
#--Build step-----------------
#--Install step-----------------
INSTALL_COMMAND ""
DEPENDS ${BiiGOptitrack_DEPENDENCIES}
)
ENDIF(BiiGOptitrack_DIR)