Fix pkg-config file generation regression

Fixes regression cased by 37c93ba031.

Fixes #664.
Closes #679.
This commit is contained in:
Camilla Berglund 2015-12-30 21:05:27 +01:00
parent 06899bd9a6
commit d2d57c70e2
2 changed files with 8 additions and 7 deletions

View File

@ -50,6 +50,13 @@ if (BUILD_SHARED_LIBS)
set(_GLFW_BUILD_DLL 1)
endif()
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()
if (GLFW_USE_WAYLAND)
set(GLFW_USE_EGL ON)
elseif (GLFW_USE_MIR)

View File

@ -52,6 +52,7 @@ endif()
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
set_target_properties(glfw PROPERTIES
OUTPUT_NAME ${GLFW_LIB_NAME}
VERSION ${GLFW_VERSION}
SOVERSION ${GLFW_VERSION_MAJOR}
POSITION_INDEPENDENT_CODE ON
@ -105,13 +106,6 @@ if (MSVC)
target_compile_definitions(glfw PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
if (BUILD_SHARED_LIBS AND UNIX)
# On Unix-like systems, shared libraries can use the soname system.
set_target_properties(glfw PROPERTIES OUTPUT_NAME glfw)
else()
set_target_properties(glfw PROPERTIES OUTPUT_NAME glfw3)
endif()
if (GLFW_INSTALL)
install(TARGETS glfw EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX})
endif()