Added support for custom system cursors.

This adds 3 functions to the GLFW API: glfwCreateCursor,
glfwDestroyCursor and glfwSetCursor.
This commit is contained in:
urraka
2013-12-04 10:19:22 -03:00
committed by Camilla Berglund
parent 30f86286f5
commit 40c04a7565
14 changed files with 836 additions and 12 deletions
+16 -7
View File
@@ -121,7 +121,7 @@ endif()
#--------------------------------------------------------------------
if (WIN32)
set(_GLFW_WIN32 1)
message(STATUS "Using Win32 for window creation")
message(STATUS "Using Win32 for window creation")
if (GLFW_USE_EGL)
set(_GLFW_EGL 1)
@@ -137,7 +137,7 @@ elseif (APPLE)
message(STATUS "Using NSGL for context creation")
elseif (UNIX)
set(_GLFW_X11 1)
message(STATUS "Using X11 for window creation")
message(STATUS "Using X11 for window creation")
if (GLFW_USE_EGL)
set(_GLFW_EGL 1)
@@ -250,7 +250,7 @@ if (_GLFW_X11)
# Check for Xkb (X keyboard extension)
if (NOT X11_Xkb_FOUND)
message(FATAL_ERROR "The X keyboard extension headers were not found")
endif()
endif()
list(APPEND glfw_INCLUDE_DIR ${X11_Xkb_INCLUDE_PATH})
@@ -268,6 +268,15 @@ if (_GLFW_X11)
set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} -lm")
endif()
# Check for Xcursor
if (NOT X11_Xcursor_FOUND)
message(FATAL_ERROR "The Xcursor libraries and headers were not found")
endif()
list(APPEND glfw_INCLUDE_DIR ${X11_Xcursor_INCLUDE_PATH})
list(APPEND glfw_LIBRARIES ${X11_Xcursor_LIB})
set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} xcursor")
endif()
#--------------------------------------------------------------------
@@ -338,7 +347,7 @@ endif()
# Use Cocoa for window creation and NSOpenGL for context creation
#--------------------------------------------------------------------
if (_GLFW_COCOA AND _GLFW_NSGL)
if (GLFW_USE_MENUBAR)
set(_GLFW_USE_MENUBAR 1)
endif()
@@ -357,7 +366,7 @@ if (_GLFW_COCOA AND _GLFW_NSGL)
else()
message(STATUS "Building GLFW only for the native architecture")
endif()
# Set up library and include paths
find_library(COCOA_FRAMEWORK Cocoa)
find_library(IOKIT_FRAMEWORK IOKit)
@@ -394,7 +403,7 @@ endif()
configure_file(${GLFW_SOURCE_DIR}/docs/Doxyfile.in
${GLFW_BINARY_DIR}/docs/Doxyfile @ONLY)
configure_file(${GLFW_SOURCE_DIR}/src/glfw_config.h.in
configure_file(${GLFW_SOURCE_DIR}/src/glfw_config.h.in
${GLFW_BINARY_DIR}/src/glfw_config.h @ONLY)
configure_file(${GLFW_SOURCE_DIR}/src/glfwConfig.cmake.in
@@ -428,7 +437,7 @@ endif()
# The library is installed by src/CMakeLists.txt
#--------------------------------------------------------------------
if (GLFW_INSTALL)
install(DIRECTORY include/GLFW DESTINATION include
install(DIRECTORY include/GLFW DESTINATION include
FILES_MATCHING PATTERN glfw3.h PATTERN glfw3native.h)
install(FILES ${GLFW_BINARY_DIR}/src/glfwConfig.cmake