From e7bf0f70b3b9528764e605794aa868db09ad47f4 Mon Sep 17 00:00:00 2001 From: Claudio Date: Sun, 23 Apr 2017 18:48:58 +0200 Subject: [PATCH 1/2] Add VERSION and SOVERSION number to shared libraries With this commit, when building or installing `glew`, VERSION and SOVERSION symlinks to the `glew` shared library are created in the library installation folder if the platform supports them and the linker supports so-names. VERSION and SOVERSION specify, respectively, the build version and API version of the shared library. As an example, under macOS, the following symlinks will be created: libGLEW.2.0.0.dylib (the shared library) libGLEW.2.0.dylib -> libGLEW.2.0.0.dylib (VERSION symlink) libGLEW.dylib -> libGLEW.2.0.dylib (SOVERSION symlink) Fixes #141 --- build/cmake/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index 8077929..34e8e06 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -93,7 +93,9 @@ if (WIN32) endif () add_library (glew SHARED ${GLEW_PUBLIC_HEADERS_FILES} ${GLEW_SRC_FILES}) -set_target_properties (glew PROPERTIES COMPILE_DEFINITIONS "GLEW_BUILD" OUTPUT_NAME "${GLEW_LIB_NAME}" PREFIX "${DLL_PREFIX}") +set_target_properties (glew PROPERTIES COMPILE_DEFINITIONS "GLEW_BUILD" OUTPUT_NAME "${GLEW_LIB_NAME}" PREFIX "${DLL_PREFIX}" + VERSION ${GLEW_VERSION} + SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}) add_library (glew_s STATIC ${GLEW_PUBLIC_HEADERS_FILES} ${GLEW_SRC_FILES}) set_target_properties (glew_s PROPERTIES COMPILE_DEFINITIONS "GLEW_STATIC" OUTPUT_NAME "${GLEW_LIB_NAME}" PREFIX lib) From 298528cd87019fe642a7ce9dfa772b62d7bf6aeb Mon Sep 17 00:00:00 2001 From: Claudio Date: Sun, 23 Apr 2017 19:23:04 +0200 Subject: [PATCH 2/2] Remove trailing space --- build/cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index 34e8e06..b7d14c1 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -202,7 +202,7 @@ endif () configure_file (${GLEW_DIR}/glew.pc.in ${GLEW_DIR}/glew.pc @ONLY) -install(FILES ${GLEW_DIR}/glew.pc +install(FILES ${GLEW_DIR}/glew.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )