mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 23:54:37 +00:00
Merge branch 'master' into clipboard
This commit is contained in:
commit
cbe29b4963
@ -22,6 +22,13 @@ if (CMAKE_COMPILER_IS_GNUCC)
|
|||||||
add_definitions(-Wall)
|
add_definitions(-Wall)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# Export shared library / dynamic library / DLL build option
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
if (BUILD_SHARED_LIBS)
|
||||||
|
set(_GLFW_BUILD_DLL 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Detect and select target platform
|
# Detect and select target platform
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
@ -47,6 +54,9 @@ if (_GLFW_WIN32_WGL)
|
|||||||
list(APPEND glfw_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR})
|
list(APPEND glfw_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR})
|
||||||
list(APPEND glfw_LIBRARIES ${OPENGL_gl_LIBRARY})
|
list(APPEND glfw_LIBRARIES ${OPENGL_gl_LIBRARY})
|
||||||
|
|
||||||
|
set(_GLFW_NO_DLOAD_GDI32 ${BUILD_SHARED_LIBS})
|
||||||
|
set(_GLFW_NO_DLOAD_WINMM ${BUILD_SHARED_LIBS})
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
list(APPEND glfw_LIBRARIES winmm)
|
list(APPEND glfw_LIBRARIES winmm)
|
||||||
endif()
|
endif()
|
||||||
|
@ -34,7 +34,6 @@ if (BUILD_SHARED_LIBS)
|
|||||||
if (_GLFW_WIN32_WGL)
|
if (_GLFW_WIN32_WGL)
|
||||||
# The GLFW DLL needs a special compile-time macro and import library name
|
# The GLFW DLL needs a special compile-time macro and import library name
|
||||||
set_target_properties(glfw PROPERTIES
|
set_target_properties(glfw PROPERTIES
|
||||||
COMPILE_DEFINITIONS "_GLFW_BUILD_DLL;_GLFW_NO_DLOAD_GDI32;_GLFW_NO_DLOAD_WINMM"
|
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
IMPORT_PREFIX ""
|
IMPORT_PREFIX ""
|
||||||
IMPORT_SUFFIX "dll.lib")
|
IMPORT_SUFFIX "dll.lib")
|
||||||
|
@ -152,7 +152,11 @@ int _glfwPlatformTerminate(void)
|
|||||||
|
|
||||||
const char* _glfwPlatformGetVersionString(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;
|
return version;
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,14 @@
|
|||||||
// Define this to 1 if building GLFW for Cocoa/NSOpenGL
|
// Define this to 1 if building GLFW for Cocoa/NSOpenGL
|
||||||
#cmakedefine _GLFW_COCOA_NSGL
|
#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 to disable dynamic loading of gdi32
|
||||||
|
#cmakedefine _GLFW_NO_DLOAD_GDI32 1
|
||||||
|
// Define this to 1 to disable dynamic loading of winmm
|
||||||
|
#cmakedefine _GLFW_NO_DLOAD_WINMM 1
|
||||||
|
|
||||||
// Define this to 1 if XRandR is available
|
// Define this to 1 if XRandR is available
|
||||||
#cmakedefine _GLFW_HAS_XRANDR 1
|
#cmakedefine _GLFW_HAS_XRANDR 1
|
||||||
// Define this to 1 if Xf86VidMode is available
|
// Define this to 1 if Xf86VidMode is available
|
||||||
|
@ -679,6 +679,9 @@ const char* _glfwPlatformGetVersionString(void)
|
|||||||
" Linux-joystick-API"
|
" Linux-joystick-API"
|
||||||
#else
|
#else
|
||||||
" no-joystick-support"
|
" no-joystick-support"
|
||||||
|
#endif
|
||||||
|
#if defined(_GLFW_BUILD_DLL)
|
||||||
|
" shared"
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user