[cmake] Set library types before their targets are created
authorannulen@yandex.ru <annulen@yandex.ru@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 05:46:55 +0000 (05:46 +0000)
committerannulen@yandex.ru <annulen@yandex.ru@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 05:46:55 +0000 (05:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174600

Reviewed by Michael Catanzaro.

Since r219560 library targets are created before PlatformXXX.cmake
files are processed, however library type must be passed in
add_library() call and cannot be changed afterwards. Set these
variables in OptionsXXX.cmake.

.:

* CMakeLists.txt:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWin.cmake:

Source/WebCore:

No new tests needed.

* PlatformMac.cmake:

Source/WebKitLegacy:

* PlatformMac.cmake:
* PlatformWin.cmake:

Source/WTF:

* wtf/PlatformGTK.cmake:
* wtf/PlatformMac.cmake:

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

13 files changed:
CMakeLists.txt
ChangeLog
Source/WTF/ChangeLog
Source/WTF/wtf/PlatformGTK.cmake
Source/WTF/wtf/PlatformMac.cmake
Source/WebCore/ChangeLog
Source/WebCore/PlatformMac.cmake
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/PlatformMac.cmake
Source/WebKitLegacy/PlatformWin.cmake
Source/cmake/OptionsMac.cmake
Source/cmake/OptionsWPE.cmake
Source/cmake/OptionsWin.cmake

index e6e198f..f560345 100644 (file)
@@ -119,6 +119,7 @@ else ()
     set(WebCore_LIBRARY_TYPE STATIC)
 endif ()
 
+set(WTF_LIBRARY_TYPE STATIC)
 set(JavaScriptCore_LIBRARY_TYPE SHARED)
 set(PAL_LIBRARY_TYPE STATIC)
 set(WebKit_LIBRARY_TYPE SHARED)
index d6dc130..fbe131a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2017-07-17  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [cmake] Set library types before their targets are created
+        https://bugs.webkit.org/show_bug.cgi?id=174600
+
+        Reviewed by Michael Catanzaro.
+
+        Since r219560 library targets are created before PlatformXXX.cmake
+        files are processed, however library type must be passed in
+        add_library() call and cannot be changed afterwards. Set these
+        variables in OptionsXXX.cmake.
+
+        * CMakeLists.txt:
+        * Source/cmake/OptionsMac.cmake:
+        * Source/cmake/OptionsWPE.cmake:
+        * Source/cmake/OptionsWin.cmake:
+
 2017-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         [CMake] Include most CMake modules from WebKitCommon.cmake
index 2bec97b..633bfef 100644 (file)
@@ -1,3 +1,18 @@
+2017-07-17  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [cmake] Set library types before their targets are created
+        https://bugs.webkit.org/show_bug.cgi?id=174600
+
+        Reviewed by Michael Catanzaro.
+
+        Since r219560 library targets are created before PlatformXXX.cmake
+        files are processed, however library type must be passed in
+        add_library() call and cannot be changed afterwards. Set these
+        variables in OptionsXXX.cmake.
+
+        * wtf/PlatformGTK.cmake:
+        * wtf/PlatformMac.cmake:
+
 2017-07-17  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
 
         Move USE_AVFOUNDATION definition on Windows to wtf/Platform.h
index 55837f1..cda5c29 100644 (file)
@@ -1,4 +1,3 @@
-set(WTF_LIBRARY_TYPE STATIC)
 set(WTF_OUTPUT_NAME WTFGTK)
 
 list(APPEND WTF_SOURCES
index 112d436..a607dd0 100644 (file)
@@ -1,5 +1,3 @@
-set(WTF_LIBRARY_TYPE STATIC)
-
 find_library(COCOA_LIBRARY Cocoa)
 find_library(COREFOUNDATION_LIBRARY CoreFoundation)
 find_library(READLINE_LIBRARY Readline)
index 02f1f67..b565ce6 100644 (file)
@@ -1,3 +1,19 @@
+2017-07-17  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [cmake] Set library types before their targets are created
+        https://bugs.webkit.org/show_bug.cgi?id=174600
+
+        Reviewed by Michael Catanzaro.
+
+        Since r219560 library targets are created before PlatformXXX.cmake
+        files are processed, however library type must be passed in
+        add_library() call and cannot be changed afterwards. Set these
+        variables in OptionsXXX.cmake.
+
+        No new tests needed.
+
+        * PlatformMac.cmake:
+
 2017-07-17  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
 
         Move USE_AVFOUNDATION definition on Windows to wtf/Platform.h
index 4240a1d..c035146 100644 (file)
@@ -1,5 +1,3 @@
-set(WebCore_LIBRARY_TYPE SHARED)
-
 if ("${CURRENT_OSX_VERSION}" MATCHES "10.9")
 set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceMavericks.a)
 elif ("${CURRENT_OSX_VERSION}" MATCHES "10.10")
@@ -800,7 +798,6 @@ set(ADDITIONAL_BINDINGS_DEPENDENCIES
     ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
 )
 
-set(WebCoreTestSupport_LIBRARY_TYPE SHARED)
 list(APPEND WebCoreTestSupport_LIBRARIES PRIVATE WebCore)
 list(APPEND WebCoreTestSupport_SOURCES
     bindings/js/JSMockContentFilterSettingsCustom.cpp
index 5f5f7c3..92148e3 100644 (file)
@@ -1,3 +1,18 @@
+2017-07-17  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [cmake] Set library types before their targets are created
+        https://bugs.webkit.org/show_bug.cgi?id=174600
+
+        Reviewed by Michael Catanzaro.
+
+        Since r219560 library targets are created before PlatformXXX.cmake
+        files are processed, however library type must be passed in
+        add_library() call and cannot be changed afterwards. Set these
+        variables in OptionsXXX.cmake.
+
+        * PlatformMac.cmake:
+        * PlatformWin.cmake:
+
 2017-07-17  Darin Adler  <darin@apple.com>
 
         Improve use of NeverDestroyed
index b90b29b..cc4acc5 100644 (file)
@@ -320,8 +320,6 @@ list(APPEND WebKit_SOURCES
     mac/WebView/WebViewData.mm
 )
 
-set(WebKit_LIBRARY_TYPE SHARED)
-
 set(WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES
     mac/DOM
     mac/DefaultDelegates
index 8336e38..b0e9a76 100644 (file)
@@ -457,8 +457,6 @@ if (ENABLE_GRAPHICS_CONTEXT_3D)
     )
 endif ()
 
-set(WebKit_LIBRARY_TYPE SHARED)
-
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
 
index cc70594..b92b112 100644 (file)
@@ -113,3 +113,7 @@ WEBKIT_OPTION_END()
 set(ENABLE_GRAPHICS_CONTEXT_3D ON)
 set(ENABLE_WEBKIT_LEGACY ON)
 set(ENABLE_WEBKIT ON)
+
+set(WebCore_LIBRARY_TYPE SHARED)
+set(WebCoreTestSupport_LIBRARY_TYPE SHARED)
+set(WebKit_LIBRARY_TYPE SHARED)
index 3a1073d..c64119a 100644 (file)
@@ -52,7 +52,6 @@ SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE})
 
 set(ENABLE_API_TESTS ${DEVELOPER_MODE})
 
-set(WTF_LIBRARY_TYPE STATIC)
 set(JavaScriptCore_LIBRARY_TYPE STATIC)
 set(WebCore_LIBRARY_TYPE STATIC)
 set(WebKit2_OUTPUT_NAME WPEWebKit)
index 8da2ce2..73340d5 100644 (file)
@@ -135,5 +135,6 @@ set(PORT Win)
 set(JavaScriptCore_LIBRARY_TYPE SHARED)
 set(WTF_LIBRARY_TYPE SHARED)
 set(PAL_LIBRARY_TYPE STATIC)
+set(WebKit_LIBRARY_TYPE SHARED)
 
 find_package(ICU REQUIRED)