Skip to content

Commit 237844e

Browse files
committed
gtk4 compile
1 parent d2d6572 commit 237844e

40 files changed

+1456
-360
lines changed

DefineOptions.cmake

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
option(USE_CAMERA_SUPPORT "Detect and use camera support if available." ON)
2-
option(USE_COLORD "Enable colord support" ON)
3-
option(USE_MAP "Build Map View parts" ON)
4-
option(USE_LUA "Build lua scripting support" ON)
1+
option(USE_CAMERA_SUPPORT "Detect and use camera support if available." OFF)
2+
option(USE_COLORD "Enable colord support" OFF)
3+
option(USE_MAP "Build Map View parts" OFF)
4+
option(USE_LUA "Build lua scripting support" OFF)
55
option(DONT_USE_INTERNAL_LUA "Never fall back to the intree copy of lua" ON)
6-
option(USE_KWALLET "Build kwallet password storage back-end" ON)
7-
option(USE_LIBSECRET "Build libsecret password storage back-end" ON)
6+
option(USE_KWALLET "Build kwallet password storage back-end" OFF)
7+
option(USE_LIBSECRET "Build libsecret password storage back-end" OFF)
88
option(USE_UNITY "Use libunity to report progress in the launcher" OFF)
99
option(USE_OPENMP "Use OpenMP threading support." ON)
1010
option(USE_OPENCL "Use OpenCL support." ON)
11-
option(USE_GRAPHICSMAGICK "Use GraphicsMagick library for image import." ON)
11+
option(USE_GRAPHICSMAGICK "Use GraphicsMagick library for image import." OFF)
1212
option(USE_IMAGEMAGICK "Use ImageMagick library for image import." OFF)
1313
option(USE_DARKTABLE_PROFILING OFF)
1414
option(CUSTOM_CFLAGS "Don't override compiler optimization flags." OFF)
1515
option(BINARY_PACKAGE_BUILD "Sets march optimization to generic" OFF)
1616
option(USE_XMLLINT "Run xmllint to test if darktableconfig.xml is valid" ON)
17-
option(USE_PORTMIDI "Enable MIDI device support using PortMidi" ON)
17+
option(USE_PORTMIDI "Enable MIDI device support using PortMidi" OFF)
1818
option(USE_OPENJPEG "Enable JPEG 2000 support" ON)
1919
option(USE_JXL "Enable JPEG XL support" ON)
2020
option(USE_WEBP "Enable WebP support" ON)
@@ -26,17 +26,17 @@ option(USE_LIBRAW "Enable LibRaw support" ON)
2626
option(DONT_USE_INTERNAL_LIBRAW "If possible, use system instead of intree copy of LibRaw" OFF)
2727
option(BUILD_CMSTEST "Build a test program to check your system's color management setup" ON)
2828
option(USE_OPENEXR "Enable OpenEXR support" ON)
29-
option(BUILD_PRINT "Build the print module" ON)
29+
option(BUILD_PRINT "Build the print module" OFF)
3030
option(BUILD_RS_IDENTIFY "Build the darktable-rs-identify debug aid" ON)
3131
option(BUILD_SSE2_CODEPATHS "(EXPERIMENTAL OPTION, DO NOT DISABLE) Building SSE2-optimized codepaths" ON)
3232
option(VALIDATE_APPDATA_FILE "Use appstream-util (if found) to validate the .appdata file" OFF)
3333
option(BUILD_MSYS2_INSTALL "Build an MSYS2 version of the install, aka for Windows platform, but without dependency installs" OFF)
3434
option(BUILD_NOISE_TOOLS "Build tools for generating noise profiles" OFF)
3535
option(BUILD_CURVE_TOOLS "Build tools for generating base and tone curves" OFF)
36-
option(USE_GMIC "Use G'MIC image processing framework." ON)
36+
option(USE_GMIC "Use G'MIC image processing framework." OFF)
3737
option(USE_ICU "Use ICU - International Components for Unicode." ON)
3838
option(FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." OFF)
39-
option(USE_SDL2 "Enable SDL2 support" ON)
39+
option(USE_SDL2 "Enable SDL2 support" OFF)
4040

4141
if (USE_OPENCL)
4242
option(TESTBUILD_OPENCL_PROGRAMS "Test-compile OpenCL programs (needs LLVM and Clang 7+)" ON)

cmake/modules/FindGTK4.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cmake_minimum_required(VERSION 3.18)
2+
3+
find_package(PkgConfig REQUIRED)
4+
pkg_check_modules(GTK4 REQUIRED IMPORTED_TARGET gtk4)

src/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@ include_directories(SYSTEM ${Glib_INCLUDE_DIRS})
293293
list(APPEND LIBS ${Glib_LIBRARIES})
294294

295295
# GTK3 pulls in ATK, GDK, GDK-PIXBUF, CAIRO, GLIB, PANGO
296-
find_package(GTK3 3.24.15 REQUIRED)
297-
add_definitions("-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_24")
298-
#add_definitions("-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_MIN_REQUIRED")
299-
include_directories(SYSTEM ${GTK3_INCLUDE_DIRS})
300-
list(APPEND LIBS ${GTK3_LIBRARIES})
296+
find_package(GTK4 4.8.3 REQUIRED)
297+
add_definitions("-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_0")
298+
add_definitions("-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_4_18")
299+
include_directories(SYSTEM ${GTK4_INCLUDE_DIRS})
300+
list(APPEND LIBS ${GTK4_LIBRARIES})
301301

302302
# Check for libxml2 / broken cmake module can't be included in the foreach() below
303303
find_package(LibXml2 2.6 REQUIRED)

0 commit comments

Comments
 (0)