diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL index 8baaba1dc9..c6f595c2f2 100644 --- a/ports/freeglut/CONTROL +++ b/ports/freeglut/CONTROL @@ -1,3 +1,3 @@ Source: freeglut -Version: 3.0.0-4 +Version: 3.0.0-5 Description: Open source implementation of GLUT with source and binary backwards compatibility. diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake index 913fc90fff..3be83ed4a1 100644 --- a/ports/freeglut/portfile.cmake +++ b/ports/freeglut/portfile.cmake @@ -25,6 +25,12 @@ else() set(FREEGLUT_DYNAMIC OFF) endif() +# Patch header +file(READ ${SOURCE_PATH}/include/GL/freeglut_std.h FREEGLUT_STDH) +string(REGEX REPLACE "\"freeglut[_a-z]+.lib\"" + "\"freeglut.lib\"" FREEGLUT_STDH "${FREEGLUT_STDH}") +file(WRITE ${SOURCE_PATH}/include/GL/freeglut_std.h "${FREEGLUT_STDH}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -36,14 +42,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Patch header -file(READ ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h FREEGLUT_STDH) -string(REPLACE "pragma comment (lib, \"freeglut_staticd.lib\")" - "pragma comment (lib, \"freeglut.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") -string(REPLACE "pragma comment (lib, \"freeglutd.lib\")" - "pragma comment (lib, \"freeglut.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") -file(WRITE ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h "${FREEGLUT_STDH}") - # Rename static lib (otherwise it's incompatible with FindGLUT.cmake) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")