Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Commit

Permalink
[CMake] Always build wtf as a static library.
Browse files Browse the repository at this point in the history
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: http://svn.webkit.org/repository/webkit/trunk@109197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
kubo@profusion.mobi committed Feb 29, 2012
1 parent e2c8d4b commit 33abb97
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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 ()
Expand Down
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 17 additions & 0 deletions Source/JavaScriptCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 1 addition & 6 deletions Source/JavaScriptCore/wtf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

0 comments on commit 33abb97

Please sign in to comment.