aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoricedream2linxi <icedream2linxi@qq.com>2018-09-07 20:24:27 +0800
committericedream2linxi <icedream2linxi@qq.com>2018-09-07 20:24:27 +0800
commitf138ef37476ea3bee03de13f2f8ac76cfd6a0faa (patch)
treee2f497e2a5a78eb4cc6af39db10dd0910087ebeb
parent40510c3aafc3d96876aaa57e42e2bbac801b25d7 (diff)
downloadvcpkg-f138ef37476ea3bee03de13f2f8ac76cfd6a0faa.tar.gz
vcpkg-f138ef37476ea3bee03de13f2f8ac76cfd6a0faa.zip
[freeglut] Fix the internal default link name of freeglut. Fixed #4243.
-rw-r--r--ports/freeglut/CONTROL2
-rw-r--r--ports/freeglut/portfile.cmake14
2 files changed, 7 insertions, 9 deletions
diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL
index 8baaba1dc..c6f595c2f 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 913fc90ff..3be83ed4a 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")