mirror of
https://github.com/open-goal/jak-project
synced 2026-07-09 23:01:56 -04:00
5b44aece75
* delete unused shaders * hide some options in debug menu * change fullscreen logic a bit * add "all actors" toggle * borderless fix and fix alpha in direct renderer untextured (do we need a separate shader for that?) * fix fuel cell orbit icons in widescreen * fix `curve` types * refs * fix levitator task... * fix some task stuff * update font code a bit (temp) * cmake, third-party and visual studio overhaul * Update .gitmodules * update modules * clone repos * fix encoding in zydis * where did these come from * try again * add submodule * Update 11zip * Update 11zip * Update 11zip * delete * try again * clang * update compiler flags * delete 11zip. go away. * Create memory-dump-p2s.py * properly * fix minimum architecture c++ compiler flags * fix zydis * oops * Update all-types.gc * fix clang-cl tests * make "all actors" work better, entity debug qol * update game-text conversion code to be more modularized * Create vendor.txt * fix typos and minor things * update refs * clang * Attempt to add clang-cl support to vs2019 and CI * vs2022 + clang-cl * srsly? fix clang build * Update launch.vs.json * extend windows CI timer
49 lines
1.6 KiB
CMake
Vendored
Generated
49 lines
1.6 KiB
CMake
Vendored
Generated
# Usage:
|
|
# cmake -P GenerateMappings.cmake <path/to/mappings.h.in> <path/to/mappings.h>
|
|
|
|
set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt")
|
|
set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt")
|
|
set(template_path "${CMAKE_ARGV3}")
|
|
set(target_path "${CMAKE_ARGV4}")
|
|
|
|
if (NOT EXISTS "${template_path}")
|
|
message(FATAL_ERROR "Failed to find template file ${template_path}")
|
|
endif()
|
|
|
|
file(DOWNLOAD "${source_url}" "${source_path}"
|
|
STATUS download_status
|
|
TLS_VERIFY on)
|
|
|
|
list(GET download_status 0 status_code)
|
|
list(GET download_status 1 status_message)
|
|
|
|
if (status_code)
|
|
message(FATAL_ERROR "Failed to download ${source_url}: ${status_message}")
|
|
endif()
|
|
|
|
file(STRINGS "${source_path}" lines)
|
|
foreach(line ${lines})
|
|
if (line MATCHES "^[0-9a-fA-F]")
|
|
if (line MATCHES "platform:Windows")
|
|
if (GLFW_WIN32_MAPPINGS)
|
|
string(APPEND GLFW_WIN32_MAPPINGS "\n")
|
|
endif()
|
|
string(APPEND GLFW_WIN32_MAPPINGS "\"${line}\",")
|
|
elseif (line MATCHES "platform:Mac OS X")
|
|
if (GLFW_COCOA_MAPPINGS)
|
|
string(APPEND GLFW_COCOA_MAPPINGS "\n")
|
|
endif()
|
|
string(APPEND GLFW_COCOA_MAPPINGS "\"${line}\",")
|
|
elseif (line MATCHES "platform:Linux")
|
|
if (GLFW_LINUX_MAPPINGS)
|
|
string(APPEND GLFW_LINUX_MAPPINGS "\n")
|
|
endif()
|
|
string(APPEND GLFW_LINUX_MAPPINGS "\"${line}\",")
|
|
endif()
|
|
endif()
|
|
endforeach()
|
|
|
|
configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX)
|
|
file(REMOVE "${source_path}")
|
|
|