Skip to content

Commit 0c26105

Browse files
authored
Revert "first changes for macOS"
1 parent 49aedd2 commit 0c26105

File tree

8 files changed

+210
-178
lines changed

8 files changed

+210
-178
lines changed

DefineOptions.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ else ()
4444
set(TESTBUILD_OPENCL_PROGRAMS OFF)
4545
endif ()
4646

47-
# if(APPLE)
48-
# option(USE_MAC_INTEGRATION "Enable macOS integration" ON)
49-
# else(APPLE)
50-
# set(USE_MAC_INTEGRATION OFF)
51-
# endif(APPLE)
47+
if(APPLE)
48+
option(USE_MAC_INTEGRATION "Enable macOS integration" ON)
49+
else(APPLE)
50+
set(USE_MAC_INTEGRATION OFF)
51+
endif(APPLE)

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ CMAKE_OPTIONS_FROM_CMDLINE=""
3535

3636
PRINT_HELP=0
3737

38-
FEATURES="CAMERA COLORD GRAPHICSMAGICK IMAGEMAGICK JXL KWALLET LIBSECRET LUA MAP OPENCL OPENEXR OPENMP UNITY WEBP"
38+
FEATURES="CAMERA COLORD GRAPHICSMAGICK IMAGEMAGICK JXL KWALLET LIBSECRET LUA MAC_INTEGRATION MAP OPENCL OPENEXR OPENMP UNITY WEBP"
3939

4040
# prepare a lowercase version with a space before and after
4141
# it's very important for parse_feature, has no impact in for loop expansions
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# - Find the native GtkOSXApplication includes and library
2+
#
3+
# This module defines
4+
# MacIntegration_INCLUDE_DIR, where to find gtkosxapplication.h, etc.
5+
# MacIntegration_LIBRARIES, the libraries to link against to use GtkOSXApplication.
6+
# MacIntegration_FOUND, If false, do not try to use GtkOSXApplication.
7+
8+
#=============================================================================
9+
# Copyright 2010 henrik andersson
10+
#=============================================================================
11+
12+
find_path(MACINTEGRATION_INCLUDE_DIR gtkosxapplication.h PATH_SUFFIXES gtkmacintegration gtkmacintegration-gtk3 gtkmacintegration-gtk3/gtkmacintegration)
13+
mark_as_advanced(MACINTEGRATION_INCLUDE_DIR)
14+
15+
set(MACINTEGRATION_NAMES ${MACINTEGRATION_NAMES} gtkmacintegration libgtkmacintegration gtkmacintegration-gtk3 libgtkmacintegration-gtk3 PATH_SUFFIXES gtkmacintegration-gtk3)
16+
find_library(MACINTEGRATION_LIBRARY NAMES ${MACINTEGRATION_NAMES})
17+
mark_as_advanced(MACINTEGRATION_LIBRARY)
18+
19+
# handle the QUIETLY and REQUIRED arguments and set MacIntegration_FOUND to TRUE if
20+
# all listed variables are TRUE
21+
include(FindPackageHandleStandardArgs)
22+
find_package_handle_standard_args(MacIntegration DEFAULT_MSG MACINTEGRATION_LIBRARY MACINTEGRATION_INCLUDE_DIR)
23+
24+
IF(MacIntegration_FOUND)
25+
SET(MacIntegration_LIBRARIES ${MACINTEGRATION_LIBRARY})
26+
SET(MacIntegration_INCLUDE_DIRS ${MACINTEGRATION_INCLUDE_DIR})
27+
ENDIF(MacIntegration_FOUND)

src/CMakeLists.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -530,20 +530,20 @@ if(WIN32)
530530
add_definitions("-DHAVE_WINDOWS_CREDENTIALS")
531531
endif(WIN32)
532532

533-
# if(USE_MAC_INTEGRATION)
534-
# find_package(MacIntegration)
535-
# if(MacIntegration_FOUND)
536-
# include_directories(SYSTEM ${MacIntegration_INCLUDE_DIRS})
537-
# list(APPEND LIBS ${MacIntegration_LIBRARIES})
538-
# add_definitions("-DMAC_INTEGRATION")
539-
# find_package(P11Kit)
540-
# if(P11Kit_FOUND)
541-
# include_directories(SYSTEM ${P11Kit_INCLUDE_DIRS})
542-
# list(APPEND LIBS ${P11Kit_LINK_LIBRARIES})
543-
# add_definitions("-DHAVE_P11KIT")
544-
# endif()
545-
# endif(MacIntegration_FOUND)
546-
# endif(USE_MAC_INTEGRATION)
533+
if(USE_MAC_INTEGRATION)
534+
find_package(MacIntegration)
535+
if(MacIntegration_FOUND)
536+
include_directories(SYSTEM ${MacIntegration_INCLUDE_DIRS})
537+
list(APPEND LIBS ${MacIntegration_LIBRARIES})
538+
add_definitions("-DMAC_INTEGRATION")
539+
find_package(P11Kit)
540+
if(P11Kit_FOUND)
541+
include_directories(SYSTEM ${P11Kit_INCLUDE_DIRS})
542+
list(APPEND LIBS ${P11Kit_LINK_LIBRARIES})
543+
add_definitions("-DHAVE_P11KIT")
544+
endif()
545+
endif(MacIntegration_FOUND)
546+
endif(USE_MAC_INTEGRATION)
547547

548548
if(USE_UNITY)
549549
find_package(Unity)

src/common/darktable.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,6 @@ typedef union GdkEventOld
14271427
#define gtk_layout_new(...) NULL
14281428
#define gtk_layout_put(...)
14291429
#define gtk_main_do_event(...)
1430-
#define gtk_menu_bar_new(...) NULL
14311430
#define gtk_menu_item_get_label(...) NULL
14321431
#define gtk_menu_item_get_submenu(...) NULL
14331432
#define gtk_menu_item_new_with_label(...) NULL

src/control/progress.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#ifdef HAVE_UNITY
2424
#include <unity/unity/unity.h>
2525
#endif
26+
#ifdef MAC_INTEGRATION
27+
#include <gtkosxapplication.h>
28+
#endif
2629

2730
#ifdef _WIN32
2831
#include <gdk/gdkwin32.h>

0 commit comments

Comments
 (0)