Skip to content
Permalink
Browse files
[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:

Source/WTF:

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

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


Canonical link: https://commits.webkit.org/211024@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
donny-dont committed Apr 9, 2019
1 parent 1696f91 commit 3003cd6556e6bb96ae43d2351ea2ef1ce5a5eaeb
Showing 7 changed files with 49 additions and 32 deletions.
@@ -1,3 +1,13 @@
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
@@ -1,3 +1,16 @@
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
@@ -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 ()

@@ -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 ()
@@ -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})
@@ -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)
@@ -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)

0 comments on commit 3003cd6

Please sign in to comment.