Moved _GLFW_BUILD_DLL into configuration header.

master
Camilla Berglund ago%!(EXTRA string=13 years)
parent 171db6d6cb
commit dd8b098387
  1. 7
      CMakeLists.txt
  2. 2
      src/CMakeLists.txt
  3. 6
      src/cocoa_init.m
  4. 3
      src/config.h.in
  5. 3
      src/x11_init.c

@ -22,6 +22,13 @@ if (CMAKE_COMPILER_IS_GNUCC)
add_definitions(-Wall)
endif()
#--------------------------------------------------------------------
# Export shared library / dynamic library / DLL build option
#--------------------------------------------------------------------
if (BUILD_SHARED_LIBS)
set(_GLFW_BUILD_DLL 1)
endif()
#--------------------------------------------------------------------
# Detect and select target platform
#--------------------------------------------------------------------

@ -36,7 +36,7 @@ if (BUILD_SHARED_LIBS)
if (_GLFW_WIN32_WGL)
# The GLFW DLL needs a special compile-time macro and import library name
set_target_properties(glfw PROPERTIES
COMPILE_DEFINITIONS "_GLFW_BUILD_DLL;_GLFW_NO_DLOAD_GDI32;_GLFW_NO_DLOAD_WINMM"
COMPILE_DEFINITIONS "_GLFW_NO_DLOAD_GDI32;_GLFW_NO_DLOAD_WINMM"
PREFIX ""
IMPORT_PREFIX ""
IMPORT_SUFFIX "dll.lib")

@ -152,7 +152,11 @@ int _glfwPlatformTerminate(void)
const char* _glfwPlatformGetVersionString(void)
{
const char* version = _GLFW_VERSION_FULL " Cocoa";
const char* version = _GLFW_VERSION_FULL
#if defined(_GLFW_BUILD_DLL)
" dynamic"
#endif
;
return version;
}

@ -42,6 +42,9 @@
// Define this to 1 if building GLFW for Cocoa/NSOpenGL
#cmakedefine _GLFW_COCOA_NSGL
// Define this to 1 if building as a shared library / dynamic library / DLL
#cmakedefine _GLFW_BUILD_DLL 1
// Define this to 1 if XRandR is available
#cmakedefine _GLFW_HAS_XRANDR 1
// Define this to 1 if Xf86VidMode is available

@ -660,6 +660,9 @@ const char* _glfwPlatformGetVersionString(void)
" Linux-joystick-API"
#else
" no-joystick-support"
#endif
#if defined(_GLFW_BUILD_DLL)
" shared"
#endif
;

Loading…
Cancel
Save