diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f3bedfd4..d8f5294fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -350,6 +350,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 #--------------------------------------------------------------------