-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathigstkGenerateIGSTKConfig.cmake
101 lines (82 loc) · 2.62 KB
/
igstkGenerateIGSTKConfig.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Generate the IGSTKConfig.cmake file in the build tree. Also configure
# one for installation. The file tells external projects how to use
# IGSTK.
#-----------------------------------------------------------------------------
# Settings specific to the build tree.
# The "use" file.
SET(IGSTK_USE_FILE
${IGSTK_BINARY_DIR}/UseIGSTK.cmake
)
# The library dependencies file.
SET(IGSTK_LIBRARY_DEPENDS_FILE
${IGSTK_BINARY_DIR}/IGSTKLibraryDepends.cmake
)
# The build settings file.
SET(IGSTK_BUILD_SETTINGS_FILE
${IGSTK_BINARY_DIR}/IGSTKBuildSettings.cmake
)
# Library directory.
SET(IGSTK_LIBRARY_DIRS_CONFIG
${IGSTK_LIBRARY_PATH}
${ITK_LIBRARY_DIRS}
${VTK_LIBRARY_DIRS}
)
IF(IGSTK_USE_FLTK)
SET(IGSTK_LIBRARY_DIRS_CONFIG
${IGSTK_LIBRARY_DIRS_CONFIG}
${FLTK_LIBRARY_DIRS}
)
ENDIF(IGSTK_USE_FLTK)
IF(IGSTK_USE_MicronTracker)
GET_FILENAME_COMPONENT(MTC_LIBRARY_DIR ${MTC_LIBRARY} PATH)
SET(IGSTK_LIBRARY_DIRS_CONFIG
${IGSTK_LIBRARY_DIRS_CONFIG}
${MTC_LIBRARY_DIR}
)
ENDIF(IGSTK_USE_MicronTracker)
# Determine the include directories needed.
SET(IGSTK_INCLUDE_DIRS_CONFIG
${IGSTK_INCLUDE_DIRS_BUILD_TREE}
${IGSTK_INCLUDE_DIRS_SOURCE_TREE}
${IGSTK_INCLUDE_DIRS_SYSTEM}
)
IF(IGSTK_USE_MicronTracker)
SET(IGSTK_INCLUDE_DIRS_SOURCE_TREE
${IGSTK_INCLUDE_DIRS_SOURCE_TREE}
${MTC_INCLUDE_DIRECTORY}
)
ENDIF(IGSTK_USE_MicronTracker)
#-----------------------------------------------------------------------------
# Configure IGSTKConfig.cmake for the build tree.
CONFIGURE_FILE(${IGSTK_SOURCE_DIR}/IGSTKConfig.cmake.in
${IGSTK_BINARY_DIR}/IGSTKConfig.cmake @ONLY IMMEDIATE)
#-----------------------------------------------------------------------------
# Settings specific to the install tree.
# The "use" file.
SET(IGSTK_USE_FILE
${IGSTK_INSTALL_PACKAGE_DIR}/UseIGSTK.cmake
)
# The library dependencies file.
SET(IGSTK_LIBRARY_DEPENDS_FILE
${IGSTK_INSTALL_PACKAGE_DIR}/IGSTKLibraryDepends.cmake
)
# The build settings file.
SET(IGSTK_BUILD_SETTINGS_FILE
${IGSTK_INSTALL_PACKAGE_DIR}/IGSTKBuildSettings.cmake
)
# Include directories.
SET(IGSTK_INCLUDE_DIRS_CONFIG
# ${IGSTK_INCLUDE_DIRS_INSTALL_TREE}
# ${IGSTK_INCLUDE_DIRS_SYSTEM}
${IGSTK_INSTALL_INCLUDE_DIR}
)
# Link directories.
SET(IGSTK_LIBRARY_DIRS_CONFIG
${IGSTK_INSTALL_LIB_DIR}
${ITK_LIBRARY_DIRS}
${VTK_LIBRARY_DIRS}
)
#-----------------------------------------------------------------------------
# Configure IGSTKConfig.cmake for the install tree.
CONFIGURE_FILE(${IGSTK_SOURCE_DIR}/IGSTKConfig.cmake.in
${IGSTK_BINARY_DIR}/Utilities/IGSTKConfig.cmake @ONLY IMMEDIATE)