Fix Mac CMake build
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Oct 2015 20:01:20 +0000 (20:01 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Oct 2015 20:01:20 +0000 (20:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150686

Reviewed by Filip Pizlo.

.:

* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

* API/ObjCCallbackFunction.mm:
* CMakeLists.txt:
* PlatformMac.cmake:

Source/WebCore:

* PlatformMac.cmake:

Source/WebKit:

* CMakeLists.txt:
* PlatformMac.cmake:

Source/WebKit2:

* CMakeLists.txt:
* PlatformMac.cmake:

Source/WTF:

* wtf/CMakeLists.txt:
* wtf/Platform.h:
* wtf/PlatformMac.cmake:

Tools:

* Scripts/build-webkit:
* Scripts/webkitdirs.pm:
(isCachedArgumentfileOutOfDate):
(wrapperPrefixIfNeeded):
(generateBuildSystemFromCMakeProject):
(buildCMakeGeneratedProject):
(cmakeBasedPortName):
(determineIsCMakeBuild):
(isCMakeBuild):
(promptUser):
(jhbuildWrapperPrefixIfNeeded): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191749 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
ChangeLog
Source/JavaScriptCore/API/ObjCCallbackFunction.mm
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformMac.cmake
Source/WTF/ChangeLog
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/Platform.h
Source/WTF/wtf/PlatformMac.cmake
Source/WebCore/ChangeLog
Source/WebCore/PlatformMac.cmake
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/PlatformMac.cmake
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformMac.cmake
Source/cmake/WebKitMacros.cmake
Tools/ChangeLog
Tools/Scripts/build-webkit
Tools/Scripts/webkitdirs.pm

index fd522e5..7775d0c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-10-29  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Mac CMake build
+        https://bugs.webkit.org/show_bug.cgi?id=150686
+
+        Reviewed by Filip Pizlo.
+
+        * Source/cmake/WebKitMacros.cmake:
+
 2015-10-28  Alex Christensen  <achristensen@webkit.org>
 
         Compile and link with CMake on Mac
index c7d8685..1e5ddcd 100644 (file)
@@ -39,6 +39,7 @@
 #import "JSValueInternal.h"
 #import "ObjCCallbackFunction.h"
 #import "ObjcRuntimeExtras.h"
+#import "StructureInlines.h"
 #import <objc/runtime.h>
 #import <wtf/RetainPtr.h>
 
index 0554fdb..8e9d0de 100644 (file)
@@ -8,6 +8,8 @@ set(JavaScriptCore_INCLUDE_DIRECTORIES
     "${JAVASCRIPTCORE_DIR}/API"
     "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
     "${JAVASCRIPTCORE_DIR}/assembler"
+    "${JAVASCRIPTCORE_DIR}/b3"
+    "${JAVASCRIPTCORE_DIR}/b3/air"
     "${JAVASCRIPTCORE_DIR}/bindings"
     "${JAVASCRIPTCORE_DIR}/builtins"
     "${JAVASCRIPTCORE_DIR}/bytecode"
@@ -1219,12 +1221,42 @@ set(JavaScriptCore_BUILTINS_SOURCES
 )
 
 add_custom_command(
-   OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp
-          ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
-   MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
-   DEPENDS ${JavaScriptCore_BUILTINS_SOURCES} ${BUILTINS_GENERATOR_SCRIPTS}
-   COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py --framework JavaScriptCore --output-directory ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} --combined ${JavaScriptCore_BUILTINS_SOURCES}
-   VERBATIM)
+    OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/B3AddressMatcher.h
+    MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/b3/B3AddressMatcher.patterns
+    DEPENDS ${JAVASCRIPTCORE_DIR}/b3/generate_pattern_matcher.rb
+    COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/b3/generate_pattern_matcher.rb ${JAVASCRIPTCORE_DIR}/b3/B3AddressMatcher.patterns VERBATIM
+    WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
+)
+
+add_custom_command(
+    OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/B3LoweringMatcher.h
+    MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/b3/B3LoweringMatcher.patterns
+    DEPENDS ${JAVASCRIPTCORE_DIR}/b3/generate_pattern_matcher.rb
+    COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/b3/generate_pattern_matcher.rb ${JAVASCRIPTCORE_DIR}/b3/B3LoweringMatcher.patterns VERBATIM
+    WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
+)
+
+add_custom_command(
+    OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcode.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcodeGenerated.h
+    MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/b3/air/AirOpcode.opcodes
+    DEPENDS ${JAVASCRIPTCORE_DIR}/b3/air/opcode_generator.rb
+    COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/b3/air/opcode_generator.rb ${JAVASCRIPTCORE_DIR}/b3/air/AirOpcode.opcodes VERBATIM
+    WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
+)
+
+list(APPEND JavaScriptCore_SOURCES
+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcode.h
+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcodeGenerated.h
+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/B3AddressMatcher.h
+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/B3LoweringMatcher.h
+)
+
+add_custom_command(
+    OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
+    MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
+    DEPENDS ${JavaScriptCore_BUILTINS_SOURCES} ${BUILTINS_GENERATOR_SCRIPTS}
+    COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py --framework JavaScriptCore --output-directory ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} --combined ${JavaScriptCore_BUILTINS_SOURCES}
+    VERBATIM)
 
 list(APPEND JavaScriptCore_SOURCES
     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.cpp
@@ -1331,3 +1363,5 @@ endif ()
 
 add_custom_target(stageSharedScripts DEPENDS ${JavaScriptCore_SCRIPTS})
 add_dependencies(JavaScriptCore stageSharedScripts)
+
+WEBKIT_FRAMEWORK(JavaScriptCore)
index aaa635f..4409dcd 100644 (file)
@@ -1,3 +1,14 @@
+2015-10-29  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Mac CMake build
+        https://bugs.webkit.org/show_bug.cgi?id=150686
+
+        Reviewed by Filip Pizlo.
+
+        * API/ObjCCallbackFunction.mm:
+        * CMakeLists.txt:
+        * PlatformMac.cmake:
+
 2015-10-29  Filip Pizlo  <fpizlo@apple.com>
 
         Air needs syntax for escaping StackSlots
index 703d60a..2dd7f5c 100644 (file)
@@ -1,13 +1,3 @@
-find_library(COCOA_LIBRARY Cocoa)
-find_library(COREFOUNDATION_LIBRARY CoreFoundation)
-find_library(READLINE_LIBRARY Readline)
-list(APPEND JavaScriptCore_LIBRARIES
-    ${COREFOUNDATION_LIBRARY}
-    ${COCOA_LIBRARY}
-    ${READLINE_LIBRARY}
-    libicucore.dylib
-)
-
 list(APPEND JavaScriptCore_SOURCES
     API/JSAPIWrapperObject.mm
     API/JSContext.mm
index 3a078a9..582735f 100644 (file)
@@ -1,3 +1,14 @@
+2015-10-29  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Mac CMake build
+        https://bugs.webkit.org/show_bug.cgi?id=150686
+
+        Reviewed by Filip Pizlo.
+
+        * wtf/CMakeLists.txt:
+        * wtf/Platform.h:
+        * wtf/PlatformMac.cmake:
+
 2015-10-29  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r191728.
index de9140b..c986fff 100644 (file)
@@ -290,3 +290,5 @@ endif ()
 if (WTF_OUTPUT_NAME)
     set_target_properties(WTF PROPERTIES OUTPUT_NAME ${WTF_OUTPUT_NAME})
 endif ()
+
+WEBKIT_FRAMEWORK(WTF)
index c1901fd..d9fd437 100644 (file)
 
 /* The B3 compiler is an experimental backend that is still in development. We will keep it building
    on Mac/x86-64 for now, though it is unused except for tests. */
-#if PLATFORM(MAC) && CPU(X86_64)
+#if PLATFORM(MAC) && CPU(X86_64) && ENABLE(FTL_JIT)
 #define ENABLE_B3_JIT 1
 #endif
 
index 24bea72..c5104a2 100644 (file)
@@ -1,3 +1,15 @@
+set(WTF_LIBRARY_TYPE SHARED)
+
+find_library(COCOA_LIBRARY Cocoa)
+find_library(COREFOUNDATION_LIBRARY CoreFoundation)
+find_library(READLINE_LIBRARY Readline)
+list(APPEND WTF_LIBRARIES
+    ${COREFOUNDATION_LIBRARY}
+    ${COCOA_LIBRARY}
+    ${READLINE_LIBRARY}
+    libicucore.dylib
+)
+
 list(APPEND WTF_SOURCES
     AutodrainedPoolMac.mm
     RunLoopTimerCF.cpp
index 118e3ee..3ebccff 100644 (file)
@@ -1,3 +1,12 @@
+2015-10-29  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Mac CMake build
+        https://bugs.webkit.org/show_bug.cgi?id=150686
+
+        Reviewed by Filip Pizlo.
+
+        * PlatformMac.cmake:
+
 2015-10-29  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         One more URTBF after r191731.
index 9704886..38e61e9 100644 (file)
@@ -224,7 +224,7 @@ list(APPEND WebCore_SOURCES
     page/mac/ChromeMac.mm
     page/mac/DragControllerMac.mm
     page/mac/EventHandlerMac.mm
-    page/mac/PageMac.cpp
+    page/mac/PageMac.mm
     page/mac/ServicesOverlayController.mm
     page/mac/SettingsMac.mm
     page/mac/TextIndicatorWindow.mm
index fda963e..6eb5e10 100644 (file)
@@ -44,6 +44,4 @@ if (WebKit_OUTPUT_NAME)
     set_target_properties(WebKit PROPERTIES OUTPUT_NAME ${WebKit_OUTPUT_NAME})
 endif ()
 
-POPULATE_LIBRARY_VERSION(WEBKIT)
-set_target_properties(WebKit PROPERTIES VERSION ${WEBKIT_VERSION} SOVERSION ${WEBKIT_VERSION_MAJOR})
-install(TARGETS WebKit DESTINATION "${LIB_INSTALL_DIR}")
+WEBKIT_FRAMEWORK(WebKit)
index 9b2221e..a473feb 100644 (file)
@@ -1,3 +1,13 @@
+2015-10-29  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Mac CMake build
+        https://bugs.webkit.org/show_bug.cgi?id=150686
+
+        Reviewed by Filip Pizlo.
+
+        * CMakeLists.txt:
+        * PlatformMac.cmake:
+
 2015-10-28  Alex Christensen  <achristensen@webkit.org>
 
         Compile and link with CMake on Mac
index 4597dc6..099d7dd 100644 (file)
@@ -408,6 +408,9 @@ list(APPEND WebKit_SOURCES
 )
 
 WEBKIT_CREATE_FORWARDING_HEADERS(WebKitLegacy DIRECTORIES ${WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES} FILES ${WebKitLegacy_FORWARDING_HEADERS_FILES})
+WEBKIT_CREATE_FORWARDING_HEADERS(WebKit DIRECTORIES ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKitLegacy)
+
+set(WebKit_OUTPUT_NAME WebKitLegacy)
 
 set(WebKitLegacy_WebCore_FORWARDING_HEADERS
     DOMElement.h
index 42d2be9..ef6a28d 100644 (file)
@@ -28,6 +28,7 @@ set(WebKit2_INCLUDE_DIRECTORIES
     "${WEBKIT2_DIR}/UIProcess"
     "${WEBKIT2_DIR}/UIProcess/API"
     "${WEBKIT2_DIR}/UIProcess/API/C"
+    "${WEBKIT2_DIR}/UIProcess/API/Cocoa"
     "${WEBKIT2_DIR}/UIProcess/API/cpp"
     "${WEBKIT2_DIR}/UIProcess/Authentication"
     "${WEBKIT2_DIR}/UIProcess/Databases"
@@ -455,6 +456,51 @@ set(WebKit2_SOURCES
     UIProcess/API/C/WKViewportAttributes.cpp
     UIProcess/API/C/WKWindowFeaturesRef.cpp
 
+    UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm
+    UIProcess/API/Cocoa/APIUserContentExtensionStoreCocoa.mm
+    UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm
+    UIProcess/API/Cocoa/LegacyBundleForClass.mm
+    UIProcess/API/Cocoa/WKBackForwardList.mm
+    UIProcess/API/Cocoa/WKBackForwardListItem.mm
+    UIProcess/API/Cocoa/WKBrowsingContextController.mm
+    UIProcess/API/Cocoa/WKBrowsingContextGroup.mm
+    UIProcess/API/Cocoa/WKConnection.mm
+    UIProcess/API/Cocoa/WKError.mm
+    UIProcess/API/Cocoa/WKFrameInfo.mm
+    UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm
+    UIProcess/API/Cocoa/WKNavigation.mm
+    UIProcess/API/Cocoa/WKNavigationAction.mm
+    UIProcess/API/Cocoa/WKNavigationData.mm
+    UIProcess/API/Cocoa/WKNavigationResponse.mm
+    UIProcess/API/Cocoa/WKPreferences.mm
+    UIProcess/API/Cocoa/WKProcessGroup.mm
+    UIProcess/API/Cocoa/WKProcessPool.mm
+    UIProcess/API/Cocoa/WKScriptMessage.mm
+    UIProcess/API/Cocoa/WKSecurityOrigin.mm
+    UIProcess/API/Cocoa/WKTypeRefWrapper.mm
+    UIProcess/API/Cocoa/WKUserContentController.mm
+    UIProcess/API/Cocoa/WKUserScript.mm
+    UIProcess/API/Cocoa/WKWebView.mm
+    UIProcess/API/Cocoa/WKWebViewConfiguration.mm
+    UIProcess/API/Cocoa/WKWebsiteDataRecord.mm
+    UIProcess/API/Cocoa/WKWebsiteDataStore.mm
+    UIProcess/API/Cocoa/WKWindowFeatures.mm
+    UIProcess/API/Cocoa/_WKActivatedElementInfo.mm
+    UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm
+    UIProcess/API/Cocoa/_WKDownload.mm
+    UIProcess/API/Cocoa/_WKElementAction.mm
+    UIProcess/API/Cocoa/_WKElementInfo.mm
+    UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm
+    UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
+    UIProcess/API/Cocoa/_WKSessionState.mm
+    UIProcess/API/Cocoa/_WKThumbnailView.mm
+    UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm
+    UIProcess/API/Cocoa/_WKUserContentFilter.mm
+    UIProcess/API/Cocoa/_WKUserStyleSheet.mm
+    UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm
+    UIProcess/API/Cocoa/_WKVisitedLinkStore.mm
+    UIProcess/API/Cocoa/_WKWebsiteDataStore.mm
+
     UIProcess/Authentication/AuthenticationChallengeProxy.cpp
     UIProcess/Authentication/AuthenticationDecisionListener.cpp
     UIProcess/Authentication/WebCredential.cpp
@@ -839,7 +885,11 @@ endif ()
 POPULATE_LIBRARY_VERSION(WEBKIT2)
 set_target_properties(WebKit2 PROPERTIES VERSION ${WEBKIT2_VERSION} SOVERSION ${WEBKIT2_VERSION_MAJOR})
 
-install(TARGETS WebKit2 WebProcess
+if (APPLE)
+    WEBKIT_FRAMEWORK(WebKit2)
+else ()
+    install(TARGETS WebKit2 WebProcess
         LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
         RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}"
-)
+    )
+endif ()
index b621bdb..bc36f66 100644 (file)
@@ -1,3 +1,13 @@
+2015-10-29  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Mac CMake build
+        https://bugs.webkit.org/show_bug.cgi?id=150686
+
+        Reviewed by Filip Pizlo.
+
+        * CMakeLists.txt:
+        * PlatformMac.cmake:
+
 2015-10-29  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r191728.
index 356f2fd..63be78c 100644 (file)
@@ -473,12 +473,16 @@ list(APPEND WebKit2_MESSAGES_IN_FILES
 )
 
 set(WebKit2_FORWARDING_HEADERS_DIRECTORIES
+    Platform
     Shared
+
+    Shared/API
+    Shared/Cocoa
+
     Shared/API/Cocoa
     Shared/API/c
 
     Shared/API/c/cf
-
     Shared/API/c/mac
 
     UIProcess/Cocoa
index 8ade0f4..8e1c42d 100644 (file)
@@ -242,6 +242,12 @@ macro(WEBKIT_WRAP_SOURCELIST)
     source_group("DerivedSources" REGULAR_EXPRESSION "${DERIVED_SOURCES_WEBCORE_DIR}")
 endmacro()
 
+macro(WEBKIT_FRAMEWORK _target)
+    if (APPLE)
+        set_target_properties(${_target} PROPERTIES FRAMEWORK TRUE)
+        install(TARGETS ${_target} FRAMEWORK DESTINATION ${LIB_INSTALL_DIR})
+    endif ()
+endmacro()
 
 macro(WEBKIT_CREATE_FORWARDING_HEADER _target_directory _file)
     get_filename_component(_source_path "${CMAKE_SOURCE_DIR}/Source/" ABSOLUTE)
index 5fe2880..c42ca5a 100644 (file)
@@ -1,3 +1,22 @@
+2015-10-29  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Mac CMake build
+        https://bugs.webkit.org/show_bug.cgi?id=150686
+
+        Reviewed by Filip Pizlo.
+
+        * Scripts/build-webkit:
+        * Scripts/webkitdirs.pm:
+        (isCachedArgumentfileOutOfDate):
+        (wrapperPrefixIfNeeded):
+        (generateBuildSystemFromCMakeProject):
+        (buildCMakeGeneratedProject):
+        (cmakeBasedPortName):
+        (determineIsCMakeBuild):
+        (isCMakeBuild):
+        (promptUser):
+        (jhbuildWrapperPrefixIfNeeded): Deleted.
+
 2015-10-29  Lucas Forschler  <lforschler@apple.com>
 
         Teach JSC bots to build 32bit instead of x86_64
index eb89f97..eca5ca1 100755 (executable)
@@ -271,7 +271,7 @@ if (isAppleWinWebKit() || isWinCairo()) {
         }
         exit exitStatus($result);
     }
-} elsif (isAppleMacWebKit()) {
+} elsif (isAppleMacWebKit() && !isCMakeBuild()) {
     # Build, and abort if the build fails.
     for my $dir (@projects) {
         chdir $dir or die;
index 41a3c21..4639926 100755 (executable)
@@ -118,6 +118,7 @@ my $nmPath;
 my $osXVersion;
 my $iosVersion;
 my $generateDsym;
+my $isCMakeBuild;
 my $isGtk;
 my $isWinCairo;
 my $isWin64;
@@ -1792,11 +1793,14 @@ sub isCachedArgumentfileOutOfDate($@)
     return 0;
 }
 
-sub jhbuildWrapperPrefixIfNeeded()
+sub wrapperPrefixIfNeeded()
 {
     if (isWindows() || isCygwin()) {
         return ();
     }
+    if (isAppleMacWebKit()) {
+        return ("xcrun");
+    }
     if (-e getJhbuildPath()) {
         my @prefix = (File::Spec->catfile(sourceDir(), "Tools", "jhbuild", "jhbuild-wrapper"));
         if (isEfl()) {
@@ -1954,7 +1958,7 @@ sub generateBuildSystemFromCMakeProject
 
     # We call system("cmake @args") instead of system("cmake", @args) so that @args is
     # parsed for shell metacharacters.
-    my $wrapper = join(" ", jhbuildWrapperPrefixIfNeeded()) . " ";
+    my $wrapper = join(" ", wrapperPrefixIfNeeded()) . " ";
     my $returnCode = system($wrapper . "cmake @args");
 
     chdir($originalWorkingDirectory);
@@ -1988,7 +1992,7 @@ sub buildCMakeGeneratedProject($)
 
     # We call system("cmake @args") instead of system("cmake", @args) so that @args is
     # parsed for shell metacharacters. In particular, $makeArgs may contain such metacharacters.
-    my $wrapper = join(" ", jhbuildWrapperPrefixIfNeeded()) . " ";
+    my $wrapper = join(" ", wrapperPrefixIfNeeded()) . " ";
     return system($wrapper . "$command @args");
 
 }
@@ -2035,12 +2039,23 @@ sub cmakeBasedPortName()
 {
     return "Efl" if isEfl();
     return "GTK" if isGtk();
+    return "Mac" if isAppleMacWebKit();
     return "";
 }
 
+sub determineIsCMakeBuild()
+{
+    return if defined($isCMakeBuild);
+    $isCMakeBuild = checkForArgumentAndRemoveFromARGV("--cmake");
+}
+
 sub isCMakeBuild()
 {
-    return isEfl() || isGtk();
+    if (isEfl() || isGtk()) {
+        return 1;
+    }
+    determineIsCMakeBuild();
+    return $isCMakeBuild;
 }
 
 sub promptUser