mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 18:15:10 +00:00
Use SOVERSION for shared libraries on Unix-like systems.
This commit is contained in:
parent
93ec9fa901
commit
0f0e42b975
@ -215,6 +215,16 @@ endif()
|
||||
#--------------------------------------------------------------------
|
||||
set(GLFW_LIBRARIES ${glfw_LIBRARIES} CACHE STRING "Dependencies of GLFW")
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Choose library output name
|
||||
#--------------------------------------------------------------------
|
||||
if (BUILD_SHARED_LIBS AND UNIX)
|
||||
# On Unix-like systems, shared libraries can use the soname system.
|
||||
set(GLFW_LIB_NAME glfw)
|
||||
else()
|
||||
set(GLFW_LIB_NAME glfw3)
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Add subdirectories
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -30,9 +30,14 @@ elseif (_GLFW_X11_GLX)
|
||||
endif()
|
||||
|
||||
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
|
||||
set_target_properties(glfw PROPERTIES OUTPUT_NAME "glfw3")
|
||||
set_target_properties(glfw PROPERTIES OUTPUT_NAME "${GLFW_LIB_NAME}")
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# Include version information in the output
|
||||
set_target_properties(glfw PROPERTIES VERSION ${GLFW_VERSION})
|
||||
if (UNIX)
|
||||
set_target_properties(glfw PROPERTIES SOVERSION ${GLFW_VERSION_MAJOR})
|
||||
endif()
|
||||
|
||||
if (_GLFW_WIN32_WGL)
|
||||
# The GLFW DLL needs a special compile-time macro and import library name
|
||||
|
@ -8,6 +8,6 @@ Description: A portable library for OpenGL, window and input
|
||||
Version: @GLFW_VERSION_FULL@
|
||||
URL: http://www.glfw.org/
|
||||
Requires.private: @GLFW_PKG_DEPS@
|
||||
Libs: -L${libdir} -lglfw3
|
||||
Libs: -L${libdir} -l@GLFW_LIB_NAME@
|
||||
Libs.private: @GLFW_PKG_LIBS@
|
||||
Cflags: -I${includedir}
|
||||
|
Loading…
Reference in New Issue
Block a user