mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-08 20:19:04 +03:00
build: use glfw3.4
This commit is contained in:
@@ -7,15 +7,11 @@ arch=('x86_64')
|
|||||||
url="https://github.com/obsqrbtz/clrsync"
|
url="https://github.com/obsqrbtz/clrsync"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=(
|
depends=(
|
||||||
glfw-x11
|
glfw
|
||||||
freetype2
|
freetype2
|
||||||
fontconfig
|
fontconfig
|
||||||
libx11
|
|
||||||
libxrandr
|
|
||||||
libxi
|
|
||||||
mesa
|
mesa
|
||||||
libglvnd
|
libglvnd
|
||||||
libxinerama
|
|
||||||
libxcursor
|
libxcursor
|
||||||
)
|
)
|
||||||
makedepends=('cmake')
|
makedepends=('cmake')
|
||||||
|
|||||||
@@ -7,15 +7,11 @@ arch=('x86_64')
|
|||||||
url="https://github.com/obsqrbtz/clrsync"
|
url="https://github.com/obsqrbtz/clrsync"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=(
|
depends=(
|
||||||
glfw-x11
|
glfw
|
||||||
freetype2
|
freetype2
|
||||||
fontconfig
|
fontconfig
|
||||||
libx11
|
|
||||||
libxrandr
|
|
||||||
libxi
|
|
||||||
mesa
|
mesa
|
||||||
libglvnd
|
libglvnd
|
||||||
libxinerama
|
|
||||||
libxcursor
|
libxcursor
|
||||||
)
|
)
|
||||||
makedepends=('cmake' 'git')
|
makedepends=('cmake' 'git')
|
||||||
|
|||||||
@@ -7,15 +7,11 @@ arch=('x86_64')
|
|||||||
url="https://github.com/obsqrbtz/clrsync"
|
url="https://github.com/obsqrbtz/clrsync"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=(
|
depends=(
|
||||||
glfw-x11
|
glfw
|
||||||
freetype2
|
freetype2
|
||||||
fontconfig
|
fontconfig
|
||||||
libx11
|
|
||||||
libxrandr
|
|
||||||
libxi
|
|
||||||
mesa
|
mesa
|
||||||
libglvnd
|
libglvnd
|
||||||
libxinerama
|
|
||||||
libxcursor
|
libxcursor
|
||||||
)
|
)
|
||||||
makedepends=('cmake')
|
makedepends=('cmake')
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ if(WIN32)
|
|||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
glfw
|
glfw
|
||||||
GIT_REPOSITORY https://github.com/glfw/glfw.git
|
GIT_REPOSITORY https://github.com/glfw/glfw.git
|
||||||
GIT_TAG 3.3.10
|
GIT_TAG 3.4
|
||||||
)
|
)
|
||||||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||||
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
@@ -78,8 +78,6 @@ else()
|
|||||||
pkg_check_modules(WAYLAND_CLIENT wayland-client)
|
pkg_check_modules(WAYLAND_CLIENT wayland-client)
|
||||||
pkg_check_modules(WAYLAND_EGL wayland-egl)
|
pkg_check_modules(WAYLAND_EGL wayland-egl)
|
||||||
|
|
||||||
include(CheckSymbolExists)
|
|
||||||
check_symbol_exists(glfwGetWaylandDisplay "GLFW/glfw3.h" GLFW_HAS_WAYLAND)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#define GLFW_EXPOSE_NATIVE_X11
|
|
||||||
#define GLFW_EXPOSE_NATIVE_WAYLAND
|
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
#include <GLFW/glfw3native.h>
|
#include <GLFW/glfw3native.h>
|
||||||
|
|
||||||
@@ -31,7 +29,17 @@ int main(int, char**)
|
|||||||
GLFWwindow* window = init_glfw();
|
GLFWwindow* window = init_glfw();
|
||||||
if (!window) return 1;
|
if (!window) return 1;
|
||||||
|
|
||||||
printf("Using backend: %s\n", glfwGetVersionString());
|
printf("GLFV Version: %s\n", glfwGetVersionString());
|
||||||
|
|
||||||
|
std::cout << "GLFW runtime platform: ";
|
||||||
|
switch (glfwGetPlatform()) {
|
||||||
|
case GLFW_PLATFORM_WAYLAND: std::cout << "Wayland\n"; break;
|
||||||
|
case GLFW_PLATFORM_X11: std::cout << "X11\n"; break;
|
||||||
|
case GLFW_PLATFORM_COCOA: std::cout << "Cocoa\n"; break;
|
||||||
|
case GLFW_PLATFORM_WIN32: std::cout << "Win32\n"; break;
|
||||||
|
default: std::cout << "Unknown\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
init_imgui(window, ini_path);
|
init_imgui(window, ini_path);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user