Skip to content

Commit

Permalink
Win32: Add library name suffix to pkg-config file
Browse files Browse the repository at this point in the history
Closes glfw#2386
  • Loading branch information
moritz-h authored Nov 15, 2023
1 parent 3eaf125 commit 93a3ba8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMake/glfw3.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -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_CONFIG_REQUIRES_PRIVATE@
Libs: -L${libdir} -l@GLFW_LIB_NAME@
Libs: -L${libdir} -l@GLFW_LIB_NAME@@GLFW_LIB_NAME_SUFFIX@
Libs.private: @GLFW_PKG_CONFIG_LIBS_PRIVATE@
Cflags: -I${includedir}
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ if (UNIX AND GLFW_BUILD_SHARED_LIBRARY)
else()
set(GLFW_LIB_NAME glfw3)
endif()
set(GLFW_LIB_NAME_SUFFIX "")

set_target_properties(glfw PROPERTIES
OUTPUT_NAME ${GLFW_LIB_NAME}
Expand Down Expand Up @@ -337,6 +338,7 @@ if (GLFW_BUILD_SHARED_LIBRARY)
# Add a suffix to the import library to avoid naming conflicts
set_target_properties(glfw PROPERTIES IMPORT_SUFFIX "dll.lib")
endif()
set (GLFW_LIB_NAME_SUFFIX "dll")

target_compile_definitions(glfw INTERFACE GLFW_DLL)
endif()
Expand Down

0 comments on commit 93a3ba8

Please sign in to comment.