1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Do not export internal symbols from a unix shared library.

This commit is contained in:
John Bartholomew 2013-05-01 13:08:09 +01:00
parent 7ecd2eb53b
commit 93f4effd2b
2 changed files with 7 additions and 0 deletions

View File

@ -77,6 +77,9 @@ endif()
#--------------------------------------------------------------------
if (BUILD_SHARED_LIBS)
set(_GLFW_BUILD_DLL 1)
if (UNIX OR APPLE)
add_definitions(-fvisibility=hidden)
endif()
endif()
#--------------------------------------------------------------------

View File

@ -157,6 +157,10 @@ extern "C" {
#define GLFWAPI __declspec(dllimport)
#endif
#elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL)
#define GLFWAPI __attribute__((visibility("default")))
#else
/* We are either building/calling a static lib or we are non-win32 */