-
-
Notifications
You must be signed in to change notification settings - Fork 6
Build on Windows
Jakob Flierl edited this page Jun 14, 2022
·
32 revisions
The native Windows build is complicated and error-prone. As of 2016-06 the preferred way by @koppi to build bpp for Windows is to cross-compile bpp using mxe:
cd /opt
git clone https://github.com/mxe/mxe.git
cd mxe
export PATH=`pwd`/usr/bin/:$PATH
nice make MXE_TARGETS='i686-w64-mingw32.shared' qt5 QT5_BUILD_TYPE=-debug-and-release lua luabind bullet assimp freeglut
Download and build libQGLViewer:
git clone https://github.com/GillesDebunne/libQGLViewer
cd libQGLViewer
/opt/mxe/usr/i686-w64-mingw32.shared/qt5/bin/qmake
make
Download and build bullet
apt-get source bullet # bullet_3.06+dfsg.orig.tar.xz
See: https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=8959 : add to CMakeLists.txt
:
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
SET(CMAKE_C_COMPILER i686-w64-mingw32.shared-gcc)
SET(CMAKE_CXX_COMPILER i686-w64-mingw32.shared-g++)
SET(CMAKE_RC_COMPILER i686-w64-mingw32.shared-windres)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /opt/mxe/usr/i686-w64-mingw32.shared)
cmake . -DBUILD_DEMOS:BOOL=OFF -DBUILD_EXTRAS:BOOL=OFF -DBUILD_UNIT_TESTS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON . -G "Unix Makefiles"
make
WIP