[CMake] Move the top-level logic to the top-level directory.
authorparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Nov 2011 09:08:11 +0000 (09:08 +0000)
committerparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Nov 2011 09:08:11 +0000 (09:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=72685

Patch by Raphael Kubo da Costa <kubo@profusion.mobi> on 2011-11-23
Reviewed by Brent Fulgham.

.:

Move most of the top-level code in Source/CMakeLists.txt to
CMakeLists.txt. This allows us to replace some INCLUDE() hacks with
proper ADD_SUBDIRECTORY() calls, and actually moves non-Source related
to a non-Source directory.

* CMakeLists.txt: Copied from Source/CMakeLists.txt.

Source/JavaScriptCore:

* CMakeLists.txt: Point to the right Source/ directory.
* wtf/CMakeLists.txt: Ditto.

Source/WebCore:

No new tests, this is a buildsystem changes.

* CMakeLists.txt: Adjust the Source/ directory.
* PlatformBlackBerry.cmake: Ditto.

Source/WebKit:

* blackberry/CMakeListsBlackBerry.txt: Adjust the Source/ directory.

Source/WebKit2:

* CMakeLists.txt: Adjust Source/ directory.

Tools:

* CMakeLists.txt: Added.
* DumpRenderTree/efl/CMakeLists.txt: Keep building into Programs/.
* EWebLauncher/CMakeLists.txt: Renamed from Tools/CMakeListsEfl.txt.
* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject):
* WinCELauncher/CMakeLists.txt: Renamed from Tools/CMakeListsWinCE.txt.

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

19 files changed:
CMakeLists.txt [new file with mode: 0644]
ChangeLog
Source/CMakeLists.txt
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/CMakeLists.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformBlackBerry.cmake
Source/WebKit/ChangeLog
Source/WebKit/blackberry/CMakeListsBlackBerry.txt
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Tools/CMakeLists.txt [new file with mode: 0644]
Tools/ChangeLog
Tools/DumpRenderTree/efl/CMakeLists.txt
Tools/EWebLauncher/CMakeLists.txt [moved from Tools/CMakeListsEfl.txt with 69% similarity]
Tools/Scripts/webkitdirs.pm
Tools/WinCELauncher/CMakeLists.txt [moved from Tools/CMakeListsWinCE.txt with 88% similarity]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..55051e2
--- /dev/null
@@ -0,0 +1,151 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+PROJECT(WebKit)
+
+# Set a default build type if and only if user did not define one as command
+# line options and he did not give custom CFLAGS or CXXFLAGS. Otherwise, flags
+# from default build type would overwrite user-defined ones.
+IF (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)
+    SET(CMAKE_BUILD_TYPE Release)
+ENDIF ()
+
+# -----------------------------------------------------------------------------
+# Default library type
+# -----------------------------------------------------------------------------
+IF (NOT ENABLE_WEBKIT AND NOT ENABLE_WEBKIT2)
+    SET(ENABLE_WEBKIT On)
+ENDIF ()
+
+SET(JAVASCRIPTCORE_DIR "${CMAKE_SOURCE_DIR}/Source/JavaScriptCore")
+SET(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/Source/WebCore")
+SET(WEBKIT_DIR "${CMAKE_SOURCE_DIR}/Source/WebKit")
+SET(WEBKIT2_DIR "${CMAKE_SOURCE_DIR}/Source/WebKit2")
+SET(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/Source/ThirdParty")
+
+SET(TOOLS_DIR "${CMAKE_SOURCE_DIR}/Tools")
+
+SET(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources")
+SET(DERIVED_SOURCES_JAVASCRIPTCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/JavaScriptCore")
+SET(DERIVED_SOURCES_WEBCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebCore")
+SET(DERIVED_SOURCES_WEBKIT2_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit2")
+
+SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Source/cmake")
+
+INCLUDE(WebKitMacros)
+INCLUDE(WebKitFS)
+INCLUDE(WebKitHelpers)
+INCLUDE(WebKitFeatures)
+
+# -----------------------------------------------------------------------------
+# Determine which port will be built
+# -----------------------------------------------------------------------------
+SET(ALL_PORTS Efl WinCE BlackBerry)
+SET(PORT "NOPORT" CACHE STRING "choose which WebKit port to build (one of ${ALL_PORTS})")
+
+LIST(FIND ALL_PORTS ${PORT} RET)
+IF (${RET} EQUAL -1)
+    MESSAGE(FATAL_ERROR "Please choose which WebKit port to build (one of ${ALL_PORTS})")
+ENDIF ()
+
+STRING(TOLOWER ${PORT} WEBKIT_PORT_DIR)
+
+# -----------------------------------------------------------------------------
+# Find common packages (used by all ports)
+# -----------------------------------------------------------------------------
+FIND_PACKAGE(BISON REQUIRED)
+FIND_PACKAGE(FLEX REQUIRED)
+FIND_PACKAGE(Gperf REQUIRED)
+FIND_PACKAGE(Perl REQUIRED)
+FIND_PACKAGE(PythonInterp REQUIRED)
+
+# -----------------------------------------------------------------------------
+# Determine the target processor
+# -----------------------------------------------------------------------------
+STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
+IF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
+    SET(WTF_CPU_ARM 1)
+ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
+    SET(WTF_CPU_MIPS 1)
+ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|amd64)")
+    SET(WTF_CPU_X86_64 1)
+ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
+    SET(WTF_CPU_X86 1)
+ELSE ()
+    MESSAGE(FATAL_ERROR "Unknown CPU '${CMAKE_SYSTEM_PROCESSOR}'")
+ENDIF ()
+
+# -----------------------------------------------------------------------------
+# Determine the operating system
+# -----------------------------------------------------------------------------
+IF (UNIX)
+    IF (APPLE)
+        SET(WTF_OS_MAC_OS_X 1)
+    ELSE ()
+        SET(WTF_OS_UNIX 1)
+    ENDIF ()
+ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
+    SET(WTF_OS_WINDOWS 1)
+ELSEIF (CMAKE_SYSTEM_NAME MATCHES "QNX")
+    SET(WTF_OS_QNX 1)
+    SET(WTF_OS_UNIX 1)
+ELSE ()
+    MESSAGE(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'")
+ENDIF ()
+
+# -----------------------------------------------------------------------------
+# Default target names (can be overrriden in Options${PORT}.cmake file)
+# -----------------------------------------------------------------------------
+SET(JSC_EXECUTABLE_NAME JSC)
+SET(WTF_LIBRARY_NAME WTF)
+SET(JavaScriptCore_LIBRARY_NAME JavaScriptCore)
+SET(WebCore_LIBRARY_NAME WebCore)
+SET(WebKit_LIBRARY_NAME WebKit)
+SET(WebKit2_LIBRARY_NAME WebKit2)
+
+# -----------------------------------------------------------------------------
+# Default library types
+# -----------------------------------------------------------------------------
+OPTION(SHARED_CORE "build WTF, 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 ()
+
+SET(WebKit_LIBRARY_TYPE SHARED)
+SET(WebKit2_LIBRARY_TYPE SHARED)
+
+# -----------------------------------------------------------------------------
+# Port-specific options
+# -----------------------------------------------------------------------------
+INCLUDE(OptionsCommon)
+INCLUDE(Options${PORT})
+
+# -----------------------------------------------------------------------------
+# Install JavaScript shell
+# -----------------------------------------------------------------------------
+OPTION(SHOULD_INSTALL_JS_SHELL "generate an installation rule to install the built JavaScript shell")
+
+# -----------------------------------------------------------------------------
+# Define packaging
+# -----------------------------------------------------------------------------
+INCLUDE(WebKitPackaging)
+
+# -----------------------------------------------------------------------------
+# Add module directories
+# -----------------------------------------------------------------------------
+ADD_SUBDIRECTORY(Source)
+
+# -----------------------------------------------------------------------------
+# Add tools
+# -----------------------------------------------------------------------------
+ADD_SUBDIRECTORY(Tools)
+
+# -----------------------------------------------------------------------------
+# Prints a summary of all enabled/disabled features
+# -----------------------------------------------------------------------------
+WEBKIT_PRINT_FEATURES()
index 0424b09..7df59d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-11-23  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [CMake] Move the top-level logic to the top-level directory.
+        https://bugs.webkit.org/show_bug.cgi?id=72685
+
+        Reviewed by Brent Fulgham.
+
+        Move most of the top-level code in Source/CMakeLists.txt to
+        CMakeLists.txt. This allows us to replace some INCLUDE() hacks with
+        proper ADD_SUBDIRECTORY() calls, and actually moves non-Source related
+        to a non-Source directory.
+
+        * CMakeLists.txt: Copied from Source/CMakeLists.txt.
+
 2011-11-22  Adam Klein  <adamk@chromium.org>
 
         Add new WebKit/chromium/dbus directory to .gitignore.
index cbc11cc..85a2fca 100644 (file)
@@ -1,134 +1,3 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-PROJECT(WebKit)
-
-# Set a default build type if and only if user did not define one as command
-# line options and he did not give custom CFLAGS or CXXFLAGS. Otherwise, flags
-# from default build type would overwrite user-defined ones.
-IF (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)
-    SET(CMAKE_BUILD_TYPE Release)
-ENDIF ()
-SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
-
-# -----------------------------------------------------------------------------
-# Default library type
-# -----------------------------------------------------------------------------
-IF (NOT ENABLE_WEBKIT AND NOT ENABLE_WEBKIT2)
-    SET(ENABLE_WEBKIT On)
-ENDIF ()
-
-SET(JAVASCRIPTCORE_DIR "${CMAKE_SOURCE_DIR}/JavaScriptCore")
-SET(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/WebCore")
-SET(WEBKIT_DIR "${CMAKE_SOURCE_DIR}/WebKit")
-SET(WEBKIT2_DIR "${CMAKE_SOURCE_DIR}/WebKit2")
-
-SET(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/ThirdParty")
-SET(TOOLS_DIR "${CMAKE_SOURCE_DIR}/../Tools")
-
-SET(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources")
-SET(DERIVED_SOURCES_JAVASCRIPTCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/JavaScriptCore")
-SET(DERIVED_SOURCES_WEBCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebCore")
-SET(DERIVED_SOURCES_WEBKIT2_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit2")
-
-INCLUDE(WebKitMacros)
-INCLUDE(WebKitFS)
-INCLUDE(WebKitHelpers)
-INCLUDE(WebKitFeatures)
-
-# -----------------------------------------------------------------------------
-# Determine which port will be built
-# -----------------------------------------------------------------------------
-SET(ALL_PORTS Efl WinCE BlackBerry)
-SET(PORT "NOPORT" CACHE STRING "choose which WebKit port to build (one of ${ALL_PORTS})")
-
-LIST(FIND ALL_PORTS ${PORT} RET)
-IF (${RET} EQUAL -1)
-    MESSAGE(FATAL_ERROR "Please choose which WebKit port to build (one of ${ALL_PORTS})")
-ENDIF ()
-
-STRING(TOLOWER ${PORT} WEBKIT_PORT_DIR)
-
-# -----------------------------------------------------------------------------
-# Find common packages (used by all ports)
-# -----------------------------------------------------------------------------
-FIND_PACKAGE(BISON REQUIRED)
-FIND_PACKAGE(FLEX REQUIRED)
-FIND_PACKAGE(Gperf REQUIRED)
-FIND_PACKAGE(Perl REQUIRED)
-FIND_PACKAGE(PythonInterp REQUIRED)
-
-# -----------------------------------------------------------------------------
-# Determine the target processor
-# -----------------------------------------------------------------------------
-STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
-IF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
-    SET(WTF_CPU_ARM 1)
-ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
-    SET(WTF_CPU_MIPS 1)
-ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|amd64)")
-    SET(WTF_CPU_X86_64 1)
-ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
-    SET(WTF_CPU_X86 1)
-ELSE ()
-    MESSAGE(FATAL_ERROR "Unknown CPU '${CMAKE_SYSTEM_PROCESSOR}'")
-ENDIF ()
-
-# -----------------------------------------------------------------------------
-# Determine the operating system
-# -----------------------------------------------------------------------------
-IF (UNIX)
-    IF (APPLE)
-        SET(WTF_OS_MAC_OS_X 1)
-    ELSE ()
-        SET(WTF_OS_UNIX 1)
-    ENDIF ()
-ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
-    SET(WTF_OS_WINDOWS 1)
-ELSEIF (CMAKE_SYSTEM_NAME MATCHES "QNX")
-    SET(WTF_OS_QNX 1)
-    SET(WTF_OS_UNIX 1)
-ELSE ()
-    MESSAGE(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'")
-ENDIF ()
-
-# -----------------------------------------------------------------------------
-# Default target names (can be overrriden in Options${PORT}.cmake file)
-# -----------------------------------------------------------------------------
-SET(JSC_EXECUTABLE_NAME JSC)
-SET(WTF_LIBRARY_NAME WTF)
-SET(JavaScriptCore_LIBRARY_NAME JavaScriptCore)
-SET(WebCore_LIBRARY_NAME WebCore)
-SET(WebKit_LIBRARY_NAME WebKit)
-SET(WebKit2_LIBRARY_NAME WebKit2)
-
-# -----------------------------------------------------------------------------
-# Default library types
-# -----------------------------------------------------------------------------
-OPTION(SHARED_CORE "build WTF, 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 ()
-
-SET(WebKit_LIBRARY_TYPE SHARED)
-SET(WebKit2_LIBRARY_TYPE SHARED)
-
-# -----------------------------------------------------------------------------
-# Port-specific options
-# -----------------------------------------------------------------------------
-INCLUDE(OptionsCommon)
-INCLUDE(Options${PORT})
-
-# -----------------------------------------------------------------------------
-# Define packaging
-# -----------------------------------------------------------------------------
-INCLUDE(WebKitPackaging)
-
 # -----------------------------------------------------------------------------
 # Add module directories
 # -----------------------------------------------------------------------------
@@ -144,16 +13,6 @@ IF (ENABLE_WEBKIT2)
 ENDIF ()
 
 # -----------------------------------------------------------------------------
-# Install JavaScript shell
-# -----------------------------------------------------------------------------
-OPTION(SHOULD_INSTALL_JS_SHELL "generate an installation rule to install the built JavaScript shell")
-
-# -----------------------------------------------------------------------------
-# Add test browser if exists
-# -----------------------------------------------------------------------------
-INCLUDE_IF_EXISTS(${TOOLS_DIR}/CMakeLists${PORT}.txt)
-
-# -----------------------------------------------------------------------------
 # Set compiler flags for all targets
 # -----------------------------------------------------------------------------
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME})
@@ -172,8 +31,3 @@ ENDIF ()
 # Create the configuration file
 # -----------------------------------------------------------------------------
 CONFIGURE_FILE(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)
-
-# -----------------------------------------------------------------------------
-# Prints a summary of all enabled/disabled features
-# -----------------------------------------------------------------------------
-WEBKIT_PRINT_FEATURES()
index 0106a64..5471994 100644 (file)
@@ -17,7 +17,7 @@ SET(JavaScriptCore_INCLUDE_DIRECTORIES
     "${JAVASCRIPTCORE_DIR}/yarr"
     "${JAVASCRIPTCORE_DIR}/wtf"
     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
-    "${CMAKE_SOURCE_DIR}"
+    "${CMAKE_SOURCE_DIR}/Source"
 )
 
 SET(JavaScriptCore_SOURCES
index b8d96db..2600cb9 100644 (file)
@@ -1,3 +1,13 @@
+2011-11-23  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [CMake] Move the top-level logic to the top-level directory.
+        https://bugs.webkit.org/show_bug.cgi?id=72685
+
+        Reviewed by Brent Fulgham.
+
+        * CMakeLists.txt: Point to the right Source/ directory.
+        * wtf/CMakeLists.txt: Ditto.
+
 2011-11-22  Yuqiang Xian  <yuqiang.xian@intel.com>
 
         Strength reduction for Mul and Mod operations for known constants in DFG
index ae73780..08b4da5 100644 (file)
@@ -205,7 +205,7 @@ INCLUDE_IF_EXISTS(${JAVASCRIPTCORE_DIR}/wtf/Platform${PORT}.cmake)
 
 LIST(APPEND WTF_INCLUDE_DIRECTORIES
     "${CMAKE_BINARY_DIR}"
-    "${CMAKE_SOURCE_DIR}/ThirdParty"
+    "${CMAKE_SOURCE_DIR}/Source/ThirdParty"
 )
 
 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
index 652742c..3097ed3 100644 (file)
@@ -81,7 +81,7 @@ SET(WebCore_INCLUDE_DIRECTORIES
     "${JAVASCRIPTCORE_DIR}/wtf/unicode"
     "${JAVASCRIPTCORE_DIR}/yarr"
     "${DERIVED_SOURCES_WEBCORE_DIR}"
-    "${CMAKE_SOURCE_DIR}"
+    "${CMAKE_SOURCE_DIR}/Source"
     "${CMAKE_BINARY_DIR}"
 )
 
index 32b9bfd..e39ca60 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-23  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [CMake] Move the top-level logic to the top-level directory.
+        https://bugs.webkit.org/show_bug.cgi?id=72685
+
+        Reviewed by Brent Fulgham.
+
+        No new tests, this is a buildsystem changes.
+
+        * CMakeLists.txt: Adjust the Source/ directory.
+        * PlatformBlackBerry.cmake: Ditto.
+
 2011-11-23  Mihnea Ovidenie  <mihnea@adobe.com>
 
         CSS Exclusions: update the name of the shape CSS properties
index c04339a..9a33eef 100644 (file)
@@ -262,7 +262,7 @@ IF (WTF_USE_ACCELERATED_COMPOSITING)
     )
 ENDIF ()
 
-SET(ENV{WEBKITDIR} ${CMAKE_SOURCE_DIR})
+SET(ENV{WEBKITDIR} ${CMAKE_SOURCE_DIR}/Source)
 SET(ENV{PLATFORMNAME} ${CMAKE_SYSTEM_NAME})
 EXECUTE_PROCESS(
     COMMAND hostname
index 1ecb4f9..ee5a37e 100644 (file)
@@ -1,3 +1,12 @@
+2011-11-23  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [CMake] Move the top-level logic to the top-level directory.
+        https://bugs.webkit.org/show_bug.cgi?id=72685
+
+        Reviewed by Brent Fulgham.
+
+        * blackberry/CMakeListsBlackBerry.txt: Adjust the Source/ directory.
+
 2011-11-20  Mark Rowe  <mrowe@apple.com>
 
         <http://webkit.org/b/72661> Switch to a more modern approach to retrieving the startup volume name
index d8ea0f3..f07466c 100644 (file)
@@ -20,7 +20,7 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/blackberry/Api"
     "${WEBKIT_DIR}/blackberry/WebCoreSupport"
     "${WEBKIT_DIR}/blackberry/WebKitSupport"
-    "${CMAKE_SOURCE_DIR}" # For JavaScriptCore API headers
+    "${CMAKE_SOURCE_DIR}/Source" # For JavaScriptCore API headers
 )
 IF (ENABLE_DRT)
     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
index 54b4d83..9a04af2 100644 (file)
@@ -89,7 +89,7 @@ SET(WebKit2_INCLUDE_DIRECTORIES
     "${DERIVED_SOURCES_WEBKIT2_DIR}"
     "${DERIVED_SOURCES_WEBKIT2_DIR}/include"
     "${CMAKE_BINARY_DIR}"
-    "${CMAKE_SOURCE_DIR}"
+    "${CMAKE_SOURCE_DIR}/Source"
 )
 
 SET(WebKit2_SOURCES
index ef79e4d..8ffcb22 100644 (file)
@@ -1,3 +1,12 @@
+2011-11-23  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [CMake] Move the top-level logic to the top-level directory.
+        https://bugs.webkit.org/show_bug.cgi?id=72685
+
+        Reviewed by Brent Fulgham.
+
+        * CMakeLists.txt: Adjust Source/ directory.
+
 2011-11-22  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
 
         Unreviewed : remove empty folders related to TouchWebView and DesktopWebView
diff --git a/Tools/CMakeLists.txt b/Tools/CMakeLists.txt
new file mode 100644 (file)
index 0000000..dccf023
--- /dev/null
@@ -0,0 +1,6 @@
+IF ("${PORT}" STREQUAL "Efl")
+    ADD_SUBDIRECTORY(DumpRenderTree/efl)
+    ADD_SUBDIRECTORY(EWebLauncher)
+ELSEIF ("${PORT}" STREQUAL "WinCE")
+    ADD_SUBDIRECTORY(WinCELauncher)
+ENDIF()
index f7efabf..75f4eff 100644 (file)
@@ -1,3 +1,17 @@
+2011-11-23  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [CMake] Move the top-level logic to the top-level directory.
+        https://bugs.webkit.org/show_bug.cgi?id=72685
+
+        Reviewed by Brent Fulgham.
+
+        * CMakeLists.txt: Added.
+        * DumpRenderTree/efl/CMakeLists.txt: Keep building into Programs/.
+        * EWebLauncher/CMakeLists.txt: Renamed from Tools/CMakeListsEfl.txt.
+        * Scripts/webkitdirs.pm:
+        (generateBuildSystemFromCMakeProject):
+        * WinCELauncher/CMakeLists.txt: Renamed from Tools/CMakeListsWinCE.txt.
+
 2011-11-17  Vincent Scheib  <scheib@chromium.org>
 
         Pointer Lock: Initial Tests for navigator.webkitPonter
index 5daa0fa..857126b 100644 (file)
@@ -76,7 +76,7 @@ SET(DumpRenderTree_INCLUDE_DIRECTORIES
     ${TOOLS_DIR}/DumpRenderTree
     ${TOOLS_DIR}/DumpRenderTree/cairo
     ${TOOLS_DIR}/DumpRenderTree/efl
-    ${CMAKE_SOURCE_DIR}
+    ${CMAKE_SOURCE_DIR}/Source
     ${CMAKE_BINARY_DIR}
     ${DERIVED_SOURCES_WEBCORE_DIR}
     ${WEBCORE_DIR}/bindings/js
@@ -115,14 +115,17 @@ IF (WTF_USE_CURL)
     LIST(APPEND DumpRenderTree_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/platform/network/curl)
 ENDIF ()
 
-ADD_DEFINITIONS(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts")
+ADD_DEFINITIONS(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
+                -DDATA_DIR="${THEME_BINARY_DIR}")
 
 INCLUDE_DIRECTORIES(${DumpRenderTree_INCLUDE_DIRECTORIES})
 
 ADD_EXECUTABLE(Programs/DumpRenderTree ${DumpRenderTree_SOURCES})
 TARGET_LINK_LIBRARIES(Programs/DumpRenderTree ${DumpRenderTree_LIBRARIES})
 ADD_TARGET_PROPERTIES(Programs/DumpRenderTree LINK_FLAGS "${DumpRenderTree_LINK_FLAGS}")
+SET_TARGET_PROPERTIES(Programs/DumpRenderTree PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
 
 ADD_EXECUTABLE(Programs/ImageDiff ${ImageDiff_SOURCES})
 TARGET_LINK_LIBRARIES(Programs/ImageDiff ${DumpRenderTree_LIBRARIES})
 ADD_TARGET_PROPERTIES(Programs/ImageDiff LINK_FLAGS "${DumpRenderTree_LINK_FLAGS}")
+SET_TARGET_PROPERTIES(Programs/ImageDiff PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
similarity index 69%
rename from Tools/CMakeListsEfl.txt
rename to Tools/EWebLauncher/CMakeLists.txt
index d1c43c3..69ac7bf 100644 (file)
@@ -32,21 +32,21 @@ SET(EWebLauncher_LINK_FLAGS
 )
 
 IF (ENABLE_GLIB_SUPPORT)
-  LIST(APPEND EWebLauncher_LIBRARIES
-    ${Gdk_LIBRARIES}
-    ${Glib_LIBRARIES}
-    ${Gthread_LIBRARIES}
-  )
+    LIST(APPEND EWebLauncher_LIBRARIES
+        ${Gdk_LIBRARIES}
+        ${Glib_LIBRARIES}
+        ${Gthread_LIBRARIES}
+    )
 ENDIF ()
 
 IF (WTF_USE_SOUP)
-  LIST(APPEND EWebLauncher_LIBRARIES ${LIBSOUP24_LIBRARIES})
-  LIST(APPEND EWebLauncher_LINK_FLAGS ${LIBSOUP24_LDFLAGS})
+    LIST(APPEND EWebLauncher_LIBRARIES ${LIBSOUP24_LIBRARIES})
+    LIST(APPEND EWebLauncher_LINK_FLAGS ${LIBSOUP24_LDFLAGS})
 ENDIF ()
 
 IF (WTF_USE_CURL)
-  LIST(APPEND EWebLauncher_LIBRARIES ${CURL_LIBRARIES})
-  LIST(APPEND EWebLauncher_LINK_FLAGS ${CURL_LDFLAGS})
+    LIST(APPEND EWebLauncher_LIBRARIES ${CURL_LIBRARIES})
+    LIST(APPEND EWebLauncher_LINK_FLAGS ${CURL_LDFLAGS})
 ENDIF ()
 
 ADD_DEFINITIONS(-DDATA_DIR=\"${THEME_BINARY_DIR}\")
@@ -55,5 +55,4 @@ INCLUDE_DIRECTORIES(${EWebLauncher_INCLUDE_DIRECTORIES})
 ADD_EXECUTABLE(Programs/EWebLauncher ${EWebLauncher_SOURCES})
 TARGET_LINK_LIBRARIES(Programs/EWebLauncher ${EWebLauncher_LIBRARIES})
 ADD_TARGET_PROPERTIES(Programs/EWebLauncher LINK_FLAGS "${EWebLauncher_LINK_FLAGS}")
-
-INCLUDE(${TOOLS_DIR}/DumpRenderTree/efl/CMakeLists.txt)
+SET_TARGET_PROPERTIES(Programs/EWebLauncher PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
index 8a53247..0ca488b 100755 (executable)
@@ -1702,7 +1702,7 @@ sub generateBuildSystemFromCMakeProject
     push @args, @cmakeArgs if @cmakeArgs;
     push @args, $additionalCMakeArgs if $additionalCMakeArgs;
 
-    push @args, '"' . File::Spec->catdir(sourceDir(), "Source") . '"';
+    push @args, '"' . sourceDir() . '"';
 
     # We call system("cmake @args") instead of system("cmake", @args) so that @args is
     # parsed for shell metacharacters.
similarity index 88%
rename from Tools/CMakeListsWinCE.txt
rename to Tools/WinCELauncher/CMakeLists.txt
index 7945daf..5a64588 100644 (file)
@@ -23,3 +23,4 @@ INCLUDE_DIRECTORIES(${WinCELauncher_INCLUDE_DIRECTORIES})
 ADD_EXECUTABLE(WinCELauncher ${WinCELauncher_SOURCES})
 ADD_DEPENDENCIES(WinCELauncher ${WebKit_LIBRARY_NAME})
 TARGET_LINK_LIBRARIES(WinCELauncher ${WinCELauncher_LIBRARIES})
+SET_TARGET_PROPERTIES(WinCELauncher PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")