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

0029589: Configuration - allow MFC samples to be built when OCCT is linked statically

CMake scripts are corrected to do perform search of libs and dlls of third-party libraries even for static builds of OCCT.
Treatment of errors in this case is relaxed: not found DLLs are reported as warnings, and not found libs as warning for static build, and continuable error for shared build.

Code of samples is corrected to allow building with OCCT linked statically.
Implementation of main application class is corrected to ensure that initialization is done after all global objects are created.
Note however that samples still fails to start for unclear reason (creation of MFC frame window fails).
This commit is contained in:
abv
2018-03-19 09:04:17 +03:00
committed by bugmaster
parent 1fa1615244
commit 0553a8ea99
25 changed files with 92 additions and 64 deletions

View File

@@ -33,7 +33,7 @@ END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// OCC_App construction
OCC_App::OCC_App() : CWinApp()
BOOL OCC_App::InitApplication()
{
OSD::SetSignal (Standard_True);
SampleName = "";
@@ -48,6 +48,8 @@ OCC_App::OCC_App() : CWinApp()
AfxMessageBox (L"Fatal error during graphic initialization", MB_ICONSTOP);
ExitProcess (1);
}
return TRUE;
}
void OCC_App::SetSamplePath(LPCTSTR aPath)