diff --git a/CMakeLists.txt b/CMakeLists.txt index 780917c10..6c3a280d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -355,6 +355,16 @@ foreach(arg ${glfw_PKG_LIBS}) set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} ${arg}") endforeach() +#-------------------------------------------------------------------- +# 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() + #-------------------------------------------------------------------- # Create generated files #--------------------------------------------------------------------