[CMake] WTF derived sources should only be referenced inside WTF
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Apr 2019 19:32:08 +0000 (19:32 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Apr 2019 19:32:08 +0000 (19:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196706

Reviewed by Konstantin Tokarev.

.:

* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/WebKitFS.cmake:

Source/WTF:

Use ${WTF_DERIVED_SOURCES_DIR} instead of ${DERIVED_SOURCES_DIR} within WTF.

* wtf/CMakeLists.txt:
* wtf/PlatformJSCOnly.cmake:
* wtf/PlatformMac.cmake:

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

ChangeLog
Source/WTF/ChangeLog
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/PlatformJSCOnly.cmake
Source/WTF/wtf/PlatformMac.cmake
Source/cmake/OptionsWinCairo.cmake
Source/cmake/WebKitFS.cmake

index 7808d23..ea4a919 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2019-04-09  Don Olmstead  <don.olmstead@sony.com>
 
+        [CMake] WTF derived sources should only be referenced inside WTF
+        https://bugs.webkit.org/show_bug.cgi?id=196706
+
+        Reviewed by Konstantin Tokarev.
+
+        * Source/cmake/OptionsWinCairo.cmake:
+        * Source/cmake/WebKitFS.cmake:
+
+2019-04-09  Don Olmstead  <don.olmstead@sony.com>
+
         [CMake] Apple builds should use ICU_INCLUDE_DIRS
         https://bugs.webkit.org/show_bug.cgi?id=196720
 
index 7a57ee7..a0f55e3 100644 (file)
@@ -1,5 +1,18 @@
 2019-04-09  Don Olmstead  <don.olmstead@sony.com>
 
+        [CMake] WTF derived sources should only be referenced inside WTF
+        https://bugs.webkit.org/show_bug.cgi?id=196706
+
+        Reviewed by Konstantin Tokarev.
+
+        Use ${WTF_DERIVED_SOURCES_DIR} instead of ${DERIVED_SOURCES_DIR} within WTF.
+
+        * wtf/CMakeLists.txt:
+        * wtf/PlatformJSCOnly.cmake:
+        * wtf/PlatformMac.cmake:
+
+2019-04-09  Don Olmstead  <don.olmstead@sony.com>
+
         [CMake] Apple builds should use ICU_INCLUDE_DIRS
         https://bugs.webkit.org/show_bug.cgi?id=196720
 
index 0391098..80aca50 100644 (file)
@@ -457,12 +457,15 @@ set(WTF_SOURCES
 
 set(WTF_INCLUDE_DIRECTORIES
     "${BMALLOC_DIR}"
+    # FIXME: https://bugs.webkit.org/show_bug.cgi?id=196734#c1
     "${CMAKE_BINARY_DIR}"
     "${DERIVED_SOURCES_DIR}"
     "${THIRDPARTY_DIR}"
 )
 
 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
+    "${CMAKE_BINARY_DIR}"
+    "${WTF_DERIVED_SOURCES_DIR}"
     "${WTF_DIR}"
     "${WTF_DIR}/wtf"
     "${WTF_DIR}/wtf/dtoa"
@@ -514,13 +517,13 @@ if (MSVC)
     add_custom_command(
         TARGET WTF
         PRE_BUILD
-        COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
+        COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${WTF_DERIVED_SOURCES_DIR}
         VERBATIM)
 
     add_custom_command(
         TARGET WTF
         POST_BUILD
-        COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
+        COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${WTF_DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
         VERBATIM)
 endif ()
 
index 3542fef..5392beb 100644 (file)
@@ -60,24 +60,21 @@ if (WIN32)
         win/Win32Handle.h
     )
 elseif (APPLE)
-    file(COPY mac/MachExceptions.defs DESTINATION ${DERIVED_SOURCES_WTF_DIR})
+    file(COPY mac/MachExceptions.defs DESTINATION ${WTF_DERIVED_SOURCES_DIR})
     add_custom_command(
         OUTPUT
-            ${DERIVED_SOURCES_WTF_DIR}/MachExceptionsServer.h
-            ${DERIVED_SOURCES_WTF_DIR}/mach_exc.h
-            ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
-            ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
+            ${WTF_DERIVED_SOURCES_DIR}/MachExceptionsServer.h
+            ${WTF_DERIVED_SOURCES_DIR}/mach_exc.h
+            ${WTF_DERIVED_SOURCES_DIR}/mach_excServer.c
+            ${WTF_DERIVED_SOURCES_DIR}/mach_excUser.c
         MAIN_DEPENDENCY mac/MachExceptions.defs
-        WORKING_DIRECTORY ${DERIVED_SOURCES_WTF_DIR}
+        WORKING_DIRECTORY ${WTF_DERIVED_SOURCES_DIR}
         COMMAND mig -sheader MachExceptionsServer.h MachExceptions.defs
         VERBATIM)
     list(APPEND WTF_SOURCES
         cocoa/MemoryFootprintCocoa.cpp
-        ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
-        ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
-    )
-    list(APPEND WTF_INCLUDE_DIRECTORIES
-        ${DERIVED_SOURCES_WTF_DIR}
+        ${WTF_DERIVED_SOURCES_DIR}/mach_excServer.c
+        ${WTF_DERIVED_SOURCES_DIR}/mach_excUser.c
     )
 elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
     list(APPEND WTF_SOURCES
@@ -117,9 +114,3 @@ endif ()
 list(APPEND WTF_LIBRARIES
     ${CMAKE_THREAD_LIBS_INIT}
 )
-
-if (APPLE)
-    list(APPEND WTF_INCLUDE_DIRECTORIES
-        "${WTF_DIR}/icu"
-    )
-endif ()
index d20a259..254ea03 100644 (file)
@@ -79,25 +79,21 @@ list(APPEND WTF_SOURCES
     text/cocoa/TextBreakIteratorInternalICUCocoa.cpp
 )
 
-list(APPEND WTF_PRIVATE_INCLUDE_DIRECTORIES
-    ${DERIVED_SOURCES_WTF_DIR}
-)
-
-file(COPY mac/MachExceptions.defs DESTINATION ${DERIVED_SOURCES_WTF_DIR})
+file(COPY mac/MachExceptions.defs DESTINATION ${WTF_DERIVED_SOURCES_DIR})
 
 add_custom_command(
     OUTPUT
-        ${DERIVED_SOURCES_WTF_DIR}/MachExceptionsServer.h
-        ${DERIVED_SOURCES_WTF_DIR}/mach_exc.h
-        ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
-        ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
+        ${WTF_DERIVED_SOURCES_DIR}/MachExceptionsServer.h
+        ${WTF_DERIVED_SOURCES_DIR}/mach_exc.h
+        ${WTF_DERIVED_SOURCES_DIR}/mach_excServer.c
+        ${WTF_DERIVED_SOURCES_DIR}/mach_excUser.c
     MAIN_DEPENDENCY mac/MachExceptions.defs
-    WORKING_DIRECTORY ${DERIVED_SOURCES_WTF_DIR}
+    WORKING_DIRECTORY ${WTF_DERIVED_SOURCES_DIR}
     COMMAND mig -sheader MachExceptionsServer.h MachExceptions.defs
     VERBATIM)
 list(APPEND WTF_SOURCES
-    ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
-    ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
+    ${WTF_DERIVED_SOURCES_DIR}/mach_excServer.c
+    ${WTF_DERIVED_SOURCES_DIR}/mach_excUser.c
 )
 
 WEBKIT_CREATE_FORWARDING_HEADERS(WebKitLegacy DIRECTORIES ${WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES} FILES ${WebKitLegacy_FORWARDING_HEADERS_FILES})
index db0279e..efdb3f6 100644 (file)
@@ -47,3 +47,6 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/WebCore/PrivateHea
 set(WebKitLegacy_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/WebKitLegacy/Headers)
 set(WebKit_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/WebKit/Headers)
 set(WebKit_PRIVATE_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/WebKit/PrivateHeaders)
+
+# Override derived sources directories
+set(WTF_DERIVED_SOURCES_DIR ${CMAKE_BINARY_DIR}/WTF/DerivedSources)
index c9e4cf9..eb06540 100644 (file)
@@ -37,7 +37,8 @@ set(DERIVED_SOURCES_WEBDRIVER_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebDriver"
 set(DERIVED_SOURCES_WEBKITLEGACY_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKitLegacy")
 set(DERIVED_SOURCES_WEBKIT_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit")
 set(DERIVED_SOURCES_WEBINSPECTORUI_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebInspectorUI")
-set(DERIVED_SOURCES_WTF_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WTF")
+
+set(WTF_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WTF")
 
 set(FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders)