0026460: Implicit cast to TopoDS_Shape compilation error due to ambiguous conversion
[occt.git] / adm / cmake / tcl.cmake
CommitLineData
9f33b387 1# tcl
ad211ad3 2
9f33b387 3if (NOT DEFINED INSTALL_TCL)
4 set (INSTALL_TCL OFF CACHE BOOL "Is tcl lib required to be copied into install directory")
5endif()
ad211ad3 6
9f33b387 7# tcl directory
8if (NOT DEFINED 3RDPARTY_TCL_DIR)
9 set (3RDPARTY_TCL_DIR "" CACHE PATH "The directory containing tcl")
10endif()
ad211ad3 11
9f33b387 12# tcl include directory
13if (NOT DEFINED 3RDPARTY_TCL_INCLUDE_DIR)
14 set (3RDPARTY_TCL_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tcl")
15endif()
ad211ad3 16
9f33b387 17# tk include directory
18if (NOT DEFINED 3RDPARTY_TK_INCLUDE_DIR)
19 set (3RDPARTY_TK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tk")
20endif()
ad211ad3 21
9f33b387 22# tcl library file (with absolute path)
23if (NOT DEFINED 3RDPARTY_TCL_LIBRARY OR NOT 3RDPARTY_TCL_LIBRARY_DIR)
24 set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "tcl library" FORCE)
25endif()
26
27# tcl library directory
28if (NOT DEFINED 3RDPARTY_TCL_LIBRARY_DIR)
29 set (3RDPARTY_TCL_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tcl library")
30endif()
31
32# tk library file (with absolute path)
33if (NOT DEFINED 3RDPARTY_TK_LIBRARY OR NOT 3RDPARTY_TK_LIBRARY_DIR)
34 set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "tk library" FORCE)
35endif()
36
37# tk library directory
38if (NOT DEFINED 3RDPARTY_TK_LIBRARY_DIR)
39 set (3RDPARTY_TK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tk library")
40endif()
41
42# tcl shared library (with absolute path)
43if (WIN32)
44 if (NOT DEFINED 3RDPARTY_TCL_DLL OR NOT 3RDPARTY_TCL_DLL_DIR)
45 set (3RDPARTY_TCL_DLL "" CACHE FILEPATH "tcl shared library" FORCE)
46 endif()
47endif()
48
49# tcl shared library directory
50if (WIN32 AND NOT DEFINED 3RDPARTY_TCL_DLL_DIR)
51 set (3RDPARTY_TCL_DLL_DIR "" CACHE FILEPATH "The directory containing tcl shared library")
52endif()
53
54# tk shared library (with absolute path)
55if (WIN32)
56 if (NOT DEFINED 3RDPARTY_TK_DLL OR NOT 3RDPARTY_TK_DLL_DIR)
57 set (3RDPARTY_TK_DLL "" CACHE FILEPATH "tk shared library" FORCE)
58 endif()
59endif()
60
61# tk shared library directory
62if (WIN32 AND NOT DEFINED 3RDPARTY_TK_DLL_DIR)
63 set (3RDPARTY_TK_DLL_DIR "" CACHE FILEPATH "The directory containing tk shared library")
64endif()
65
66# search for tcl in user defined directory
67if (NOT 3RDPARTY_TCL_DIR AND 3RDPARTY_DIR)
ad211ad3 68 FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tcl TCL_DIR_NAME)
9f33b387 69 if (TCL_DIR_NAME)
70 set (3RDPARTY_TCL_DIR "${3RDPARTY_DIR}/${TCL_DIR_NAME}" CACHE PATH "The directory containing tcl" FORCE)
71 endif()
72endif()
ad211ad3 73
9f33b387 74# define paths for default engine
75if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
76 set (TCL_INCLUDE_PATH "${3RDPARTY_TCL_DIR}/include")
77endif()
78
79# check tcl/tk include dir, library dir and shared library dir
80macro (DIR_SUBDIR_FILE_FIT LIBNAME)
81 if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
82 # tcl/tk include dir
83 if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
84 string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
85 if (NOT DOES_PATH_CONTAIN)
86 set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
87 endif()
88 else()
89 set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
90 endif()
19286d7c 91
9f33b387 92 # tcl/tk library dir
93 if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
19286d7c 94
9f33b387 95 string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
96 if (NOT DOES_PATH_CONTAIN)
97 set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
98 endif()
99 else()
100 set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
101 endif()
102
103 # tcl/tk shared library dir
104 if (WIN32)
105 if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
106 string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL_DIR}")
107 if (NOT DOES_PATH_CONTAIN)
108 set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
109 endif()
110 else()
111 set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
112 endif()
113 endif()
114 endif()
115
116 # check tcl/tk library
117 if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
118 if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
119 string (REGEX MATCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY}")
120
121 if (NOT DOES_PATH_CONTAIN)
122 set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
123 endif()
124 else()
125 set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
126 endif()
127 else()
128 set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
129 endif()
130
131 # check tcl/tk shared library
132 if (WIN32)
133 if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
134 if (3RDPARTY_${LIBNAME}_DLL AND EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
135 string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DLL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL}")
136
137 if (NOT DOES_PATH_CONTAIN)
138 set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
139 endif()
140 else()
141 set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
142 endif()
143 else()
144 set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
145 endif()
146 endif()
147endmacro()
148
149
150DIR_SUBDIR_FILE_FIT(TCL)
151DIR_SUBDIR_FILE_FIT(TK)
152
153
154# use default (CMake) TCL search
155find_package(TCL)
156
157foreach (LIBNAME TCL TK)
158 string (TOLOWER "${LIBNAME}" LIBNAME_L)
159
160 # tcl/tk include dir
161 if (NOT 3RDPARTY_${LIBNAME}_INCLUDE_DIR)
162 if (${LIBNAME}_INCLUDE_PATH AND EXISTS "${${LIBNAME}_INCLUDE_PATH}")
163 set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "${${LIBNAME}_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
164 endif()
165 endif()
166
167 # tcl/tk dir and library
168 if (NOT 3RDPARTY_${LIBNAME}_LIBRARY)
169 if (${LIBNAME}_LIBRARY AND EXISTS "${${LIBNAME}_LIBRARY}")
170 set (3RDPARTY_${LIBNAME}_LIBRARY "${${LIBNAME}_LIBRARY}" CACHE FILEPATH "${LIBNAME} library" FORCE)
19286d7c 171
9f33b387 172 if (NOT 3RDPARTY_${LIBNAME}_LIBRARY_DIR)
173 get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY}" PATH)
174 set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
175 endif()
176 endif()
177 endif()
19286d7c 178
9f33b387 179
180 if (WIN32)
181 if (NOT 3RDPARTY_${LIBNAME}_DLL)
182 set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
183
184 set (DLL_FOLDER_FOR_SEARCH "")
185 if (3RDPARTY_${LIBNAME}_DLL_DIR)
186 set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_DLL_DIR}")
187 elseif (3RDPARTY_TCL_DIR)
188 set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
189 elseif (3RDPARTY_${LIBNAME}_LIBRARY_DIR)
190 get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" PATH)
191 set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT}/bin")
192 endif()
19286d7c 193
9f33b387 194 set (3RDPARTY_${LIBNAME}_DLL "3RDPARTY_${LIBNAME}_DLL-NOTFOUND" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
195 find_library (3RDPARTY_${LIBNAME}_DLL NAMES ${LIBNAME_L}86 ${LIBNAME_L}85
196 PATHS "${DLL_FOLDER_FOR_SEARCH}"
197 NO_DEFAULT_PATH)
198 endif()
199 endif()
200
201 DIR_SUBDIR_FILE_FIT(${LIBNAME})
19286d7c 202
9f33b387 203
204 # tcl/tk dir and library
205 if (NOT 3RDPARTY_${LIBNAME}_LIBRARY)
206 set (3RDPARTY_${LIBNAME}_LIBRARY "3RDPARTY_${LIBNAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${LIBNAME} library" FORCE)
207 find_library (3RDPARTY_${LIBNAME}_LIBRARY NAMES ${LIBNAME_L}8.6 ${LIBNAME_L}86 ${LIBNAME_L}8.5 ${LIBNAME_L}85
208 PATHS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}"
209 NO_DEFAULT_PATH)
19286d7c 210
9f33b387 211 # search in another place if previous search doesn't find anything
19286d7c 212 find_library (3RDPARTY_${LIBNAME}_LIBRARY NAMES ${LIBNAME_L}8.6 ${LIBNAME_L}86 ${LIBNAME_L}8.5 ${LIBNAME_L}85
9f33b387 213 PATHS "${3RDPARTY_TCL_DIR}/lib"
19286d7c 214 NO_DEFAULT_PATH)
215
9f33b387 216
217 if (NOT 3RDPARTY_${LIBNAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
218 set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
219 endif()
19286d7c 220
9f33b387 221 if (NOT 3RDPARTY_${LIBNAME}_LIBRARY_DIR AND 3RDPARTY_${LIBNAME}_LIBRARY)
222 get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY}" PATH)
223 set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
224 endif()
225 endif()
226
227 set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION "")
228 if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
229 get_filename_component (${LIBNAME}_LIBRARY_NAME "${3RDPARTY_${LIBNAME}_LIBRARY}" NAME)
230 string(REGEX REPLACE "^.*${LIBNAME_L}([0-9]\\.*[0-9]).*$" "\\1" ${LIBNAME}_LIBRARY_VERSION "${${LIBNAME}_LIBRARY_NAME}")
19286d7c 231
9f33b387 232 if (NOT "${${LIBNAME}_LIBRARY_VERSION}" STREQUAL "${${LIBNAME}_LIBRARY_NAME}")
233 set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION "${${LIBNAME}_LIBRARY_VERSION}")
234 else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
235 message (STATUS "Info: ${LIBNAME} version isn't found")
236 endif()
237 endif()
19286d7c 238
9f33b387 239 set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION_WITH_DOT "")
240 if (3RDPARTY_${LIBNAME}_LIBRARY_VERSION)
241 string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_${LIBNAME}_MAJOR_VERSION "${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}")
242 string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_${LIBNAME}_MINOR_VERSION "${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}")
243 set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_${LIBNAME}_MAJOR_VERSION}.${3RDPARTY_${LIBNAME}_MINOR_VERSION}")
244 endif()
245
246 if (WIN32)
247 if (NOT 3RDPARTY_${LIBNAME}_DLL)
248 set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
249
250 set (DLL_FOLDER_FOR_SEARCH "")
251 if (3RDPARTY_${LIBNAME}_DLL_DIR)
252 set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_DLL_DIR}")
253 elseif (3RDPARTY_TCL_DIR)
254 set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
255 else()
256 get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" PATH)
257 set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT}/bin")
258 endif()
19286d7c 259
9f33b387 260 set (3RDPARTY_${LIBNAME}_DLL "3RDPARTY_${LIBNAME}_DLL-NOTFOUND" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
261 find_library (3RDPARTY_${LIBNAME}_DLL NAMES ${LIBNAME_L}${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}
262 PATHS "${DLL_FOLDER_FOR_SEARCH}"
263 NO_DEFAULT_PATH)
19286d7c 264
9f33b387 265 if (NOT 3RDPARTY_${LIBNAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
266 set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
267 endif()
19286d7c 268
9f33b387 269 if (NOT 3RDPARTY_${LIBNAME}_DLL_DIR AND 3RDPARTY_${LIBNAME}_DLL)
270 get_filename_component (3RDPARTY_${LIBNAME}_DLL_DIR "${3RDPARTY_${LIBNAME}_DLL}" PATH)
271 set (3RDPARTY_${LIBNAME}_DLL_DIR "${3RDPARTY_${LIBNAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
272 endif()
273 endif()
274 endif()
19286d7c 275
9f33b387 276 # include found paths to common variables
277 if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
278 list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
279 else()
280 list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_INCLUDE_DIR)
281 endif()
282
283 if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
284 list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
285 else()
286 list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_LIBRARY_DIR})
287 endif()
288
289 if (WIN32)
94829f84 290 if (3RDPARTY_${LIBNAME}_DLL OR EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
291 list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
292 else()
9f33b387 293 list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_DLL_DIR)
294 endif()
295 endif()
296endforeach()
297
298# install tcltk
299if (INSTALL_TCL)
fa0cbe55 300 # include occt macros. compiler_bitness, os_wiht_bit, compiler
19286d7c 301 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
9f33b387 302
303 OCCT_MAKE_OS_WITH_BITNESS()
304 OCCT_MAKE_COMPILER_SHORT_NAME()
9f33b387 305
306 if (WIN32)
94829f84 307 # tcl 8.6 requires zlib. install all dlls from tcl bin folder that may contain zlib also
308
309 # collect and install all dlls from tcl/tk dll dirs
310 file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
311 file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
fa0cbe55 312 install (FILES ${TCL_DLLS} ${TK_DLLS}
313 CONFIGURATIONS Release
314 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
315 install (FILES ${TCL_DLLS} ${TK_DLLS}
316 CONFIGURATIONS RelWithDebInfo
317 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
318 install (FILES ${TCL_DLLS} ${TK_DLLS}
319 CONFIGURATIONS Debug
320 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
9f33b387 321 else()
94829f84 322 get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
fa0cbe55 323 install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
324 CONFIGURATIONS Release
325 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
326 install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
327 CONFIGURATIONS RelWithDebInfo
328 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
329 install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
330 CONFIGURATIONS Debug
331 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
94829f84 332
333 get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
fa0cbe55 334 install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
335 CONFIGURATIONS Release
336 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
337 install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
338 CONFIGURATIONS RelWithDebInfo
339 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
340 install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
341 CONFIGURATIONS Debug
342 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
9f33b387 343 endif()
344
345 if (TCL_TCLSH_VERSION)
fa0cbe55 346 # tcl is required to install in lib folder (without)
9f33b387 347 install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
09c597c9 348 install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
349 install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
9f33b387 350 else()
351 message (STATUS "\nWarning: tclX.X and tkX.X subdirs won't be copyied during the installation process.")
352 message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
353 endif()
0a66e59d 354
355 set (USED_3RDPARTY_TCL_DIR "")
356else()
357 # the library directory for using by the executable
358 if (WIN32)
359 set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_DLL_DIR})
360 else()
361 set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_LIBRARY_DIR})
362 endif()
9f33b387 363endif()
364
365mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TK_LIBRARY 3RDPARTY_TCL_DLL 3RDPARTY_TK_DLL)
366
367# unset all redundant variables
368#TCL
369OCCT_CHECK_AND_UNSET (TCL_LIBRARY)
370OCCT_CHECK_AND_UNSET (TCL_INCLUDE_PATH)
371OCCT_CHECK_AND_UNSET (TCL_TCLSH)
372#TK
373OCCT_CHECK_AND_UNSET (TK_LIBRARY)
374OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
375OCCT_CHECK_AND_UNSET (TK_WISH)