Closed shawnlaffan closed 1 year ago
Updating to freeglut 3.4.0 and applying the patches used by the MSYS2 project gets freeglut working.
Notes below are in advance of a PR.
Patches: https://github.com/msys2/MINGW-packages/tree/0c8da415d1531ccef1530931b867a4c2a5cbf1de/mingw-w64-freeglut
The diff below also includes an update to modernise the cmake invocation to run in a clean dir, and corrects the pkgconfig path when it is updated (s{lib/lib/pkgconfig}{lib/pkgconfig} )
s{lib/lib/pkgconfig}{lib/pkgconfig}
# git diff build.sh | cat - diff --git a/build.sh b/build.sh index 56a5af9..372533b 100755 --- a/build.sh +++ b/build.sh @@ -1373,12 +1376,14 @@ cd $WRKDIR/$PACK echo "IF (FREEGLUT_BUILD_SHARED_LIBS)" >> CMakeLists.txt echo "SET_TARGET_PROPERTIES (freeglut PROPERTIES SUFFIX $DLLSUFFIX.dll)">> CMakeLists.txt echo "ENDIF ()" >> CMakeLists.txt -xxrun cmake -G 'MSYS Makefiles' -DCMAKE_INSTALL_PREFIX=$OUT -DFREEGLUT_BUILD_SHARED_LIBS=ON -DFREEGLUT_BUILD_STATIC_LIBS=OFF +mkdir _build +cd _build +xxrun cmake -G 'MSYS Makefiles' -DCMAKE_INSTALL_PREFIX=$OUT -DFREEGLUT_BUILD_SHARED_LIBS=ON -DFREEGLUT_BUILD_STATIC_LIBS=OFF .. xxrun make xxrun make install #HACK: OpenGL wants lib/libglut.a not lib/libfreeglut.a mv $OUT/lib/libfreeglut.dll.a $OUT/lib/libglut.a -sed -i 's/-lfreeglut/-lglut/' $OUT/lib/lib/pkgconfig/freeglut.pc +sed -i 's/-lfreeglut/-lglut/' $OUT/lib/pkgconfig/freeglut.pc ;; giflib-*)
PR #19 merged, so closing
Updating to freeglut 3.4.0 and applying the patches used by the MSYS2 project gets freeglut working.
Notes below are in advance of a PR.
Patches: https://github.com/msys2/MINGW-packages/tree/0c8da415d1531ccef1530931b867a4c2a5cbf1de/mingw-w64-freeglut
The diff below also includes an update to modernise the cmake invocation to run in a clean dir, and corrects the pkgconfig path when it is updated (
s{lib/lib/pkgconfig}{lib/pkgconfig}
)