Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit 979e5de

Browse files
[CMake] Add _PRIVATE_LIBRARIES to framework
https://bugs.webkit.org/show_bug.cgi?id=207004 Reviewed by Konstantin Tokarev. .: Use _PRIVATE_LIBRARIES to when creating a WebKit target to specify privately linked libraries. This fits with the current conventions in WebKit for CMake libraries and prevents appending to _LIBRARIES with a visibility modifier which likely has unintended consequences. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Move uses of PRIVATE within _LIBRARIES to _PRIVATE_LIBRARIES. Any _LIBRARIES appended afterwards will have that visibility set erroneously. * PlatformFTW.cmake: Source/WebKit: Move uses of PRIVATE within _LIBRARIES to _PRIVATE_LIBRARIES. Any _LIBRARIES appended afterwards will have that visibility set erroneously. * CMakeLists.txt: * PlatformFTW.cmake: * PlatformGTK.cmake: * PlatformWin.cmake: Source/WebKitLegacy: Move uses of PRIVATE within _LIBRARIES to _PRIVATE_LIBRARIES. Any _LIBRARIES appended afterwards will have that visibility set erroneously. * CMakeLists.txt: * PlatformFTW.cmake: * PlatformWin.cmake: Source/WTF: Move uses of PRIVATE within _LIBRARIES to _PRIVATE_LIBRARIES. Any _LIBRARIES appended afterwards will have that visibility set erroneously. * wtf/PlatformFTW.cmake: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@255491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent e04892b commit 979e5de

File tree

15 files changed

+176
-120
lines changed

15 files changed

+176
-120
lines changed

ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2020-01-31 Don Olmstead <[email protected]>
2+
3+
[CMake] Add _PRIVATE_LIBRARIES to framework
4+
https://bugs.webkit.org/show_bug.cgi?id=207004
5+
6+
Reviewed by Konstantin Tokarev.
7+
8+
Use _PRIVATE_LIBRARIES to when creating a WebKit target to specify privately linked
9+
libraries. This fits with the current conventions in WebKit for CMake libraries and
10+
prevents appending to _LIBRARIES with a visibility modifier which likely has
11+
unintended consequences.
12+
13+
* Source/cmake/WebKitMacros.cmake:
14+
115
2020-01-30 Ross Kirsling <[email protected]>
216

317
[CMake] Add SQLite::SQLite3 target

Source/JavaScriptCore/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2020-01-31 Don Olmstead <[email protected]>
2+
3+
[CMake] Add _PRIVATE_LIBRARIES to framework
4+
https://bugs.webkit.org/show_bug.cgi?id=207004
5+
6+
Reviewed by Konstantin Tokarev.
7+
8+
Move uses of PRIVATE within _LIBRARIES to _PRIVATE_LIBRARIES. Any _LIBRARIES appended
9+
afterwards will have that visibility set erroneously.
10+
11+
* PlatformFTW.cmake:
12+
113
2020-01-30 Mark Lam <[email protected]>
214

315
Some improvements to DFG and FTL dumps to improve readability and searchability.

Source/JavaScriptCore/PlatformFTW.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ if (ENABLE_REMOTE_INSPECTOR)
6464
inspector/remote/socket/win/RemoteInspectorSocketWin.cpp
6565
)
6666

67-
set(JavaScriptCore_LIBRARIES PUBLIC ${JavaScriptCore_LIBRARIES})
68-
list(APPEND JavaScriptCore_LIBRARIES
69-
PRIVATE ws2_32
67+
list(APPEND JavaScriptCore_PRIVATE_LIBRARIES
68+
ws2_32
7069
)
7170
else ()
7271
list(REMOVE_ITEM JavaScriptCore_SOURCES

Source/WTF/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2020-01-31 Don Olmstead <[email protected]>
2+
3+
[CMake] Add _PRIVATE_LIBRARIES to framework
4+
https://bugs.webkit.org/show_bug.cgi?id=207004
5+
6+
Reviewed by Konstantin Tokarev.
7+
8+
Move uses of PRIVATE within _LIBRARIES to _PRIVATE_LIBRARIES. Any _LIBRARIES appended
9+
afterwards will have that visibility set erroneously.
10+
11+
* wtf/PlatformFTW.cmake:
12+
113
2020-01-30 Conrad Shultz <[email protected]>
214

315
`FALLTHROUGH` macro isn't properly defined when building Objective-C files using Clang

Source/WTF/wtf/PlatformFTW.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ list(APPEND WTF_PUBLIC_HEADERS
77
win/Win32Handle.h
88
)
99

10-
set(WTF_LIBRARIES PUBLIC ${WTF_LIBRARIES})
10+
list(APPEND WTF_PRIVATE_LIBRARIES
11+
Dbghelp # For symbol handling <dbghelp.h>
12+
Shlwapi # For file system operations <shlwapi.h>
13+
)
14+
1115
list(APPEND WTF_LIBRARIES
12-
PRIVATE Dbghelp # For symbol handling <dbghelp.h>
13-
PRIVATE Shlwapi # For file system operations <shlwapi.h>
14-
PUBLIC Winmm # For multimedia functions, also used in <timeapi.h>
16+
Winmm # For multimedia functions, also used in <timeapi.h>
1517
)
1618

1719
list(APPEND WTF_SOURCES

Source/WebKit/CMakeLists.txt

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,16 @@ set(WebKit_MESSAGES_IN_FILES
216216
WebProcess/WebStorage/StorageAreaMap.messages.in
217217
)
218218

219-
if (${WebCore_LIBRARY_TYPE} STREQUAL STATIC)
220-
# Link with WebCore as PRIVATE not to propagate WebCore to all users of WebKit.
221-
set(WebKit_LIBRARIES
222-
PRIVATE WebCore
223-
PUBLIC WebCoreHeaderInterface
224-
)
225-
else ()
219+
if (${WebCore_LIBRARY_TYPE} STREQUAL SHARED)
226220
# All users of WebKit need to link WebCore if WebCore is a shared library.
227221
if (APPLE)
228-
set(WebKit_LIBRARIES PRIVATE WebCore)
222+
set(WebKit_PRIVATE_LIBRARIES WebCore)
229223
else ()
230-
set(WebKit_LIBRARIES PUBLIC WebCore)
224+
set(WebKit_LIBRARIES WebCore)
231225
endif ()
226+
else ()
227+
set(WebKit_LIBRARIES WebCoreHeaderInterface)
228+
set(WebKit_PRIVATE_LIBRARIES WebCore)
232229
endif ()
233230

234231
set(WebProcess_LIBRARIES
@@ -251,25 +248,25 @@ if (ENABLE_GRAPHICS_CONTEXT_GL)
251248
list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
252249
${LIBEPOXY_INCLUDE_DIRS}
253250
)
254-
list(APPEND WebKit_LIBRARIES
255-
PRIVATE ${LIBEPOXY_LIBRARIES}
251+
list(APPEND WebKit_PRIVATE_LIBRARIES
252+
${LIBEPOXY_LIBRARIES}
256253
)
257254
add_definitions(${LIBEPOXY_DEFINITIONS})
258255
else ()
259256
if (USE_OPENGL)
260257
list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
261258
${OPENGL_INCLUDE_DIRS}
262259
)
263-
list(APPEND WebKit_LIBRARIES
264-
PRIVATE ${OPENGL_LIBRARIES}
260+
list(APPEND WebKit_PRIVATE_LIBRARIES
261+
${OPENGL_LIBRARIES}
265262
)
266263
add_definitions(${OPENGL_DEFINITIONS})
267264
elseif (USE_OPENGL_ES)
268265
list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
269266
${OPENGLES2_INCLUDE_DIRS}
270267
)
271-
list(APPEND WebKit_LIBRARIES
272-
PRIVATE ${OPENGLES2_LIBRARIES}
268+
list(APPEND WebKit_PRIVATE_LIBRARIES
269+
${OPENGLES2_LIBRARIES}
273270
)
274271
add_definitions(${OPENGLES2_DEFINITIONS})
275272
endif ()
@@ -278,16 +275,16 @@ if (ENABLE_GRAPHICS_CONTEXT_GL)
278275
list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
279276
${EGL_INCLUDE_DIRS}
280277
)
281-
list(APPEND WebKit_LIBRARIES
282-
PRIVATE ${EGL_LIBRARIES}
278+
list(APPEND WebKit_PRIVATE_LIBRARIES
279+
${EGL_LIBRARIES}
283280
)
284281
add_definitions(${EGL_DEFINITIONS})
285282
endif ()
286283
endif ()
287284
endif ()
288285

289286
if (ATOMIC_INT64_REQUIRES_LIBATOMIC)
290-
list(APPEND WebKit_LIBRARIES PRIVATE atomic)
287+
list(APPEND WebKit_PRIVATE_LIBRARIES atomic)
291288
endif ()
292289

293290
if (UNIX)
@@ -296,7 +293,7 @@ if (UNIX)
296293
set(CMAKE_REQUIRED_LIBRARIES rt)
297294
check_function_exists(shm_open SHM_OPEN_REQUIRES_LIBRT)
298295
if (SHM_OPEN_REQUIRES_LIBRT)
299-
list(APPEND WebKit_LIBRARIES PRIVATE rt)
296+
list(APPEND WebKit_PRIVATE_LIBRARIES rt)
300297
endif ()
301298
unset(CMAKE_REQUIRED_LIBRARIES)
302299
endif ()

Source/WebKit/ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2020-01-31 Don Olmstead <[email protected]>
2+
3+
[CMake] Add _PRIVATE_LIBRARIES to framework
4+
https://bugs.webkit.org/show_bug.cgi?id=207004
5+
6+
Reviewed by Konstantin Tokarev.
7+
8+
Move uses of PRIVATE within _LIBRARIES to _PRIVATE_LIBRARIES. Any _LIBRARIES appended
9+
afterwards will have that visibility set erroneously.
10+
11+
* CMakeLists.txt:
12+
* PlatformFTW.cmake:
13+
* PlatformGTK.cmake:
14+
* PlatformWin.cmake:
15+
116
2020-01-31 Zan Dobersek <[email protected]>
217

318
[WPE] Touch-based scrolling roundtrips through the WebProcess

Source/WebKit/PlatformFTW.cmake

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,16 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
168168
"${WEBKIT_DIR}/WebProcess/WebCoreSupport/curl"
169169
)
170170

171-
list(APPEND WebKit_LIBRARIES
172-
PRIVATE
173-
${OPENSSL_LIBRARIES}
174-
D2d1.lib
175-
D3d11.lib
176-
Dwrite
177-
Dxgi.lib
178-
Dxguid
179-
WindowsCodecs
180-
mfuuid.lib
181-
strmiids.lib
171+
list(APPEND WebKit_PRIVATE_LIBRARIES
172+
${OPENSSL_LIBRARIES}
173+
D2d1.lib
174+
D3d11.lib
175+
Dwrite
176+
Dxgi.lib
177+
Dxguid
178+
WindowsCodecs
179+
mfuuid.lib
180+
strmiids.lib
182181
)
183182

184183
if (ENABLE_REMOTE_INSPECTOR)
@@ -194,10 +193,6 @@ if (ENABLE_REMOTE_INSPECTOR)
194193
)
195194
endif ()
196195

197-
set(SharedWebKitLibraries
198-
${WebKit_LIBRARIES}
199-
)
200-
201196
WEBKIT_WRAP_SOURCELIST(${WebKit_SOURCES})
202197

203198
# Temporarily list out shared headers here

Source/WebKit/PlatformGTK.cmake

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,6 @@ list(APPEND NetworkProcess_SOURCES
456456
NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
457457
)
458458

459-
set(SharedWebKitLibraries
460-
${WebKit_LIBRARIES}
461-
)
462-
463459
list(APPEND WebKit_LIBRARIES
464460
${GTK_UNIX_PRINT_LIBRARIES}
465461
)
@@ -472,16 +468,16 @@ if (USE_WPE_RENDERER)
472468
endif ()
473469

474470
if (LIBNOTIFY_FOUND)
475-
list(APPEND WebKit_LIBRARIES
476-
PRIVATE ${LIBNOTIFY_LIBRARIES}
477-
)
471+
list(APPEND WebKit_PRIVATE_LIBRARIES
472+
${LIBNOTIFY_LIBRARIES}
473+
)
478474
endif ()
479475

480476
if (USE_LIBWEBRTC)
481-
list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
482-
"${THIRDPARTY_DIR}/libwebrtc/Source/"
483-
"${THIRDPARTY_DIR}/libwebrtc/Source/webrtc"
484-
)
477+
list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
478+
"${THIRDPARTY_DIR}/libwebrtc/Source/"
479+
"${THIRDPARTY_DIR}/libwebrtc/Source/webrtc"
480+
)
485481
endif ()
486482

487483
# To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.

Source/WebKit/PlatformWin.cmake

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,10 @@ if (${WTF_PLATFORM_WIN_CAIRO})
173173
"${WEBKIT_DIR}/WebProcess/WebCoreSupport/curl"
174174
)
175175

176-
list(APPEND WebKit_LIBRARIES
177-
PRIVATE
178-
${OPENSSL_LIBRARIES}
179-
mfuuid.lib
180-
strmiids.lib
176+
list(APPEND WebKit_PRIVATE_LIBRARIES
177+
${OPENSSL_LIBRARIES}
178+
mfuuid.lib
179+
strmiids.lib
181180
)
182181
endif ()
183182

@@ -194,10 +193,6 @@ if (ENABLE_REMOTE_INSPECTOR)
194193
)
195194
endif ()
196195

197-
set(SharedWebKitLibraries
198-
${WebKit_LIBRARIES}
199-
)
200-
201196
WEBKIT_WRAP_SOURCELIST(${WebKit_SOURCES})
202197

203198
# Temporarily list out shared headers here

0 commit comments

Comments
 (0)