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

0029571: Samples: build qt samples together with OCCT

Extending CMake procedure by 'BUILD_MODULE_QtSamples' variable to switch on qt samples build.
Implementation required:
- union of occt_toolkit_tool.cmake and occt_toolkit.cmake files;
- correction of qt samples sources by adding path to Qt 'plugins' folder. It helps to avoid definition of additional variable (QT_QPA_PLATFORM_PLUGIN_PATH) when staring sample.bat for qt samples;
- executable processing is extended in cmake procedure by providing 'EXECUTABLE_PROJECT' variable. Now we need not specify custom processing for DRAWEXE in occt_toolkit.cmake
This commit is contained in:
nds
2018-03-18 15:34:17 +03:00
committed by bugmaster
parent 7f3408c8c8
commit 1fa1615244
82 changed files with 672 additions and 485 deletions

View File

@@ -0,0 +1 @@
Main.cxx

View File

@@ -1,15 +1,20 @@
#include "Application.h"
#include <OSD_Environment.hxx>
#include <QApplication>
#include <QTranslator>
#include <QPixmap>
#include <QLocale>
int main ( int argc, char* argv[] )
{
#if QT_VERSION > 0x050000
TCollection_AsciiString aPlugindsDirName = OSD_Environment ("QTDIR").Value();
if (!aPlugindsDirName.IsEmpty())
QApplication::addLibraryPath (QString (aPlugindsDirName.ToCString()) + "/plugins");
#endif
QApplication a( argc, argv );
QString resDir = ApplicationCommonWindow::getResourceDir();