diff options
author | James Cowgill <jcowgill@debian.org> | 2016-10-27 18:34:24 +0100 |
---|---|---|
committer | James Cowgill <jcowgill@debian.org> | 2016-10-27 18:34:24 +0100 |
commit | fc50d231530ae85da5cc3f3ebd131310c15bf359 (patch) | |
tree | 12c9f3c3f01ee1182d399593347a8611217bbb6c /cmake | |
parent | df93e238e30e97850d76ad5585b8ab9ad9c03e67 (diff) |
New upstream version 2.4.1~git15.b61c2f8+dfsg
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Config.cmake | 6 | ||||
-rw-r--r-- | cmake/Modules/FindSFML.cmake | 9 | ||||
-rw-r--r-- | cmake/Modules/FindXCB.cmake | 97 |
3 files changed, 8 insertions, 104 deletions
diff --git a/cmake/Config.cmake b/cmake/Config.cmake index 6506ac0..cff54d0 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -27,7 +27,7 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") # don't use the OpenGL ES implementation on Linux set(OPENGL_ES 0) endif() -elseif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") +elseif(CMAKE_SYSTEM_NAME MATCHES "^k?FreeBSD$") set(SFML_OS_FREEBSD 1) # don't use the OpenGL ES implementation on FreeBSD set(OPENGL_ES 0) @@ -64,6 +64,10 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Android") # use the OpenGL ES implementation on Android set(OPENGL_ES 1) +# comparing CMAKE_SYSTEM_NAME with "CYGWIN" generates a false warning depending on the CMake version +# let's avoid it so the actual error is more visible +elseif(${CYGWIN}) + message(FATAL_ERROR "Unfortunately SFML doesn't support Cygwin's 'hybrid' status between both Windows and Linux derivatives.\nIf you insist on using the GCC, please use a standalone build of MinGW without the Cygwin environment instead.") else() message(FATAL_ERROR "Unsupported operating system or environment") return() diff --git a/cmake/Modules/FindSFML.cmake b/cmake/Modules/FindSFML.cmake index fdea1eb..fe84c96 100644 --- a/cmake/Modules/FindSFML.cmake +++ b/cmake/Modules/FindSFML.cmake @@ -285,10 +285,7 @@ if(SFML_STATIC_LIBRARIES) # find libraries if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD) find_sfml_dependency(X11_LIBRARY "X11" X11) - find_sfml_dependency(LIBXCB_LIBRARIES "XCB" xcb libxcb) - find_sfml_dependency(X11_XCB_LIBRARY "X11-xcb" X11-xcb libX11-xcb) - find_sfml_dependency(XCB_RANDR_LIBRARY "xcb-randr" xcb-randr libxcb-randr) - find_sfml_dependency(XCB_IMAGE_LIBRARY "xcb-image" xcb-image libxcb-image) + find_sfml_dependency(XRANDR_LIBRARY "Xrandr" Xrandr) endif() if(FIND_SFML_OS_LINUX) @@ -299,9 +296,9 @@ if(SFML_STATIC_LIBRARIES) if(FIND_SFML_OS_WINDOWS) set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "opengl32" "winmm" "gdi32") elseif(FIND_SFML_OS_LINUX) - set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${LIBXCB_LIBRARIES} ${X11_XCB_LIBRARY} ${XCB_RANDR_LIBRARY} ${XCB_IMAGE_LIBRARY} ${UDEV_LIBRARIES}) + set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${XRANDR_LIBRARY} ${UDEV_LIBRARIES}) elseif(FIND_SFML_OS_FREEBSD) - set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${LIBXCB_LIBRARIES} ${X11_XCB_LIBRARY} ${XCB_RANDR_LIBRARY} ${XCB_IMAGE_LIBRARY} "usbhid") + set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${XRANDR_LIBRARY} "usbhid") elseif(FIND_SFML_OS_MACOSX) set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "-framework OpenGL -framework Foundation -framework AppKit -framework IOKit -framework Carbon") endif() diff --git a/cmake/Modules/FindXCB.cmake b/cmake/Modules/FindXCB.cmake deleted file mode 100644 index d691461..0000000 --- a/cmake/Modules/FindXCB.cmake +++ /dev/null @@ -1,97 +0,0 @@ -# Try to find libxcb -# -# -# Once done this will define: -# LIBXCB_FOUND - True if xcb was found -# LIBXCB_INCLUDE_DIRS - Directories containing the headers -# LIBXCB_LIBRARIES - List of libraries to link to -# -# Also for each requested component: -# LIBXCB_${UPPER_COMPONENT_NAME}_FOUND -# LIBXCB_${UPPER_COMPONENT_NAME}_INCLUDE_DIRS -# LIBXCB_${UPPER_COMPONENT_NAME}_LIBRARIES - -include(FindPackageHandleStandardArgs) - -IF(NOT WIN32) - IF(LIBXCB_LIBRARIES AND LIBXCB_INCLUDE_DIR) - set(XCB_FIND_QUIETLY TRUE) - ENDIF() - - # Find xcb - FIND_PATH(LIBXCB_INCLUDE_DIR xcb/xcb.h) - FIND_LIBRARY(LIBXCB_LIBRARY NAMES xcb libxcb) - - # Add xcb info to LIBXCB_LIBRARIES and LIBXCB_INCLUDE_DIRS - SET(LIBXCB_LIBRARIES ${LIBXCB_LIBRARY}) - SET(LIBXCB_INCLUDE_DIRS ${LIBXCB_INCLUDE_DIR}) - - find_package_handle_standard_args(LIBXCB DEFAULT_MSG - LIBXCB_LIBRARY LIBXCB_INCLUDE_DIR) - - mark_as_advanced(LIBXCB_LIBRARY LIBXCB_INCLUDE_DIR) - - # Check whether we should search for XLIB_XCB - set(FIND_XLIB_XCB FALSE) - FOREACH(XCB_COMPONENT ${XCB_FIND_COMPONENTS}) - # Generate upper string of the component name - string(TOUPPER ${XCB_COMPONENT} XCB_COMPONENT_UPPER) - - IF(${XCB_COMPONENT_UPPER} MATCHES "XLIB_XCB") - set(FIND_XLIB_XCB TRUE) - ELSE() - # XCB_COMPONENTS is generated to be a copy of XCB_FIND_COMPONENTS - # without XLIB_XCB (for later component search) - set(XCB_COMPONENTS ${XCB_COMPONENTS} ${XCB_COMPONENT}) - ENDIF() - ENDFOREACH() - - # Find XLIB_XCB if requested - IF(FIND_XLIB_XCB) - FIND_PATH(XLIB_XCB_INCLUDE_DIR X11/Xlib-xcb.h) - FIND_LIBRARY(XLIB_XCB_LIBRARY NAMES X11-xcb libX11-xcb) - - SET(XLIB_XCB_LIBRARIES ${XLIB_XCB_LIBRARY}) - SET(XLIB_XCB_INCLUDE_DIRS ${XLIB_XCB_INCLUDE_DIR}) - - find_package_handle_standard_args(XLIB_XCB DEFAULT_MSG - XLIB_XCB_LIBRARY LIBXCB_INCLUDE_DIR) - - mark_as_advanced(XLIB_XCB_LIBRARY XLIB_XCB_INCLUDE_DIR) - - # Add xlib_xcb info to LIBXCB_LIBRARIES and LIBXCB_INCLUDE_DIRS - set(LIBXCB_LIBRARIES ${LIBXCB_LIBRARIES} ${XLIB_XCB_LIBRARIES}) - set(LIBXCB_INCLUDE_DIRS ${LIBXCB_INCLUDE_DIRS} ${XLIB_XCB_INCLUDE_DIR}) - - if(NOT XLIB_XCB_FOUND) - message(FATAL_ERROR "XlibXcb library not found") - endif() - ELSE() - # Add component name to the component list - set(${XCB_COMPONENTS} ${XCB_FIND_COMPONENTS}) - ENDIF() - - # Loop through requested xcb components (does not contain xlib_xcb) - FOREACH(XCB_COMPONENT ${XCB_COMPONENTS}) - # Generate lower and upper string of the component name - string(TOLOWER ${XCB_COMPONENT} XCB_COMPONENT_LOWER) - string(TOUPPER ${XCB_COMPONENT} XCB_COMPONENT_UPPER) - - # Find the specific component - FIND_LIBRARY(LIBXCB_${XCB_COMPONENT_UPPER}_LIBRARY - NAMES libxcb-${XCB_COMPONENT_LOWER} xcb-${XCB_COMPONENT_LOWER}) - - find_package_handle_standard_args(LIBXCB_${XCB_COMPONENT_UPPER} DEFAULT_MSG - LIBXCB_${XCB_COMPONENT_UPPER}_LIBRARY LIBXCB_INCLUDE_DIR) - - mark_as_advanced(LIBXCB_${XCB_COMPONENT_UPPER}_LIBRARY) - - # Append the component's library path to LIBXCB_LIBRARIES - set(LIBXCB_LIBRARIES ${LIBXCB_LIBRARIES} ${LIBXCB_${XCB_COMPONENT_UPPER}_LIBRARY}) - - if(NOT LIBXCB_${XCB_COMPONENT_UPPER}_FOUND) - message(FATAL_ERROR "xcb-${XCB_COMPONENT_LOWER} not found") - endif() - ENDFOREACH() - -endif() |