-
Notifications
You must be signed in to change notification settings - Fork 2
/
ConfigureITK.cmake
83 lines (70 loc) · 2.1 KB
/
ConfigureITK.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
74
75
76
77
78
79
80
81
82
83
#
# Just finds the relevant include directory and libraries used to develop
# with itk
#Necessary include directories
# $(ITK_DIR)/Modules/ThirdParty/VNL/src/vxl/core
# $(ITK_DIR)/Modules/ThirdParty/VNL/src/vxl/vcl
# $(ITK_DIR)/VS2010/Modules/ThirdParty/VNL/src/vxl/vcl
# $(ITK_DIR)/VS2010/Modules/ThirdParty/VNL/src/vxl/core
#Used libraries
# itkvnl_algo-4.1.lib $(ITK_DIR)\VS2010\lib\Release
# itkvnl-4.1.lib $(ITK_DIR)\VS2010\lib\Release
# itkv3p_netlib-4.1.lib $(ITK_DIR)\VS2010\lib\Release
SET(ITK_VERSION 4.7 CACHE STRING "")
FIND_PATH(ITK_VNL_CORE_INCLUDE_DIR vnl/vnl_vector.h
/usr/local/include
/usr/include
/opt/local/include
)
FIND_PATH(ITK_BIN_VNL_CORE_INCLUDE_DIR vxl_config.h
/usr/local/include
/usr/include
/opt/local/include
)
FIND_PATH(ITK_VCL_INCLUDE_DIR vcl_iosfwd.h
/usr/local/include
/usr/include
/opt/local/include
)
FIND_PATH(ITK_BIN_VCL_INCLUDE_DIR vcl_config_manual.h
/usr/local/include
/usr/include
/opt/local/include
)
FIND_LIBRARY(ITK_KVNL_LIB
NAMES
itkvnl-4.2
PATHS
/usr/local/lib
/usr/lib
/opt/local/lib
)
FIND_LIBRARY(ITK_KVNL_ALGO_LIB
NAMES
itkvnl_algo-4.2
PATHS
/usr/local/lib
/usr/lib
/opt/local/lib
)
FIND_LIBRARY(ITK_KV3P_NETLIB_LIB
NAMES
itkv3p_netlib-4.2
PATHS
/usr/local/lib
/usr/lib
/opt/local/lib
)
SET(ITK_FOUND 0)
IF(ITK_VNL_CORE_INCLUDE_DIR AND ITK_BIN_VNL_CORE_INCLUDE_DIR AND ITK_VCL_INCLUDE_DIR AND ITK_BIN_VCL_INCLUDE_DIR)
IF(ITK_KVNL_LIB AND ITK_KVNL_ALGO_LIB AND ITK_KV3P_NETLIB_LIB)
SET(ITK_FOUND 1)
ENDIF(ITK_KVNL_LIB AND ITK_KVNL_ALGO_LIB AND ITK_KV3P_NETLIB_LIB)
ENDIF(ITK_VNL_CORE_INCLUDE_DIR AND ITK_BIN_VNL_CORE_INCLUDE_DIR AND ITK_VCL_INCLUDE_DIR AND ITK_BIN_VCL_INCLUDE_DIR)
SET(ITK_INCLUDES ${ITK_VNL_CORE_INCLUDE_DIR} ${ITK_BIN_VNL_CORE_INCLUDE_DIR} ${ITK_VCL_INCLUDE_DIR} ${ITK_BIN_VCL_INCLUDE_DIR})
SET(ITK_LIBRARIES ${ITK_KVNL_LIB} ${ITK_KVNL_ALGO_LIB} ${ITK_KV3P_NETLIB_LIB} )
IF(ITK_FOUND)
INCLUDE_DIRECTORIES(${ITK_INCLUDES})
ELSE(ITK_FOUND)
MESSAGE("PROBLEM: ITK not found.")
ENDIF(ITK_FOUND)