Skip to content
Permalink
Browse files
[CMake] Use TARGET_PROPERTY to set includes for executables
https://bugs.webkit.org/show_bug.cgi?id=219743

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Use $<TARGET_PROPERTY:JavaScriptCore,INCLUDE_DIRECTORIES> for all executables being
built alongside JavaScriptCore. This simplifies the includes for those targets.

Additionally relocate the setting of include directories for LLInt executables
so they're next to the rest of their definitions.

* CMakeLists.txt:
* shell/CMakeLists.txt:

Source/WebKit:

Use $<TARGET_PROPERTY:WebKit,INCLUDE_DIRECTORIES> for all executables being
built alongside WebKit. This simplifies the includes for those targets.

* CMakeLists.txt:


Canonical link: https://commits.webkit.org/232301@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
donny-dont committed Dec 10, 2020
1 parent 79f5bf0 commit 7820a8acd5eda467848ff7fcb5779f8824b9214b
Showing 5 changed files with 42 additions and 20 deletions.
@@ -318,13 +318,20 @@ add_executable(LLIntSettingsExtractor
${JavaScriptCore_DERIVED_SOURCES_DIR}/LLIntDesiredSettings.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/Bytecodes.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeStructs.h
)

target_include_directories(LLIntSettingsExtractor PRIVATE
$<TARGET_PROPERTY:JavaScriptCore,INCLUDE_DIRECTORIES>
)
target_link_libraries(LLIntSettingsExtractor WebKit::WTF)
add_dependencies(LLIntSettingsExtractor JavaScriptCore_CopyHeaders)

add_executable(LLIntOffsetsExtractor
${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
${JavaScriptCore_DERIVED_SOURCES_DIR}/LLIntDesiredOffsets.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/Bytecodes.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeStructs.h
)

target_link_libraries(LLIntSettingsExtractor WebKit::WTF)
add_dependencies(LLIntSettingsExtractor JavaScriptCore_CopyHeaders)
target_include_directories(LLIntOffsetsExtractor PRIVATE
$<TARGET_PROPERTY:JavaScriptCore,INCLUDE_DIRECTORIES>
)
target_link_libraries(LLIntOffsetsExtractor WebKit::WTF)
add_dependencies(LLIntOffsetsExtractor JavaScriptCore_CopyHeaders)

@@ -1374,17 +1381,6 @@ if (NOT INTERNAL_BUILD)
add_dependencies(JavaScriptCore_CopyPrivateHeaders JavaScriptCore)
endif ()

target_include_directories(LLIntSettingsExtractor PRIVATE
${JavaScriptCore_INCLUDE_DIRECTORIES}
${JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES}
)
target_include_directories(LLIntSettingsExtractor SYSTEM PRIVATE ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})

target_include_directories(LLIntOffsetsExtractor PRIVATE
${JavaScriptCore_INCLUDE_DIRECTORIES}
${JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES}
)
target_include_directories(LLIntOffsetsExtractor SYSTEM PRIVATE ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})

add_subdirectory(shell)

@@ -1,3 +1,19 @@
2020-12-10 Don Olmstead <don.olmstead@sony.com>

[CMake] Use TARGET_PROPERTY to set includes for executables
https://bugs.webkit.org/show_bug.cgi?id=219743

Reviewed by Michael Catanzaro.

Use $<TARGET_PROPERTY:JavaScriptCore,INCLUDE_DIRECTORIES> for all executables being
built alongside JavaScriptCore. This simplifies the includes for those targets.

Additionally relocate the setting of include directories for LLInt executables
so they're next to the rest of their definitions.

* CMakeLists.txt:
* shell/CMakeLists.txt:

2020-12-09 Dmitry Bezhetskov <dbezhetskov@igalia.com>

Fix redundant assert
@@ -12,9 +12,7 @@ set(jsc_LIBRARIES
)

set(jsc_PRIVATE_INCLUDE_DIRECTORIES
${JavaScriptCore_INCLUDE_DIRECTORIES}
${JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES}
${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES}
$<TARGET_PROPERTY:JavaScriptCore,INCLUDE_DIRECTORIES>
)

if (WTF_OS_MAC_OS_X)
@@ -560,22 +560,22 @@ WEBKIT_FRAMEWORK(WebKit)
WEBKIT_FRAMEWORK_TARGET(WebKit)
ADD_WEBKIT_PREFIX_HEADER(WebKit)

list(APPEND WebProcess_PRIVATE_INCLUDE_DIRECTORIES ${WebKit_PRIVATE_INCLUDE_DIRECTORIES})
list(APPEND WebProcess_PRIVATE_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:WebKit,INCLUDE_DIRECTORIES>)
WEBKIT_EXECUTABLE(WebProcess)
ADD_WEBKIT_PREFIX_HEADER(WebProcess)

list(APPEND NetworkProcess_PRIVATE_INCLUDE_DIRECTORIES ${WebKit_PRIVATE_INCLUDE_DIRECTORIES})
list(APPEND NetworkProcess_PRIVATE_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:WebKit,INCLUDE_DIRECTORIES>)
WEBKIT_EXECUTABLE(NetworkProcess)
ADD_WEBKIT_PREFIX_HEADER(NetworkProcess)

if (ENABLE_GPU_PROCESS)
list(APPEND GPUProcess_PRIVATE_INCLUDE_DIRECTORIES ${WebKit_PRIVATE_INCLUDE_DIRECTORIES})
list(APPEND GPUProcess_PRIVATE_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:WebKit,INCLUDE_DIRECTORIES>)
WEBKIT_EXECUTABLE(GPUProcess)
ADD_WEBKIT_PREFIX_HEADER(GPUProcess)
endif ()

if (ENABLE_PLUGIN_PROCESS)
list(APPEND PluginProcess_PRIVATE_INCLUDE_DIRECTORIES ${WebKit_PRIVATE_INCLUDE_DIRECTORIES})
list(APPEND PluginProcess_PRIVATE_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:WebKit,INCLUDE_DIRECTORIES>)
WEBKIT_EXECUTABLE(PluginProcess)
ADD_WEBKIT_PREFIX_HEADER(PluginProcess)
endif ()
@@ -1,3 +1,15 @@
2020-12-10 Don Olmstead <don.olmstead@sony.com>

[CMake] Use TARGET_PROPERTY to set includes for executables
https://bugs.webkit.org/show_bug.cgi?id=219743

Reviewed by Michael Catanzaro.

Use $<TARGET_PROPERTY:WebKit,INCLUDE_DIRECTORIES> for all executables being
built alongside WebKit. This simplifies the includes for those targets.

* CMakeLists.txt:

2020-12-10 Chris Dumez <cdumez@apple.com>

Unreviewed, reverting r270542.

0 comments on commit 7820a8a

Please sign in to comment.