mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
Merge pull request #2154 from cenit/master
[freeglut] rename static library for compatibility with FindGLUT.cmake
This commit is contained in:
commit
19861c73aa
@ -1,3 +1,3 @@
|
||||
Source: freeglut
|
||||
Version: 3.0.0-2
|
||||
Version: 3.0.0-3
|
||||
Description: Open source implementation of GLUT with source and binary backwards compatibility.
|
||||
|
@ -35,11 +35,17 @@ 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_static.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}")
|
||||
"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)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut.lib)
|
||||
endif()
|
||||
|
||||
# Clean
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user