mirror of
https://github.com/glfw/glfw.git
synced 2024-11-23 02:25:10 +00:00
Merge pull request #10 from johnbartholomew/rename-lib-glfw3
Allow GLFW 3 to be installed side-by-side with GLFW 2.
This commit is contained in:
commit
d270fe3c15
@ -215,6 +215,16 @@ endif()
|
|||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
set(GLFW_LIBRARIES ${glfw_LIBRARIES} CACHE STRING "Dependencies of GLFW")
|
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
|
# Add subdirectories
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
@ -251,10 +261,10 @@ install(FILES COPYING.txt readme.html
|
|||||||
# Create and install pkg-config file on supported platforms
|
# Create and install pkg-config file on supported platforms
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
if (_GLFW_X11_GLX OR _GLFW_COCOA_NSGL)
|
if (_GLFW_X11_GLX OR _GLFW_COCOA_NSGL)
|
||||||
configure_file(${GLFW_SOURCE_DIR}/src/libglfw.pc.in
|
configure_file(${GLFW_SOURCE_DIR}/src/libglfw3.pc.in
|
||||||
${GLFW_BINARY_DIR}/src/libglfw.pc @ONLY)
|
${GLFW_BINARY_DIR}/src/libglfw3.pc @ONLY)
|
||||||
|
|
||||||
install(FILES ${GLFW_BINARY_DIR}/src/libglfw.pc
|
install(FILES ${GLFW_BINARY_DIR}/src/libglfw3.pc
|
||||||
DESTINATION lib/pkgconfig)
|
DESTINATION lib/pkgconfig)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -30,8 +30,14 @@ elseif (_GLFW_X11_GLX)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
|
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
|
||||||
|
set_target_properties(glfw PROPERTIES OUTPUT_NAME "${GLFW_LIB_NAME}")
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
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)
|
if (_GLFW_WIN32_WGL)
|
||||||
# The GLFW DLL needs a special compile-time macro and import library name
|
# 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@
|
Version: @GLFW_VERSION_FULL@
|
||||||
URL: http://www.glfw.org/
|
URL: http://www.glfw.org/
|
||||||
Requires.private: @GLFW_PKG_DEPS@
|
Requires.private: @GLFW_PKG_DEPS@
|
||||||
Libs: -L${libdir} -lglfw
|
Libs: -L${libdir} -l@GLFW_LIB_NAME@
|
||||||
Libs.private: @GLFW_PKG_LIBS@
|
Libs.private: @GLFW_PKG_LIBS@
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
Loading…
Reference in New Issue
Block a user