Building Windows VS2015 External Dependencies - acidrainstudios/TrueReality GitHub Wiki
- Boost 1.61.0
- Qpid-Proton 0.13.1
- Qpid-cpp 0.34
- Eigen 3.2.8
- Google Test 1.8.0
- JSonCPP 1.8.0
- libfunctionality 0.1
- FFMpeg 3.4
Take a look at https://github.com/bjornblissing/osg-3rdparty-cmake.
It has some scripts to build OSG dependencies.
- Zlib 1.2.11
- LibJpeg 9b
- LibTiff 4.0.7
- LibPng 1.6.30
#!c++
+ GDAL 2.1.3
- OpenSceneGraph 3.4.1
- OpenCV 3.1.0
- VRPN 07.33
- OSVR-Core 0.6
- OSVR-RenderManager ???????
First, Setup all the TR Environmental Variables
Note: My Ext folder is on D:/Development/TrueReality/Ext Yours will be somewhere else, so you need to adjust accordingly.
-
-
Boost
- Download the Boost source files, we are using v1.61.0 (boost_1_61_0.zip)
- Open VS2015 x64 x86 Cross Tools Command Prompt, and maneuver to the Boost folder.
- Type in bootsrap.bat, and press enter.
- Type in b2 --build-type=complete toolset=msvc-14.0 link=shared threading=multi runtime-link=shared address-model=64 --without-python -jxx where xx is the number of cores to use for building.
- Two folders will be created, bin.2 and stage.
- Copy boost_1_61_0/stage/lib/*.* to D:/Development/TrueReality/Ext/bin
- Copy boost_1_61_0/boost to D:/Development/TrueReality/Ext/include
-
-
-
QPID Proton
-
Install CMake 3.3.0
-
Install Python 2.7.11
-
Download QPID Proton, and run CMake
-
Press Configure
-
Change BUILD_JAVA to OFF
-
Change BUILD_TESTING to OFF
-
Change CMAKE_CONFIGURATION_TYPES to Debug;Release
-
Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
-
Add /MP on the end of CMAKE_CXX_FLAGS
-
Press Configure, Press Generate.
-
Open The Visual Studio Solution that is generated in VS
-
Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
-
Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
-
Go to your Ext folder, delete the newly created share directory
-
-
-
-
QPID Cpp
- Install Ruby rubyinstaller-2.3.0-x64.exe
- Run CMake
- Press Configure
- In BUILD, select only BUILD_ACL, BUILD_AMQP, BUILD_HA, BUILD_SSL
- In CMAKE change CMAKE_CONFIGURATION_TYPES to Debug;Release and CMAKE_BUILD_TYPE to Release
- Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
- Add /MP on the end of CMAKE_CXX_FLAGS
- Press Configure, Press Generate.
- Open The Visual Studio Solution that is generated in VS.
- Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
- Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
- Go to your Ext folder, delete the newly created docs and examples directories.
-
-
-
JSONCpp
- Open CmakeLists.txt. After all the OPTION settings, after line 14, add SET (CMAKE_DEBUG_POSTFIX "d")
- Run CMake
- Press Configure
- In CMAKE change CMAKE_CONFIGURATION_TYPES to Debug;Release
- Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
- In BUILD, select BUILD_SHARED_LIBS and deselect BUILD_STATIC_LIBS
- In JSONCPP deselect JSONCPP_WITH_TEST, JSONCPP_WITH_POST_BUILD_UNITTEST, JSONCPP_WITH_PKGCONFIG_SUPPORT, and select JSONCPP_WITH_CMAKE_PACKAGE
- Press Configure, Press Generate.
- Open The Visual Studio Solution that is generated in VS.
- Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
- Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
-
-
-
Eigen3
- Run CMake
- Press Configure
- In Ungrouped Entries uncheck BUILD_TESTING
- In CMAKE change CMAKE_CONFIGURATION_TYPES to Debug;Release
- Add /MP on the end of CMAKE_CXX_FLAGS
- Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
- Press Configure, Press Generate.
- Open The Visual Studio Solution that is generated in VS.
- Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
- Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
-
-
- Google Test
- Open CMakeLists.txt and add
#Sets the postfix on libraries.
set (CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set Debug library postfix" FORCE)
on the line after project( googletest-distribution ) command. - Run CMake
- Press Configure
- In BUILD select BUILD_GTEST, BUILD_SHARED_LIBS
- In CMAKE change CMAKE_CONFIGURATION_TYPES to Debug;Release
- Add /MP on the end of CMAKE_CXX_FLAGS
- Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
- Press Configure, Press Generate.
- Open The Visual Studio Solution that is generated in VS.
- Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
- Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
- Go to your Ext folder, copy gmock_main.dll, gmock.dll, gtest_main.dll and gtest.dll and their debug versions from the lib folder to the bin folder.
- Open CMakeLists.txt and add
#Sets the postfix on libraries.
set (CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set Debug library postfix" FORCE)
- Google Test
-
-
Libfunctionality 0.1
- Run CMake
- Press Configure
- In BUILD deselect BUILD_TESTING
- In CMAKE change CMAKE_CONFIGURATION_TYPES to Debug;Release
- Add /MP on the end of CMAKE_CXX_FLAGS
- Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
- Press Configure, Press Generate.
- Open The Visual Studio Solution that is generated in VS.
- Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
- Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
- Delete the readme, license, contributing and notice files that get installed in the Ext folder.
-
-
- FFMpeg
-
MSYS2
- Download and run the installer at http://msys2.github.io.
- Follow the instructions and install it in C:\workspace\windows\msys64
- Install required tools: pacman -S make gcc diffutils
- Rename C:\workspace\windows\msys64\usr\bin\link.exe to C:\workspace\windows\msys64\usr\bin\link_orig.exe, in order to use MSVC link.exe (naming conflict)
-
YASM
- Download yasm--win64.exe and move it to C:\workspace\windows
- Rename yasm--win64.exe to yasm.exe
- Add C:\workspace\windows to PATH environment variable (setx PATH "%PATH%;C:\workspace\windows)
-
Launch msys2 shell from Visual Studio Code shell
- Run VS2015 x64 Native Tools Command Prompt in ADMIN mode
- Run C:\workspace\windows\msys64\msys2_shell.cmd -use-full-path :will open msys2 shell inheriting %PATH% from VS2015 prompt
- Ensure which cl exists and which link points to MSVC
- cd /c/path/to/ffmpeg (or where ever it is installed)
- ./configure --toolchain=msvc --arch=x86_64 --enable-shared --enable-yasm --enable-asm --disable-static --prefix=/D/Development/TrueReality/Ext
- make -jxx (Where xx is the number of cores you have)
- make install
- Delete the share folder that was created in D:/Development/TrueReality/Ext/lib folder.
-
- FFMpeg
-
-
Zlib 1.2.11
- Run CMake
- Press Configure
- In CMAKE change CMAKE_CONFIGURATION_TYPES to Debug;Release
- Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
- In INSTALL change all paths to point to your Ext folder. C:\Program Files\Zlib\bin to D:/Development/TrueReality/Ext/bin, etc etc
- Press Configure, Press Generate.
- Open The Visual Studio Solution that is generated in VS.
- Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
- Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
- Delete the man folder that is created in Ext
-
-
- LibJpeg 9b
- Copy Win32.Mak from C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include to jpeg-9b folder
- Run VS2015 x64 x86 Cross Tools Command Prompt in admin mode
- Navigate to the jpeg-9b folder
- nmake -f makefile.vc setup-v10
- Open the created jpeg.sln in VS2015, update the project
- In the Configuration Manager, create a x64 profile, and set up an additional Debug build with file output that has a "d" suffix.
- Copy jpeg.lib and jpegd.lib to the D:\Development\TrueReality\Ext\lib folder
- Copy jconfig.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h jpeglib.h jversion.h to the D:\Development\TrueReality\Ext\include folder
-
- LibTiff 4.0.7
- Run CMake
- Press Configure
- In CMAKE change CMAKE_CONFIGURATION_TYPES to Debug;Release
- Add /MP on the end of CMAKE_CXX_FLAGS
- Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
- Press Configure, Press Generate.
- Open The Visual Studio Solution that is generated in VS.
- Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
- Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
- Delete the share folder that is created in Ext
-
- LibPng 1.6.30
- Run CMake
- Press Configure
- In CMAKE Add /MP on the end of CMAKE_C_FLAGS
- Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
- In PNG uncheck PNG_TESTS
- Press Configure, Press Generate.
- Open The Visual Studio Solution that is generated in VS.
- Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
- Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
- Delete the share folder that is created in Ext
#!c++
+ 13) GDAL 2.1.3 (Still in the works)
- In the file nmake.opt change MSVC_VER=1500 to MSVC_VER=1900
- Change: CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb
to:
!IFNDEF DEBUG
CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb
!ELSE
CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION)d.pdb
!ENDIF
- Find OPTFLAGS and add /MP to the end of both of the OPTFLAGS lines for multi-core build
- Uncomment WIN64=YES in nmake.opt
- Replace GDAL_DLL = gdal$(VERSION).dll with:
!IFNDEF DEBUG
GDAL_DLL = gdal$(VERSION).dll
!ELSE
GDAL_DLL = gdal$(VERSION)d.dll
!ENDIF
- Replace GDALLIB = $(GDAL_ROOT)/gdal_i.lib with:
!IFNDEF DEBUG
GDALLIB = $(GDAL_ROOT)/gdal_i.lib
!ELSE
GDALLIB = $(GDAL_ROOT)/gdal_id.lib
!ENDIF
- Replace GDALLIB = $(GDAL_ROOT)/gdal.lib with:
!IFNDEF DEBUG
GDALLIB = $(GDAL_ROOT)/gdal.lib
!ELSE
GDALLIB = $(GDAL_ROOT)/gdald.lib
!ENDIF
- In file makefile.vc change if exist gdal_i.lib del gdal_i.\* to if exist $(GDALLIB) del gdal_i\*.\*
- Change:
if exist gdal.lib del gdal.lib
lib /nologo /out:gdal.lib $(LIBOBJ)
to:
!IFNDEF DEBUG
if exist gdal.lib del gdal.lib
lib /nologo /out:gdal.lib $(LIBOBJ)
!ELSE
if exist gdald.lib del gdald.lib
lib /nologo /out:gdald.lib $(LIBOBJ)
!ENDIF
- Change:
if exist gdal.lib del gdal.lib
if exist $(GDAL_DLL) del $(GDAL_DLL)
if exist $(GDAL_DLL).manifest del $(GDAL_DLL).manifest
if exist gdal_i.lib del gdal_i.*
to:
!IFNDEF DEBUG
if exist gdal.lib del gdal.lib
if exist gdal$(VERSION).dll del gdal$(VERSION).dll
if exist gdal_i.lib del gdal_i.\*
if exist gdal.dll.manifest del gdal.dll.manifest
!ELSE
if exist gdald.lib del gdald.lib
if exist gdal$(VERSION)d.dll del gdal$(VERSION)d.dll
if exist gdal_id.lib del gdal_id.\*
if exist gdald.dll.manifest del gdald.dll.manifest
!ENDIF
- Change: cp gdal.lib port\\\*.h gcore\\\*.h ogr\\\*.h $(DISTDIR) to: cp $(GDALLIB) port\\\*.h gcore\\\*.h ogr\*.h $(DISTDIR)
- Change:
/out:$(GDAL_DLL) /implib:gdal_i.lib $(LINKER_FLAGS)
if exist $(GDAL_DLL).manifest mt -manifest $(GDAL_DLL).manifest -outputresource:$(GDAL_DLL);2
to:
!IFNDEF DEBUG
/out:$(GDAL_DLL) /implib:gdal_i.lib $(LINKER_FLAGS)
if exist gdal$(VERSION).dll.manifest mt -manifest gdal$(VERSION).dll.manifest -outputresource:gdal$(VERSION).dll;2
!ELSE
/out:$(GDAL_DLL) /implib:gdal_id.lib $(LINKER_FLAGS)
if exist gdal$(VERSION)d.dll.manifest mt -manifest gdal$(VERSION)d.dll.manifest -outputresource:gdal$(VERSION)d.dll;2
!ENDIF
- Change: copy gdal_i.lib $(LIBDIR) to: copy $(GDALLIB) $(LIBDIR)
- In file makegdal_gen.bat, find two lines that say:
echo ^<PlatformToolset^>v120^</PlatformToolset^> >> %_mainfile_%
and change them to say:
echo ^<PlatformToolset^>v140^</PlatformToolset^> >> %_mainfile_%
- In file ./apps/makefile.vc change LIBS = $(GDAL_ROOT)\gdal_i.lib to LIBS = $(GDALLIB) and move it after the !INCLUDE line.
- Open a command prompt and navigate to the gdal folder
- Type in and run: makegdal_gen.bat 14.0 64 gdal14
- Open gdal14.vcxproj in VS2015
- Go to Project>Properties>NMake, select the DEBUG Configuration, and add DEBUG=1 to the end of every command line argument in General
- There are still configuration problems with this project, so you will need to Clean, Build as Release, copy the files. Clean, Build as Debug, copy the files.
- Clean the project, run the Debug build.
- Copy gdal201d.* to D:\Development\TrueReality\Ext\bin
- Copy gdal_\*.\* and gdald.lib to D:\Development\TrueReality\Ext\lib
- Copy port\\\*.h, gcore\\\*.h, alg\\\*.h, ogr\\\*.h, frmts\\mem\\memdataset.h, frmts\\raw\\rawdataset.h, frmts\\vrt\\\*.h, ogr\\ogrsf_frmts\\\*.h, gnm\\\*.h, apps\\gdal_utils.h to D:\\Development\\TrueReality\Ext\include
- Clean the project, run the Release build.
- Copy gdal201.\* to D:\Development\TrueReality\Ext\bin
- Copy gdal_\*.\* and gdal.lib to D:\Development\TrueReality\Ext\lib
-
- OpenSceneGraph 3.4.1
- Run CMake
- Press Configure
- In CMAKE change CMAKE_CONFIGURATION_TYPES to Debug;Release
- Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
- Turn off OSG_USE_FLOAT_BOUNDINGBOX and OSG_USE_FLOAT_BOUNDINGSPHERE
- In WIN32 turn on WIN32_USE_MP
- Press Configure, Press Generate.
- Open The Visual Studio Solution that is generated in VS.
- There is an error in Plugins png project. Go to its properties, Release configuration, go to Linker>Input>Additional Dependencies, and remove optimized.lib debug.lib and libpng16d.lib from the list.
- Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
- Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
-
- OpenCV
- Run CMake
- Press Configure
- In BUILD deselect all except BUILD_SHARED_LIBS and BUILD_WITH_DEBUG_INFO
- In CMAKE change CMAKE_CONFIGURATION_TYPES to Debug;Release
- Add /MP on the end of CMAKE_CXX_FLAGS
- Change CMAKE_INSTALL_PREFIX to D:/Development/TrueReality/Ext (This is where my Ext folder is, you need to point your path to yours.)
- In ENABLE select ENABLE_SSE41, ENABLE_SSE42, ENABLE_SSEE3
- In WITH deselect WITH_FFMPEG, WITH_IPP
- Press Configure, Press Generate.
- Open The Visual Studio Solution that is generated in VS.
- There is an error in Plugins png project. Go to its properties, Release configuration, go to Linker>Input>Additional Dependencies, and remove optimized.lib debug.lib and libpng16d.lib from the list.
- Go to BUILD>Batch Build, select ALL_BUILD Debug and Release, and click Build
- Go to BUILD>Batch Build, click Deselect All, select INSTALL Debug and Release, and click Build
- An x64 folder is created in your Ext directory after the install. Copy everything from it's bin folder into your Ext\bin and from its lib folder into your Ext\lib
-
- VRPN 07.33
- Coming soon...
-
- OSVR-Core 0.6
- Coming soon...
-
- OSVR-RenderManager
- Coming soon...