[CMake] Always build wtf as a static library.
authorkubo@profusion.mobi <kubo@profusion.mobi@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Feb 2012 06:49:07 +0000 (06:49 +0000)
committerkubo@profusion.mobi <kubo@profusion.mobi@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Feb 2012 06:49:07 +0000 (06:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=79857

Reviewed by Eric Seidel.

.:

* CMakeLists.txt: Put static libraries in ${CMAKE_BINARY_DIR} too
to have them grouped with the shared ones.

Source/JavaScriptCore:

To help the efforts in bug 75673 to move WTF out of
JavaScriptCore, act more like the other ports and remove the
possibility of building WTF as a shared library.

It does not make much sense to, for example, ship WTF as a
separate .so with webkit-efl packages, and it should be small
enough not to cause problems during linking.

* wtf/CMakeLists.txt:

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

CMakeLists.txt
ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/CMakeLists.txt

index 6e0f98b..b029acc 100644 (file)
@@ -42,6 +42,7 @@ SET(DERIVED_SOURCES_WEBKIT2_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit2")
 
 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Source/cmake")
 
+SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
 
@@ -119,14 +120,12 @@ SET(WebKit2_LIBRARY_NAME WebKit2)
 # -----------------------------------------------------------------------------
 # Default library types
 # -----------------------------------------------------------------------------
-OPTION(SHARED_CORE "build WTF, JavaScriptCore and WebCore as shared libraries")
+OPTION(SHARED_CORE "build JavaScriptCore and WebCore as shared libraries")
 
 IF (SHARED_CORE)
-    SET(WTF_LIBRARY_TYPE SHARED)
     SET(JavaScriptCore_LIBRARY_TYPE SHARED)
     SET(WebCore_LIBRARY_TYPE SHARED)
 ELSE ()
-    SET(WTF_LIBRARY_TYPE STATIC)
     SET(JavaScriptCore_LIBRARY_TYPE STATIC)
     SET(WebCore_LIBRARY_TYPE STATIC)
 ENDIF ()
index 7a5929d..48e3630 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-02-28  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [CMake] Always build wtf as a static library.
+        https://bugs.webkit.org/show_bug.cgi?id=79857
+
+        Reviewed by Eric Seidel.
+
+        * CMakeLists.txt: Put static libraries in ${CMAKE_BINARY_DIR} too
+        to have them grouped with the shared ones.
+
 2012-02-28  Ryosuke Niwa  <rniwa@webkit.org>
 
         perf-o-matic: generate dashboard images using Google Chart Tools
index 24d50ac..2b919cc 100644 (file)
@@ -1,3 +1,20 @@
+2012-02-28  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [CMake] Always build wtf as a static library.
+        https://bugs.webkit.org/show_bug.cgi?id=79857
+
+        Reviewed by Eric Seidel.
+
+        To help the efforts in bug 75673 to move WTF out of
+        JavaScriptCore, act more like the other ports and remove the
+        possibility of building WTF as a shared library.
+
+        It does not make much sense to, for example, ship WTF as a
+        separate .so with webkit-efl packages, and it should be small
+        enough not to cause problems during linking.
+
+        * wtf/CMakeLists.txt:
+
 2012-02-28  Dmitry Lomov  <dslomov@google.com>
 
         [JSC] Implement ArrayBuffer transfer
index 63fc59c..7242012 100644 (file)
@@ -206,14 +206,9 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
 INCLUDE_DIRECTORIES(${WTF_INCLUDE_DIRECTORIES})
 ADD_DEFINITIONS(-DBUILDING_WTF)
-ADD_LIBRARY(${WTF_LIBRARY_NAME} ${WTF_LIBRARY_TYPE} ${WTF_HEADERS} ${WTF_SOURCES})
+ADD_LIBRARY(${WTF_LIBRARY_NAME} STATIC ${WTF_HEADERS} ${WTF_SOURCES})
 TARGET_LINK_LIBRARIES(${WTF_LIBRARY_NAME} ${WTF_LIBRARIES})
 
 IF (WTF_LINK_FLAGS)
     ADD_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} LINK_FLAGS "${WTF_LINK_FLAGS}")
 ENDIF ()
-
-IF (SHARED_CORE)
-    SET_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
-    INSTALL(TARGETS ${WTF_LIBRARY_NAME} DESTINATION lib)
-ENDIF ()