-
Notifications
You must be signed in to change notification settings - Fork 284
Build (MinGW w64)
The build process of OCE (with Visualisation) under Windows 64bit will be explained using the MinGW-w64/MSYS toolchain. It has been tested successfully with the Mingw-builds release of MinGW-w64. It provides a convenient installer where SEH exceptions and POSIX Threads have been selected and successfully compiled so far. We will use this configuration as a basis for our explanation. Other MinGW-w64 builds and options might work, but are untested.
The following prerequisites must be installed/downloaded:
- Download MinGW-w64 Mingw-builds Project online Installer from http://mingw-w64.sourceforge.net/download.php#mingw-builds and install it into a path that contains no spaces and add the /bin directory of your MinGW installation to your system's PATH-Variable
- Download MSYS as packaged by mingw-builds project from http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/ and install it into a path that contains no spaces
- Install CMake http://www.cmake.org
- Obtain a local copy of the current or desired version of the OCE repository
- Clone Oce-Win-Bundle into its own directory to obtain the FreeImage, FreeType and gl2ps libraries: https://github.com/QbProg/
Start CMake and complete the following steps:
- Point "Where is the source code:" to your local copy of OCE
- Build the binaries in a new specific build folder within OCE
- Hit Configure
- Choose "MSYS Makefiles" (NOT "MinGW Makefiles"!) with default native compilers
- When required: Point CMAKE_MAKE_PROGRAM to /bin/make.exe in your MSYS directory and configure again.
- Check OCE_USE_BUNDLE_SOURCE
- Check OCE_WITH_FREEIMAGE
- Check OCE_WITH_GL2PS
- Check OCE_VISUALISATION
- Use OPENMP as OCE_MULTITHREAD_LIBRARY
- Select your Installation directory with OCE_INSTALL_PREFIX
- Configure
- Select the directory of your oce-win-bundle clone with OCE_BUNDLE_ROOT_PATH
- Select your required build type (RELEASE,DEBUG..)
- Configure (and no entries should be red afterwards..)
- and Generate.
- Start msys.bat in your MSYS directory (as an Administrator)
- cd into your build directory
- run make
Compilation is now running. It can take several hours, depending on your machine.
- run make install
If you want to compile as DEBUG, you might have to compile twice, once as RELEASE and once as DEBUG to obtain the required release and debug libraries.