Skip to content

Commit

Permalink
gtk4 compile
Browse files Browse the repository at this point in the history
  • Loading branch information
dterrahe committed Oct 11, 2024
1 parent 6f8567d commit 1368824
Show file tree
Hide file tree
Showing 12 changed files with 615 additions and 16 deletions.
4 changes: 4 additions & 0 deletions cmake/modules/FindGTK4.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cmake_minimum_required(VERSION 3.18)

find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK4 REQUIRED IMPORTED_TARGET gtk4)
9 changes: 5 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ include_directories(SYSTEM ${Glib_INCLUDE_DIRS})
list(APPEND LIBS ${Glib_LIBRARIES})

# GTK3 pulls in ATK, GDK, GDK-PIXBUF, CAIRO, GLIB, PANGO
find_package(GTK3 3.24.15 REQUIRED)
add_definitions("-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_24")
find_package(GTK4 4.8.3 REQUIRED)
# add_definitions("-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_24")
#add_definitions("-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_MIN_REQUIRED")
include_directories(SYSTEM ${GTK3_INCLUDE_DIRS})
list(APPEND LIBS ${GTK3_LIBRARIES})
include_directories(SYSTEM ${GTK4_INCLUDE_DIRS})
list(APPEND LIBS ${GTK4_LIBRARIES})

# Check for libxml2 / broken cmake module can't be included in the foreach() below
find_package(LibXml2 2.6 REQUIRED)
Expand Down Expand Up @@ -700,6 +700,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.cmake.h" "${DARKTABLE_BINDIR}
#
# Build external deps
#
set(USE_LUA OFF)
if(USE_LUA)
find_package(Lua54 5.4)
if(Lua54_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion src/bauhaus/bauhaus.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "osx/osx.h"
#endif
#ifdef GDK_WINDOWING_WAYLAND
#include <gdk/gdkwayland.h>
// #include <gdk/gdkwayland.h>
#endif

#include <strings.h>
Expand Down
Loading

0 comments on commit 1368824

Please sign in to comment.