vcpkg/ports/glfw3/fix_win32_dllname.pacth
jim wang 4cac260c4b
[glfw3] Fix the name of the dynamic library under win in the pc file (#33991)
* Generate Imath.pc

* update version

* add dependency imath minizip-ng

* updata version

* update version

* Fix the name of the dynamic library under win in the pc file

* update version

* Fix the name of the dynamic library under win in the pc file

* update version
2023-11-29 01:36:07 -08:00

30 lines
958 B
Plaintext

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7506916..1ec8e9e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -333,6 +333,12 @@ write_basic_package_version_file(src/glfw3ConfigVersion.cmake
COMPATIBILITY SameMajorVersion)
configure_file(src/glfw_config.h.in src/glfw_config.h @ONLY)
+set(GLFW_LIB_NAME_SUFFIX "")
+if (BUILD_SHARED_LIBS)
+ if (WIN32)
+ set(GLFW_LIB_NAME_SUFFIX "dll")
+ endif()
+endif()
configure_file(src/glfw3.pc.in src/glfw3.pc @ONLY)
diff --git a/src/glfw3.pc.in b/src/glfw3.pc.in
index f74298d..17779ac 100644
--- a/src/glfw3.pc.in
+++ b/src/glfw3.pc.in
@@ -8,6 +8,6 @@ Description: A multi-platform library for OpenGL, window and input
Version: @GLFW_VERSION@
URL: https://www.glfw.org/
Requires.private: @GLFW_PKG_DEPS@
-Libs: -L${libdir} -l@GLFW_LIB_NAME@
+Libs: -L${libdir} -l@GLFW_LIB_NAME@@GLFW_LIB_NAME_SUFFIX@
Libs.private: @GLFW_PKG_LIBS@
Cflags: -I${includedir}