1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024316: Make building with different versions of Tcl easier

On Windows with MSVC Tcl library is linked using #pragma statement instead of using project properties, to allow easy switch between Tcl versions. In gendoc.bat, tclsh.exe is called instead of tclsh86.exe, to avoid dependency on hard-coded Tcl version.

Tcl-dependent code (unused functions) removed from QABugs package.
This commit is contained in:
abv
2013-11-05 09:48:27 +04:00
parent 821edd22a9
commit 6a0964c23e
9 changed files with 29 additions and 401 deletions

View File

@@ -60,7 +60,6 @@
#include <Draw_Drawable3D.hxx>
#include <Draw_Interpretor.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <tcl.h>
#include <Draw_MapOfFunctions.hxx>
#include <OSD_SharedLibrary.hxx>
@@ -68,6 +67,21 @@
#include <Draw_Failure.hxx>
#include <TCollection_AsciiString.hxx>
#include <Standard_ErrorHandler.hxx>
#include <tcl.h>
// on MSVC, use #pragma to define name of the Tcl library to link with,
// depending on Tcl version number
#ifdef _MSC_VER
// two helper macros are needed to convert version number macro to string literal
#define STRINGIZE1(a) #a
#define STRINGIZE2(a) STRINGIZE1(a)
#pragma comment (lib, "tcl" STRINGIZE2(TCL_MAJOR_VERSION) STRINGIZE2(TCL_MINOR_VERSION) ".lib")
#pragma comment (lib, "tk" STRINGIZE2(TCL_MAJOR_VERSION) STRINGIZE2(TCL_MINOR_VERSION) ".lib")
#undef STRINGIZE2
#undef STRINGIZE1
#endif
extern Standard_Boolean Draw_ParseFailed;
Standard_EXPORT Draw_Viewer dout;