[freeglut] Patch header correctly (#9725)

This fixes bug introduced by #9155.
This commit is contained in:
myd7349 2020-01-23 04:19:17 +08:00 committed by Victor Romero
parent 65d1fa6373
commit 6e99bd4018
2 changed files with 7 additions and 9 deletions

View File

@ -1,4 +1,4 @@
Source: freeglut
Version: 3.0.0-8
Version: 3.0.0-9
Homepage: https://sourceforge.net/projects/freeglut/
Description: Open source implementation of GLUT with source and binary backwards compatibility.

View File

@ -32,14 +32,6 @@ string(REGEX REPLACE "\"freeglut_static.lib\""
"\"freeglut.lib\"" FREEGLUT_STDH "${FREEGLUT_STDH}")
string(REGEX REPLACE "\"freeglut_staticd.lib\""
"\"freeglutd.lib\"" FREEGLUT_STDH "${FREEGLUT_STDH}")
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
string(REPLACE
"ifdef FREEGLUT_STATIC"
"if 1 //ifdef FREEGLUT_STATIC"
FREEGLUT_STDH
"${FREEGLUT_STDH}"
)
endif()
file(WRITE ${SOURCE_PATH}/include/GL/freeglut_std.h "${FREEGLUT_STDH}")
vcpkg_configure_cmake(
@ -60,6 +52,12 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglutd.lib)
endif()
vcpkg_replace_string(
"${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h"
"ifdef FREEGLUT_STATIC"
"if 1 //ifdef FREEGLUT_STATIC"
)
endif()
# Clean