From 4607ea0a569b3c527ae8dce341ab55eb0d69d8f7 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia Date: Tue, 8 Mar 2016 17:26:23 -0800 Subject: [PATCH 2/2] [GTK][Mac] Enable support for gtk-doc on Mac https://bugs.webkit.org/show_bug.cgi?id=152650 Signed-off-by: Jeremy Huddleston Sequoia --- ChangeLog | 10 ++++++++++ Source/PlatformGTK.cmake | 2 +- Source/cmake/OptionsGTK.cmake | 5 ----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Source/PlatformGTK.cmake b/Source/PlatformGTK.cmake index af4d2e3..0b11b56 100644 --- a/Source/PlatformGTK.cmake +++ b/Source/PlatformGTK.cmake @@ -34,7 +34,7 @@ endmacro() add_gtkdoc_generator("docs-build.stamp" "") if (ENABLE_GTKDOC) add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp") -elseif (NOT ENABLED_COMPILER_SANITIZERS AND NOT CMAKE_CROSSCOMPILING AND NOT APPLE) +elseif (NOT ENABLED_COMPILER_SANITIZERS AND NOT CMAKE_CROSSCOMPILING) add_custom_target(gtkdoc DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp") # Add a default build step which check that documentation does not have any warnings diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake index 6b01f1a..b443d10 100644 --- a/Source/cmake/OptionsGTK.cmake +++ b/Source/cmake/OptionsGTK.cmake @@ -424,11 +424,6 @@ if (CMAKE_CROSSCOMPILING) set(ENABLE_INTROSPECTION OFF) endif () -# Override the cached variable, gtk-doc does not really work when building on Mac. -if (APPLE) - set(ENABLE_GTKDOC OFF) -endif () - set(DERIVED_SOURCES_WEBKITGTK_DIR ${DERIVED_SOURCES_DIR}/webkitgtk) set(DERIVED_SOURCES_WEBKITGTK_API_DIR ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkit) set(DERIVED_SOURCES_WEBKIT2GTK_DIR ${DERIVED_SOURCES_DIR}/webkit2gtk) diff --git a/Tools/gtk/gtkdoc.py b/Tools/gtk/gtkdoc.py index 4c8237b..a628ae0 100644 --- a/Tools/gtk/gtkdoc.py +++ b/Tools/gtk/gtkdoc.py @@ -322,6 +322,11 @@ class GTKDoc(object): env['RUN'] = 'LD_LIBRARY_PATH="%s:%s" ' % (self.library_path, current_ld_library_path) else: env['RUN'] = 'LD_LIBRARY_PATH="%s" ' % self.library_path + current_dyld_library_path = env.get('DYLD_LIBRARY_PATH') + if current_ld_library_path: + env['RUN'] = 'DYLD_LIBRARY_PATH="%s:%s" ' % (self.library_path, current_dyld_library_path) + else: + env['RUN'] = 'DYLD_LIBRARY_PATH="%s" ' % self.library_path if ldflags: env['LDFLAGS'] = '%s %s' % (ldflags, env.get('LDFLAGS', '')) -- 2.7.2