[CMake] Unify coding style for CMake files
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2012 03:10:13 +0000 (03:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2012 03:10:13 +0000 (03:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=103605

Patch by Halton Huo <halton.huo@intel.com> on 2012-12-05
Reviewed by Laszlo Gombos.

Update cmake files(.cmake, CMakeLists.txt) with following style rules:
1. Indentation
1.1 Use spaces, not tabs.
1.2 Four spaces as indent.
2. Spacing
2.1 Place one space between control statements and their parentheses.
    For eg, if (), else (), elseif (), endif (), foreach (),
    endforeach (), while (), endwhile (), break ().
2.2 Do not place spaces between function and macro statements and
    their parentheses. For eg, macro(), endmacro(), function(),
    endfunction().
2.3 Do not place spaces between a command or function or macro and its
    parentheses, or between a parenthesis and its content. For eg,
    message("testing") not message( "testing") or message ("testing" )
2.4 No space at line ending.
3. Lowercase when call commands macros and functions. For eg,
   add_executable() not ADD_EXECUTABLE(), set() not SET().

.:

* CMakeLists.txt:
* Source/CMakeLists.txt:
* Source/PlatformEfl.cmake:
* Source/cmake/EFLHelpers.cmake:
* Source/cmake/FindATK.cmake:
* Source/cmake/FindCFLite.cmake:
* Source/cmake/FindCairo.cmake:
* Source/cmake/FindDBus.cmake:
* Source/cmake/FindDirectX.cmake:
* Source/cmake/FindE_DBus.cmake:
* Source/cmake/FindEcore.cmake:
* Source/cmake/FindEdje.cmake:
* Source/cmake/FindEet.cmake:
* Source/cmake/FindEeze.cmake:
* Source/cmake/FindEfreet.cmake:
* Source/cmake/FindEina.cmake:
* Source/cmake/FindElementary.cmake:
* Source/cmake/FindEnchant.cmake:
* Source/cmake/FindEvas.cmake:
* Source/cmake/FindFontconfig.cmake:
* Source/cmake/FindGLIB.cmake:
* Source/cmake/FindGStreamer.cmake:
* Source/cmake/FindGperf.cmake:
* Source/cmake/FindHarfBuzz.cmake:
* Source/cmake/FindICU.cmake:
* Source/cmake/FindLibSoup.cmake:
* Source/cmake/FindQuickTimeSDK.cmake:
* Source/cmake/FindSqlite.cmake:
* Source/cmake/OptionsBlackBerry.cmake:
* Source/cmake/OptionsCommon.cmake:
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsWinCE.cmake:
* Source/cmake/OptionsWindows.cmake:
* Source/cmake/WebKitFS.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/WebKitHelpers.cmake:
* Source/cmake/WebKitMacros.cmake:
* Source/cmake/WebKitPackaging.cmake:
* Source/cmake/gtest/CMakeLists.txt:

Source/JavaScriptCore:

* CMakeLists.txt:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
* shell/CMakeLists.txt:
* shell/PlatformBlackBerry.cmake:
* shell/PlatformEfl.cmake:
* shell/PlatformWinCE.cmake:

Source/WebCore:

* CMakeLists.txt:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
* UseJSC.cmake:
* UseV8.cmake:

Source/WebKit:

* CMakeLists.txt:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:

Source/WebKit/efl:

* DefaultTheme/CMakeLists.txt:

Source/WebKit2:

* CMakeLists.txt:
* PlatformEfl.cmake:
* win/WebKit2ExportGenerator.vcproj:
* win/WebKit2ExportGeneratorCommon.vsprops:

Source/WTF:

* CMakeLists.txt:
* wtf/CMakeLists.txt:
* wtf/PlatformBlackBerry.cmake:
* wtf/PlatformEfl.cmake:
* wtf/PlatformWinCE.cmake:

Tools:

* CMakeLists.txt:
* DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
* DumpRenderTree/efl/CMakeLists.txt:
* EWebLauncher/CMakeLists.txt:
* EWebLauncher/ControlTheme/CMakeLists.txt:
* MiniBrowser/efl/CMakeLists.txt:
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/PlatformEfl.cmake:
* WebKitTestRunner/CMakeLists.txt:
* WebKitTestRunner/PlatformEfl.cmake:
* WinCELauncher/CMakeLists.txt:
* clang/ReportMemoryUsagePlugin/CMakeLists.txt:

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

85 files changed:
CMakeLists.txt
ChangeLog
Source/CMakeLists.txt
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformBlackBerry.cmake
Source/JavaScriptCore/PlatformEfl.cmake
Source/JavaScriptCore/PlatformWinCE.cmake
Source/JavaScriptCore/shell/CMakeLists.txt
Source/JavaScriptCore/shell/PlatformBlackBerry.cmake
Source/JavaScriptCore/shell/PlatformEfl.cmake
Source/JavaScriptCore/shell/PlatformWinCE.cmake
Source/PlatformEfl.cmake
Source/WTF/CMakeLists.txt
Source/WTF/ChangeLog
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/PlatformBlackBerry.cmake
Source/WTF/wtf/PlatformEfl.cmake
Source/WTF/wtf/PlatformWinCE.cmake
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformBlackBerry.cmake
Source/WebCore/PlatformEfl.cmake
Source/WebCore/PlatformWinCE.cmake
Source/WebCore/UseJSC.cmake
Source/WebCore/UseV8.cmake
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/PlatformBlackBerry.cmake
Source/WebKit/PlatformEfl.cmake
Source/WebKit/PlatformWinCE.cmake
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/DefaultTheme/CMakeLists.txt
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformEfl.cmake
Source/cmake/EFLHelpers.cmake
Source/cmake/FindATK.cmake
Source/cmake/FindCFLite.cmake
Source/cmake/FindCairo.cmake
Source/cmake/FindDBus.cmake
Source/cmake/FindDirectX.cmake
Source/cmake/FindE_DBus.cmake
Source/cmake/FindEcore.cmake
Source/cmake/FindEdje.cmake
Source/cmake/FindEet.cmake
Source/cmake/FindEeze.cmake
Source/cmake/FindEfreet.cmake
Source/cmake/FindEina.cmake
Source/cmake/FindElementary.cmake
Source/cmake/FindEnchant.cmake
Source/cmake/FindEvas.cmake
Source/cmake/FindFontconfig.cmake
Source/cmake/FindGLIB.cmake
Source/cmake/FindGStreamer.cmake
Source/cmake/FindGperf.cmake
Source/cmake/FindHarfBuzz.cmake
Source/cmake/FindICU.cmake
Source/cmake/FindLibSoup.cmake
Source/cmake/FindQuickTimeSDK.cmake
Source/cmake/FindSqlite.cmake
Source/cmake/OptionsBlackBerry.cmake
Source/cmake/OptionsCommon.cmake
Source/cmake/OptionsEfl.cmake
Source/cmake/OptionsWinCE.cmake
Source/cmake/OptionsWindows.cmake
Source/cmake/WebKitFS.cmake
Source/cmake/WebKitFeatures.cmake
Source/cmake/WebKitHelpers.cmake
Source/cmake/WebKitMacros.cmake
Source/cmake/WebKitPackaging.cmake
Source/cmake/gtest/CMakeLists.txt
Tools/CMakeLists.txt
Tools/ChangeLog
Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
Tools/DumpRenderTree/efl/CMakeLists.txt
Tools/EWebLauncher/CMakeLists.txt
Tools/EWebLauncher/ControlTheme/CMakeLists.txt
Tools/MiniBrowser/efl/CMakeLists.txt
Tools/TestWebKitAPI/CMakeLists.txt
Tools/TestWebKitAPI/PlatformEfl.cmake
Tools/WebKitTestRunner/CMakeLists.txt
Tools/WebKitTestRunner/PlatformEfl.cmake
Tools/WinCELauncher/CMakeLists.txt
Tools/clang/ReportMemoryUsagePlugin/CMakeLists.txt

index 00e3da7..a16aaa1 100644 (file)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
-PROJECT(WebKit)
+cmake_minimum_required(VERSION 2.8.3)
+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 ()
+if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)
+    set(CMAKE_BUILD_TYPE Release)
+endif ()
 
 # -----------------------------------------------------------------------------
 # Default library type
 # -----------------------------------------------------------------------------
-SET(WTF_DIR "${CMAKE_SOURCE_DIR}/Source/WTF")
-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(WTF_DIR "${CMAKE_SOURCE_DIR}/Source/WTF")
+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(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_WEBKIT_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit")
-SET(DERIVED_SOURCES_WEBKIT2_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit2")
+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_WEBKIT_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit")
+set(DERIVED_SOURCES_WEBKIT2_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit2")
 
-SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Source/cmake")
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Source/cmake")
 
-SET(ENABLE_WEBCORE ON)
+set(ENABLE_WEBCORE ON)
 
-IF (NOT DEFINED ENABLE_WEBKIT)
-    SET(ENABLE_WEBKIT ON)
-ENDIF ()
+if (NOT DEFINED ENABLE_WEBKIT)
+    set(ENABLE_WEBKIT ON)
+endif ()
 
-IF (NOT DEFINED ENABLE_TOOLS AND EXISTS ${TOOLS_DIR})
-    SET(ENABLE_TOOLS ON)
-ENDIF()
+if (NOT DEFINED ENABLE_TOOLS AND EXISTS ${TOOLS_DIR})
+    set(ENABLE_TOOLS ON)
+endif ()
 
-INCLUDE(WebKitMacros)
-INCLUDE(WebKitFS)
-INCLUDE(WebKitHelpers)
-INCLUDE(WebKitFeatures)
+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})")
+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 ()
+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)
+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)
-FIND_PACKAGE(Ruby)
+find_package(BISON REQUIRED)
+find_package(FLEX REQUIRED)
+find_package(Gperf REQUIRED)
+find_package(Perl REQUIRED)
+find_package(PythonInterp REQUIRED)
+find_package(Ruby)
 
 # -----------------------------------------------------------------------------
 # 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 ()
+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 ()
+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)
-SET(WebCoreTestSupport_LIBRARY_NAME WebCoreTestSupport)
+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)
+set(WebCoreTestSupport_LIBRARY_NAME WebCoreTestSupport)
 
 # -----------------------------------------------------------------------------
 # Default library types
 # -----------------------------------------------------------------------------
-OPTION(SHARED_CORE "build JavaScriptCore and WebCore as shared libraries")
+option(SHARED_CORE "build JavaScriptCore and WebCore as shared libraries")
 
-IF (SHARED_CORE)
-    SET(JavaScriptCore_LIBRARY_TYPE SHARED)
-    SET(WebCore_LIBRARY_TYPE SHARED)
-ELSE ()
-    SET(JavaScriptCore_LIBRARY_TYPE STATIC)
-    SET(WebCore_LIBRARY_TYPE STATIC)
-ENDIF ()
+if (SHARED_CORE)
+    set(JavaScriptCore_LIBRARY_TYPE SHARED)
+    set(WebCore_LIBRARY_TYPE SHARED)
+else ()
+    set(JavaScriptCore_LIBRARY_TYPE STATIC)
+    set(WebCore_LIBRARY_TYPE STATIC)
+endif ()
 
-SET(WebKit_LIBRARY_TYPE SHARED)
-SET(WebKit2_LIBRARY_TYPE SHARED)
-SET(WebCoreTestSupport_LIBRARY_TYPE STATIC)
+set(WebKit_LIBRARY_TYPE SHARED)
+set(WebKit2_LIBRARY_TYPE SHARED)
+set(WebCoreTestSupport_LIBRARY_TYPE STATIC)
 
 # -----------------------------------------------------------------------------
 # Common options
 #------------------------------------------------------------------------------
-INCLUDE(OptionsCommon)
-SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${EXEC_INSTALL_DIR})
+include(OptionsCommon)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${EXEC_INSTALL_DIR})
 
 # -----------------------------------------------------------------------------
 # Port-specific options
 # -----------------------------------------------------------------------------
-INCLUDE(Options${PORT})
+include(Options${PORT})
 
 # -----------------------------------------------------------------------------
 # Enable API unit tests and create a target for the test runner
 # -----------------------------------------------------------------------------
-IF (ENABLE_API_TESTS)
-    ENABLE_TESTING()
-ENDIF ()
+if (ENABLE_API_TESTS)
+    enable_testing()
+endif ()
 
 # -----------------------------------------------------------------------------
 # Install JavaScript shell
 # -----------------------------------------------------------------------------
-OPTION(SHOULD_INSTALL_JS_SHELL "generate an installation rule to install the built JavaScript shell")
+option(SHOULD_INSTALL_JS_SHELL "generate an installation rule to install the built JavaScript shell")
 
 # -----------------------------------------------------------------------------
 # Define packaging
 # -----------------------------------------------------------------------------
-INCLUDE(WebKitPackaging)
+include(WebKitPackaging)
 
 # -----------------------------------------------------------------------------
 # Add module directories
 # -----------------------------------------------------------------------------
-ADD_SUBDIRECTORY(Source)
+add_subdirectory(Source)
 
 # -----------------------------------------------------------------------------
 # Add tools
 # -----------------------------------------------------------------------------
-IF (ENABLE_TOOLS)
-    ADD_SUBDIRECTORY(Tools)
-ENDIF ()
-
+if (ENABLE_TOOLS)
+    add_subdirectory(Tools)
+endif ()
index 26f8d12..b7e9242 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,68 @@
+2012-12-05  Halton Huo  <halton.huo@intel.com>
+
+        [CMake] Unify coding style for CMake files
+        https://bugs.webkit.org/show_bug.cgi?id=103605
+
+        Reviewed by Laszlo Gombos.
+
+        Update cmake files(.cmake, CMakeLists.txt) with following style rules:
+        1. Indentation
+        1.1 Use spaces, not tabs.
+        1.2 Four spaces as indent.
+        2. Spacing
+        2.1 Place one space between control statements and their parentheses.
+            For eg, if (), else (), elseif (), endif (), foreach (),
+            endforeach (), while (), endwhile (), break ().
+        2.2 Do not place spaces between function and macro statements and
+            their parentheses. For eg, macro(), endmacro(), function(),
+            endfunction().
+        2.3 Do not place spaces between a command or function or macro and its
+            parentheses, or between a parenthesis and its content. For eg,
+            message("testing") not message( "testing") or message ("testing" )
+        2.4 No space at line ending.
+        3. Lowercase when call commands macros and functions. For eg,
+           add_executable() not ADD_EXECUTABLE(), set() not SET().
+
+        * CMakeLists.txt:
+        * Source/CMakeLists.txt:
+        * Source/PlatformEfl.cmake:
+        * Source/cmake/EFLHelpers.cmake:
+        * Source/cmake/FindATK.cmake:
+        * Source/cmake/FindCFLite.cmake:
+        * Source/cmake/FindCairo.cmake:
+        * Source/cmake/FindDBus.cmake:
+        * Source/cmake/FindDirectX.cmake:
+        * Source/cmake/FindE_DBus.cmake:
+        * Source/cmake/FindEcore.cmake:
+        * Source/cmake/FindEdje.cmake:
+        * Source/cmake/FindEet.cmake:
+        * Source/cmake/FindEeze.cmake:
+        * Source/cmake/FindEfreet.cmake:
+        * Source/cmake/FindEina.cmake:
+        * Source/cmake/FindElementary.cmake:
+        * Source/cmake/FindEnchant.cmake:
+        * Source/cmake/FindEvas.cmake:
+        * Source/cmake/FindFontconfig.cmake:
+        * Source/cmake/FindGLIB.cmake:
+        * Source/cmake/FindGStreamer.cmake:
+        * Source/cmake/FindGperf.cmake:
+        * Source/cmake/FindHarfBuzz.cmake:
+        * Source/cmake/FindICU.cmake:
+        * Source/cmake/FindLibSoup.cmake:
+        * Source/cmake/FindQuickTimeSDK.cmake:
+        * Source/cmake/FindSqlite.cmake:
+        * Source/cmake/OptionsBlackBerry.cmake:
+        * Source/cmake/OptionsCommon.cmake:
+        * Source/cmake/OptionsEfl.cmake:
+        * Source/cmake/OptionsWinCE.cmake:
+        * Source/cmake/OptionsWindows.cmake:
+        * Source/cmake/WebKitFS.cmake:
+        * Source/cmake/WebKitFeatures.cmake:
+        * Source/cmake/WebKitHelpers.cmake:
+        * Source/cmake/WebKitMacros.cmake:
+        * Source/cmake/WebKitPackaging.cmake:
+        * Source/cmake/gtest/CMakeLists.txt:
+
 2012-12-05  Yong Li  <yoli@rim.com>
 
         [BlackBerry] Build with libjpegturbo
index 80047c1..a38a9a2 100644 (file)
@@ -1,52 +1,52 @@
 # -----------------------------------------------------------------------------
 # Add module directories
 # -----------------------------------------------------------------------------
-ADD_SUBDIRECTORY(WTF)
+add_subdirectory(WTF)
 
-ADD_SUBDIRECTORY(JavaScriptCore)
+add_subdirectory(JavaScriptCore)
 
-IF (ENABLE_API_TESTS)
-    ADD_SUBDIRECTORY(cmake/gtest)
-ENDIF ()
+if (ENABLE_API_TESTS)
+    add_subdirectory(cmake/gtest)
+endif ()
 
-IF (ENABLE_WEBCORE)
-    ADD_SUBDIRECTORY(WebCore)
-ENDIF ()
+if (ENABLE_WEBCORE)
+    add_subdirectory(WebCore)
+endif ()
 
-IF (ENABLE_WEBKIT)
-    ADD_SUBDIRECTORY(WebKit)
-ENDIF ()
+if (ENABLE_WEBKIT)
+    add_subdirectory(WebKit)
+endif ()
 
-IF (ENABLE_WEBKIT2)
-    ADD_SUBDIRECTORY(WebKit2)
-ENDIF ()
+if (ENABLE_WEBKIT2)
+    add_subdirectory(WebKit2)
+endif ()
 
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 # -----------------------------------------------------------------------------
 # Set compiler flags for all targets
 # -----------------------------------------------------------------------------
-IF (${PORT} STREQUAL "Efl")
-    SET(ADDITIONAL_FLAGS ENABLE_WERROR)
-ENDIF ()
+if (${PORT} STREQUAL "Efl")
+    set(ADDITIONAL_FLAGS ENABLE_WERROR)
+endif ()
 
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(${JavaScriptCore_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCoreTestSupport_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
 
-IF (ENABLE_WEBCORE)
+if (ENABLE_WEBCORE)
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
-ENDIF ()
+endif ()
 
-IF (ENABLE_WEBKIT)
+if (ENABLE_WEBKIT)
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
-ENDIF ()
+endif ()
 
-IF (ENABLE_WEBKIT2)
+if (ENABLE_WEBKIT2)
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit2_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
-ENDIF ()
+endif ()
 
 # -----------------------------------------------------------------------------
 # Create the configuration file
 # -----------------------------------------------------------------------------
-CONFIGURE_FILE(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)
+configure_file(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)
index ceb0148..79edf6d 100644 (file)
@@ -1,4 +1,4 @@
-SET(JavaScriptCore_INCLUDE_DIRECTORIES
+set(JavaScriptCore_INCLUDE_DIRECTORIES
     "${CMAKE_BINARY_DIR}"
     "${JAVASCRIPTCORE_DIR}"
     "${JAVASCRIPTCORE_DIR}/API"
@@ -23,7 +23,7 @@ SET(JavaScriptCore_INCLUDE_DIRECTORIES
     "${CMAKE_SOURCE_DIR}/Source"
 )
 
-SET(JavaScriptCore_SOURCES
+set(JavaScriptCore_SOURCES
     API/JSBase.cpp
     API/JSCallbackConstructor.cpp
     API/JSCallbackFunction.cpp
@@ -36,7 +36,7 @@ SET(JavaScriptCore_SOURCES
     API/JSValueRef.cpp
     API/JSWeakObjectMapRefPrivate.cpp
     API/OpaqueJSString.cpp
-    
+
     assembler/MacroAssembler.cpp
     assembler/LinkBuffer.cpp
 
@@ -108,7 +108,7 @@ SET(JavaScriptCore_SOURCES
     dfg/DFGVariableEventStream.cpp
     dfg/DFGValidate.cpp
     dfg/DFGVirtualRegisterAllocationPhase.cpp
-    
+
     disassembler/Disassembler.cpp
 
     heap/BlockAllocator.cpp
@@ -138,7 +138,7 @@ SET(JavaScriptCore_SOURCES
     debugger/Debugger.cpp
     debugger/DebuggerActivation.cpp
     debugger/DebuggerCallFrame.cpp
-    
+
     interpreter/AbstractPC.cpp
     interpreter/CallFrame.cpp
     interpreter/Interpreter.cpp
@@ -301,7 +301,7 @@ SET(JavaScriptCore_SOURCES
     yarr/YarrSyntaxChecker.cpp
 )
 
-SET(JavaScriptCore_LUT_FILES
+set(JavaScriptCore_LUT_FILES
     runtime/ArrayConstructor.cpp
     runtime/ArrayPrototype.cpp
     runtime/BooleanPrototype.cpp
@@ -323,25 +323,25 @@ SET(JavaScriptCore_LUT_FILES
     runtime/StringPrototype.cpp
 )
 
-SET(JavaScriptCore_LIBRARIES
+set(JavaScriptCore_LIBRARIES
     ${WTF_LIBRARY_NAME}
 )
 
-IF (ENABLE_LLINT)
+if (ENABLE_LLINT)
     # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
     # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
     # for finding the only Ruby interpreter.
-    IF (NOT RUBY_EXECUTABLE)
-        MESSAGE(FATAL_ERROR "The Ruby interpreter is needed to generate LLInt files.")
-    ENDIF ()
+    if (NOT RUBY_EXECUTABLE)
+        message(FATAL_ERROR "The Ruby interpreter is needed to generate LLInt files.")
+    endif ()
 
-    SET(LLINT_ASM
+    set(LLINT_ASM
         llint/LowLevelInterpreter.asm
         llint/LowLevelInterpreter32_64.asm
         llint/LowLevelInterpreter64.asm
     )
 
-    SET(OFFLINE_ASM
+    set(OFFLINE_ASM
         offlineasm/armv7.rb
         offlineasm/ast.rb
         offlineasm/backends.rb
@@ -359,7 +359,7 @@ IF (ENABLE_LLINT)
         offlineasm/x86.rb
     )
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
         MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
         DEPENDS ${LLINT_ASM} ${OFFLINE_ASM}
@@ -375,11 +375,11 @@ IF (ENABLE_LLINT)
     # Additionally, setting the OBJECT_DEPENDS property will make LLIntDesiredOffsets.h a Makefile
     # dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will
     # actually be run twice!
-    ADD_EXECUTABLE(LLIntOffsetsExtractor
+    add_executable(LLIntOffsetsExtractor
         ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
     )
-    TARGET_LINK_LIBRARIES(LLIntOffsetsExtractor ${WTF_LIBRARY_NAME})
+    target_link_libraries(LLIntOffsetsExtractor ${WTF_LIBRARY_NAME})
 
     # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
     # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
@@ -387,7 +387,7 @@ IF (ENABLE_LLINT)
     # LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
     # running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
     # after every asm.rb run.
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
         MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
         DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM}
@@ -398,11 +398,11 @@ IF (ENABLE_LLINT)
     # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of
     # the .cpp files below is similar to the one in the previous comment. However, since these .cpp
     # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
-    # since it is used in the ADD_LIBRARY() call at the end of this file.
-    LIST(APPEND JavaScriptCore_HEADERS
+    # since it is used in the add_library() call at the end of this file.
+    list(APPEND JavaScriptCore_HEADERS
         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
     )
-    LIST(APPEND JavaScriptCore_SOURCES
+    list(APPEND JavaScriptCore_SOURCES
         llint/LLIntCLoop.cpp
         llint/LLIntData.cpp
         llint/LLIntEntrypoints.cpp
@@ -411,16 +411,16 @@ IF (ENABLE_LLINT)
         llint/LLIntThunks.cpp
         llint/LowLevelInterpreter.cpp
     )
-ENDIF ()
+endif ()
 
 # GENERATOR 1-A: LUT creator
-FOREACH (_file ${JavaScriptCore_LUT_FILES})
-    GET_FILENAME_COMPONENT(_name ${_file} NAME_WE)
+foreach (_file ${JavaScriptCore_LUT_FILES})
+    get_filename_component(_name ${_file} NAME_WE)
     GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
-    LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
-ENDFOREACH ()
+    list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
+endforeach ()
 
-SET (JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
+set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
     assembler
     bytecode
     collector/handles
@@ -435,7 +435,7 @@ SET (JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
     yarr
 )
 
-SET (JavaScriptCore_FORWARDING_HEADERS_FILES
+set(JavaScriptCore_FORWARDING_HEADERS_FILES
     API/APICast.h
     API/APIShims.h
     API/JavaScript.h
@@ -460,10 +460,10 @@ SET (JavaScriptCore_FORWARDING_HEADERS_FILES
 
 # GENERATOR 1-B: particular LUT creator (for 1 file only)
 GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h MAIN_DEPENDENCY)
-LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
+list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
 
 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
@@ -472,25 +472,25 @@ ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOU
 
 
 #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py
     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py ${JAVASCRIPTCORE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
     VERBATIM)
 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
 
-IF (WTF_CPU_ARM)
-    LIST(APPEND JavaScriptCore_SOURCES
+if (WTF_CPU_ARM)
+    list(APPEND JavaScriptCore_SOURCES
         assembler/ARMAssembler.cpp
         assembler/ARMv7Assembler.cpp
         assembler/MacroAssemblerARM.cpp
     )
-ELSEIF (WTF_CPU_MIPS)
-ELSEIF (WTF_CPU_X86)
-ELSEIF (WTF_CPU_X86_64)
-ELSE ()
-    MESSAGE(FATAL_ERROR "Unknown CPU")
-ENDIF ()
+elseif (WTF_CPU_MIPS)
+elseif (WTF_CPU_X86)
+elseif (WTF_CPU_X86_64)
+else ()
+    message(FATAL_ERROR "Unknown CPU")
+endif ()
 
 
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
@@ -498,17 +498,17 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 WEBKIT_CREATE_FORWARDING_HEADERS(JavaScriptCore DIRECTORIES ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES} FILES ${JavaScriptCore_FORWARDING_HEADERS_FILES})
 
 
-ADD_SUBDIRECTORY(shell)
+add_subdirectory(shell)
 
 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
-INCLUDE_DIRECTORIES(${JavaScriptCore_INCLUDE_DIRECTORIES})
-ADD_DEFINITIONS(-DBUILDING_JavaScriptCore)
-ADD_LIBRARY(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
-TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
-SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
-SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
-
-IF (SHARED_CORE)
-    SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
-    INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
-ENDIF ()
+include_directories(${JavaScriptCore_INCLUDE_DIRECTORIES})
+add_definitions(-DBUILDING_JavaScriptCore)
+add_library(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
+target_link_libraries(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
+set_target_properties(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
+set_target_properties(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
+
+if (SHARED_CORE)
+    set_target_properties(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
+    install(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
+endif ()
index 08e26ac..4ea8eb9 100644 (file)
@@ -1,3 +1,37 @@
+2012-12-05  Halton Huo  <halton.huo@intel.com>
+
+        [CMake] Unify coding style for CMake files
+        https://bugs.webkit.org/show_bug.cgi?id=103605
+
+        Reviewed by Laszlo Gombos.
+
+        Update cmake files(.cmake, CMakeLists.txt) with following style rules:
+        1. Indentation
+        1.1 Use spaces, not tabs.
+        1.2 Four spaces as indent.
+        2. Spacing
+        2.1 Place one space between control statements and their parentheses.
+            For eg, if (), else (), elseif (), endif (), foreach (),
+            endforeach (), while (), endwhile (), break ().
+        2.2 Do not place spaces between function and macro statements and
+            their parentheses. For eg, macro(), endmacro(), function(),
+            endfunction().
+        2.3 Do not place spaces between a command or function or macro and its
+            parentheses, or between a parenthesis and its content. For eg,
+            message("testing") not message( "testing") or message ("testing" )
+        2.4 No space at line ending.
+        3. Lowercase when call commands macros and functions. For eg,
+           add_executable() not ADD_EXECUTABLE(), set() not SET().
+
+        * CMakeLists.txt:
+        * PlatformBlackBerry.cmake:
+        * PlatformEfl.cmake:
+        * PlatformWinCE.cmake:
+        * shell/CMakeLists.txt:
+        * shell/PlatformBlackBerry.cmake:
+        * shell/PlatformEfl.cmake:
+        * shell/PlatformWinCE.cmake:
+
 2012-12-05  Oliver Hunt  <oliver@apple.com>
 
         Empty parse cache when receiving a low memory warning
index f9352cd..a8b2472 100644 (file)
@@ -1,14 +1,14 @@
-LIST(INSERT JavaScriptCore_INCLUDE_DIRECTORIES 0
+list(INSERT JavaScriptCore_INCLUDE_DIRECTORIES 0
     "${BLACKBERRY_THIRD_PARTY_DIR}/icu"
 )
 
-LIST(REMOVE_ITEM JavaScriptCore_SOURCES
+list(REMOVE_ITEM JavaScriptCore_SOURCES
     runtime/GCActivityCallback.cpp
 )
 
-LIST(APPEND JavaScriptCore_SOURCES
+list(APPEND JavaScriptCore_SOURCES
     runtime/GCActivityCallbackBlackBerry.cpp
     runtime/MemoryStatistics.cpp
 )
 
-INSTALL(FILES "wtf/Forward.h" DESTINATION usr/include/browser/webkit/wtf)
+install(FILES "wtf/Forward.h" DESTINATION usr/include/browser/webkit/wtf)
index 3b41155..0521e65 100644 (file)
@@ -1,20 +1,20 @@
-LIST(APPEND JavaScriptCore_SOURCES
+list(APPEND JavaScriptCore_SOURCES
     jit/ExecutableAllocatorFixedVMPool.cpp
     jit/ExecutableAllocator.cpp
 
     runtime/MemoryStatistics.cpp
 )
 
-LIST(APPEND JavaScriptCore_LIBRARIES
+list(APPEND JavaScriptCore_LIBRARIES
     ${ICU_I18N_LIBRARIES}
 )
 
-LIST(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
+list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
     ${ICU_INCLUDE_DIRS}
 )
 
-IF (ENABLE_GLIB_SUPPORT)
-  LIST(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
-    ${JAVASCRIPTCORE_DIR}/wtf/gobject
-  )
-ENDIF ()
+if (ENABLE_GLIB_SUPPORT)
+    list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
+         ${JAVASCRIPTCORE_DIR}/wtf/gobject
+    )
+endif ()
index e1a43ff..036d63b 100644 (file)
@@ -1,20 +1,20 @@
-LIST(APPEND JavaScriptCore_SOURCES
+list(APPEND JavaScriptCore_SOURCES
     jit/ExecutableAllocator.cpp
 )
 
-IF (ENABLE_JIT AND WTF_CPU_ARM)
-    ADD_CUSTOM_COMMAND(
+if (ENABLE_JIT AND WTF_CPU_ARM)
+    add_custom_command(
         OUTPUT ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm
         MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_jit_stubs
         DEPENDS ${JAVASCRIPTCORE_DIR}/jit/JITStubs.cpp
         COMMAND ${PERL_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_jit_stubs --prefix=MSVC ${JAVASCRIPTCORE_DIR}/jit/JITStubs.cpp > ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm
         VERBATIM)
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj
         MAIN_DEPENDENCY ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm
         COMMAND armasm -nologo ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj
         VERBATIM)
 
-    LIST (APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj)
-ENDIF ()
+    list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj)
+endif ()
index d1b4abf..e753903 100644 (file)
@@ -1,28 +1,28 @@
-SET(JSC_SOURCES
+set(JSC_SOURCES
     ../jsc.cpp
 )
 
-SET(JSC_LIBRARIES
+set(JSC_LIBRARIES
     ${WTF_LIBRARY_NAME}
     ${JavaScriptCore_LIBRARY_NAME}
 )
 
-IF ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC")
-    ADD_DEFINITIONS(-DSTATICALLY_LINKED_WITH_JavaScriptCore)
-ENDIF ()
+if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC")
+    add_definitions(-DSTATICALLY_LINKED_WITH_JavaScriptCore)
+endif ()
 
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES})
-INCLUDE_DIRECTORIES(./ ${JavaScriptCore_INCLUDE_DIRECTORIES})
-ADD_EXECUTABLE(${JSC_EXECUTABLE_NAME} ${JSC_SOURCES})
-TARGET_LINK_LIBRARIES(${JSC_EXECUTABLE_NAME} ${JSC_LIBRARIES})
-SET_TARGET_PROPERTIES(${JSC_EXECUTABLE_NAME} PROPERTIES FOLDER "JavaScriptCore")
+include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES})
+add_executable(${JSC_EXECUTABLE_NAME} ${JSC_SOURCES})
+target_link_libraries(${JSC_EXECUTABLE_NAME} ${JSC_LIBRARIES})
+set_target_properties(${JSC_EXECUTABLE_NAME} PROPERTIES FOLDER "JavaScriptCore")
 
-IF (JSC_LINK_FLAGS)
+if (JSC_LINK_FLAGS)
     ADD_TARGET_PROPERTIES(${JSC_EXECUTABLE_NAME} LINK_FLAGS "${JSC_LINK_FLAGS}")
-ENDIF ()
+endif ()
 
-IF (SHOULD_INSTALL_JS_SHELL)
-    INSTALL(TARGETS ${JSC_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
-ENDIF ()
+if (SHOULD_INSTALL_JS_SHELL)
+    install(TARGETS ${JSC_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
+endif ()
index aff77ca..0e1d745 100644 (file)
@@ -1,5 +1,5 @@
 FIND_STAGING_LIBRARY(SLOG2_LIBRARY slog2)
-LIST(APPEND JSC_LIBRARIES
+list(APPEND JSC_LIBRARIES
     ${ICUI18N_LIBRARY}
     ${ICUUC_LIBRARY}
     ${INTL_LIBRARY} # Required for x86 builds
@@ -10,8 +10,8 @@ LIST(APPEND JSC_LIBRARIES
     ${SLOG2_LIBRARY}
 )
 
-IF (PROFILING)
-    LIST(APPEND JSC_LIBRARIES
+if (PROFILING)
+    list(APPEND JSC_LIBRARIES
         ${PROFILING_LIBRARY}
     )
-ENDIF ()
+endif ()
index 22fe20a..8e64300 100644 (file)
@@ -1,4 +1,4 @@
-LIST(APPEND JSC_LIBRARIES
+list(APPEND JSC_LIBRARIES
     ${GLIB_LIBRARIES}
     ${ECORE_LIBRARIES}
     ${CMAKE_DL_LIBS}
index 0b7a3bf..c5bc981 100644 (file)
@@ -1,3 +1,3 @@
-LIST(APPEND JSC_SOURCES
+list(APPEND JSC_SOURCES
     ../os-win32/WinMain.cpp
 )
index df128fd..6bf44f0 100644 (file)
@@ -1,7 +1,7 @@
-ADD_SUBDIRECTORY(${WEBKIT_DIR}/efl/DefaultTheme)
+add_subdirectory(${WEBKIT_DIR}/efl/DefaultTheme)
 
-IF (ENABLE_INSPECTOR)
-    ADD_CUSTOM_TARGET(
+if (ENABLE_INSPECTOR)
+    add_custom_target(
         web-inspector-resources ALL
         COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBCORE_DIR}/inspector/front-end ${WEB_INSPECTOR_DIR}
         COMMAND ${CMAKE_COMMAND} -E copy ${WEBCORE_DIR}/English.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR}
@@ -9,11 +9,11 @@ IF (ENABLE_INSPECTOR)
         DEPENDS ${WebCore_LIBRARY_NAME}
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     )
-    INSTALL(DIRECTORY "${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}"
+    install(DIRECTORY "${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}"
         DESTINATION ${DATA_INSTALL_DIR}
         FILES_MATCHING PATTERN "*.js"
                        PATTERN "*.html"
                        PATTERN "*.css"
                        PATTERN "*.gif"
                        PATTERN "*.png")
-ENDIF ()
+endif ()
index c383a2b..fad72f5 100644 (file)
@@ -1 +1 @@
-ADD_SUBDIRECTORY(wtf)
+add_subdirectory(wtf)
index 9d44087..a6b2a23 100644 (file)
@@ -1,3 +1,34 @@
+2012-12-05  Halton Huo  <halton.huo@intel.com>
+
+        [CMake] Unify coding style for CMake files
+        https://bugs.webkit.org/show_bug.cgi?id=103605
+
+        Reviewed by Laszlo Gombos.
+
+        Update cmake files(.cmake, CMakeLists.txt) with following style rules:
+        1. Indentation
+        1.1 Use spaces, not tabs.
+        1.2 Four spaces as indent.
+        2. Spacing
+        2.1 Place one space between control statements and their parentheses.
+            For eg, if (), else (), elseif (), endif (), foreach (),
+            endforeach (), while (), endwhile (), break ().
+        2.2 Do not place spaces between function and macro statements and
+            their parentheses. For eg, macro(), endmacro(), function(),
+            endfunction().
+        2.3 Do not place spaces between a command or function or macro and its
+            parentheses, or between a parenthesis and its content. For eg,
+            message("testing") not message( "testing") or message ("testing" )
+        2.4 No space at line ending.
+        3. Lowercase when call commands macros and functions. For eg,
+           add_executable() not ADD_EXECUTABLE(), set() not SET().
+
+        * CMakeLists.txt:
+        * wtf/CMakeLists.txt:
+        * wtf/PlatformBlackBerry.cmake:
+        * wtf/PlatformEfl.cmake:
+        * wtf/PlatformWinCE.cmake:
+
 2012-12-04  Jon Lee  <jonlee@apple.com>
 
         Extend StringHasher to take a stream of characters
index 9ba4950..42c2dad 100644 (file)
@@ -1,4 +1,4 @@
-SET(WTF_HEADERS
+set(WTF_HEADERS
     ASCIICType.h
     AVLTree.h
     Alignment.h
@@ -153,7 +153,7 @@ SET(WTF_HEADERS
     unicode/Unicode.h
 )
 
-SET(WTF_SOURCES
+set(WTF_SOURCES
     ArrayBuffer.cpp
     ArrayBufferView.cpp
     Assertions.cpp
@@ -213,7 +213,7 @@ SET(WTF_SOURCES
     unicode/UTF8.cpp
 )
 
-SET(WTF_INCLUDE_DIRECTORIES
+set(WTF_INCLUDE_DIRECTORIES
     "${WTF_DIR}"
     "${WTF_DIR}/wtf"
     "${WTF_DIR}/wtf/dtoa"
@@ -223,17 +223,17 @@ SET(WTF_INCLUDE_DIRECTORIES
     "${CMAKE_BINARY_DIR}"
 )
 
-IF (NOT USE_SYSTEM_MALLOC)
-    LIST(APPEND WTF_SOURCES
+if (NOT USE_SYSTEM_MALLOC)
+    list(APPEND WTF_SOURCES
         TCSystemAlloc.cpp
     )
-ENDIF()
+endif ()
 
 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} STATIC ${WTF_HEADERS} ${WTF_SOURCES})
-TARGET_LINK_LIBRARIES(${WTF_LIBRARY_NAME} ${WTF_LIBRARIES})
-SET_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
+include_directories(${WTF_INCLUDE_DIRECTORIES})
+add_definitions(-DBUILDING_WTF)
+add_library(${WTF_LIBRARY_NAME} STATIC ${WTF_HEADERS} ${WTF_SOURCES})
+target_link_libraries(${WTF_LIBRARY_NAME} ${WTF_LIBRARIES})
+set_target_properties(${WTF_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
index 5f30d08..a7fff93 100644 (file)
@@ -1,4 +1,4 @@
-LIST(APPEND WTF_SOURCES
+list(APPEND WTF_SOURCES
     OSAllocatorPosix.cpp
     TCSystemAlloc.cpp
     ThreadIdentifierDataPthreads.cpp
@@ -7,6 +7,6 @@ LIST(APPEND WTF_SOURCES
     unicode/icu/CollatorICU.cpp
 )
 
-LIST(INSERT WTF_INCLUDE_DIRECTORIES 0
+list(INSERT WTF_INCLUDE_DIRECTORIES 0
     "${BLACKBERRY_THIRD_PARTY_DIR}/icu"
 )
index 73d57e5..dc0919f 100644 (file)
@@ -1,4 +1,4 @@
-LIST(APPEND WTF_SOURCES
+list(APPEND WTF_SOURCES
     efl/MainThreadEfl.cpp
     efl/OwnPtrEfl.cpp
     efl/RefPtrEfl.cpp
@@ -12,7 +12,7 @@ LIST(APPEND WTF_SOURCES
     unicode/icu/CollatorICU.cpp
 )
 
-LIST(APPEND WTF_LIBRARIES
+list(APPEND WTF_LIBRARIES
     pthread
     ${GLIB_LIBRARIES}
     ${GLIB_GIO_LIBRARIES}
@@ -27,7 +27,7 @@ LIST(APPEND WTF_LIBRARIES
     ${CMAKE_DL_LIBS}
 )
 
-LIST(APPEND WTF_INCLUDE_DIRECTORIES
+list(APPEND WTF_INCLUDE_DIRECTORIES
     ${ECORE_INCLUDE_DIRS}
     ${ECORE_EVAS_INCLUDE_DIRS}
     ${EINA_INCLUDE_DIRS}
index d558ee5..f3fe993 100644 (file)
@@ -1,8 +1,8 @@
-LIST(APPEND WTF_HEADERS
+list(APPEND WTF_HEADERS
     unicode/wchar/UnicodeWchar.h
 )
 
-LIST(APPEND WTF_SOURCES
+list(APPEND WTF_SOURCES
     NullPtr.cpp
     OSAllocatorWin.cpp
     ThreadingWin.cpp
@@ -17,6 +17,6 @@ LIST(APPEND WTF_SOURCES
     win/OwnPtrWin.cpp
 )
 
-LIST(APPEND WTF_LIBRARIES
+list(APPEND WTF_LIBRARIES
     mmtimer
 )
index 5e10a91..1c9ca10 100644 (file)
@@ -1,4 +1,4 @@
-SET(WebCore_INCLUDE_DIRECTORIES
+set(WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}"
     "${WEBCORE_DIR}/Modules/battery"
     "${WEBCORE_DIR}/Modules/filesystem"
@@ -108,7 +108,7 @@ SET(WebCore_INCLUDE_DIRECTORIES
     "${CMAKE_BINARY_DIR}"
 )
 
-SET(WebCore_IDL_INCLUDES
+set(WebCore_IDL_INCLUDES
     Modules/battery
     Modules/filesystem
     Modules/gamepad
@@ -142,7 +142,7 @@ SET(WebCore_IDL_INCLUDES
     xml
 )
 
-SET(WebCore_IDL_FILES
+set(WebCore_IDL_FILES
     Modules/battery/BatteryManager.idl
     Modules/battery/NavigatorBattery.idl
 
@@ -624,7 +624,7 @@ SET(WebCore_IDL_FILES
 # FIXME: The BlackBerry port doesn't support generating DOM bindings from the SVG IDL files.
 # For now, we explicitly demarcate the SVG IDL files so that the BlackBerry port can skip them
 # during DOM binding generation. See <https://bugs.webkit.org/show_bug.cgi?id=72773>.
-SET(WebCore_SVG_IDL_FILES
+set(WebCore_SVG_IDL_FILES
     svg/SVGAElement.idl
     svg/SVGAltGlyphDefElement.idl
     svg/SVGAltGlyphElement.idl
@@ -770,11 +770,11 @@ SET(WebCore_SVG_IDL_FILES
     svg/SVGZoomEvent.idl
 )
 
-LIST(APPEND WebCore_IDL_FILES
+list(APPEND WebCore_IDL_FILES
     ${WebCore_SVG_IDL_FILES}
 )
 
-SET(WebCore_SOURCES
+set(WebCore_SOURCES
     Modules/battery/BatteryController.cpp
     Modules/battery/BatteryManager.cpp
     Modules/battery/BatteryStatus.cpp
@@ -803,7 +803,7 @@ SET(WebCore_SOURCES
     Modules/filesystem/HTMLInputElementFileSystem.cpp
     Modules/filesystem/LocalFileSystem.cpp
     Modules/filesystem/WorkerContextFileSystem.cpp
-    
+
     Modules/gamepad/Gamepad.cpp
     Modules/gamepad/GamepadList.cpp
     Modules/gamepad/NavigatorGamepad.cpp
@@ -811,7 +811,7 @@ SET(WebCore_SOURCES
     Modules/geolocation/Geolocation.cpp
     Modules/geolocation/GeolocationController.cpp
     Modules/geolocation/NavigatorGeolocation.cpp
-        
+
     Modules/indexeddb/DOMWindowIndexedDatabase.cpp
     Modules/indexeddb/IDBAny.cpp
     Modules/indexeddb/IDBCursor.cpp
@@ -2510,15 +2510,15 @@ SET(WebCore_SOURCES
     xml/parser/XMLDocumentParserScope.cpp
 )
 
-SET(WebCore_CSS_PROPERTY_NAMES
+set(WebCore_CSS_PROPERTY_NAMES
     ${WEBCORE_DIR}/css/CSSPropertyNames.in
 )
 
-SET(WebCore_CSS_VALUE_KEYWORDS
+set(WebCore_CSS_VALUE_KEYWORDS
     ${WEBCORE_DIR}/css/CSSValueKeywords.in
 )
 
-SET(WebCore_USER_AGENT_STYLE_SHEETS
+set(WebCore_USER_AGENT_STYLE_SHEETS
     ${WEBCORE_DIR}/css/html.css
     ${WEBCORE_DIR}/css/fullscreen.css
     ${WEBCORE_DIR}/css/mathml.css
@@ -2528,49 +2528,49 @@ SET(WebCore_USER_AGENT_STYLE_SHEETS
     ${WEBCORE_DIR}/css/view-source.css
 )
 
-SET(WebCore_LIBRARIES
+set(WebCore_LIBRARIES
     ${WTF_LIBRARY_NAME}
     ${JavaScriptCore_LIBRARY_NAME}
 )
 
-IF (ENABLE_SQL_DATABASE AND ENABLE_WORKERS)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_SQL_DATABASE AND ENABLE_WORKERS)
+    list(APPEND WebCore_SOURCES
         Modules/webdatabase/WorkerContextWebDatabase.cpp
     )
 
-    LIST(APPEND WebCore_IDL_FILES
+    list(APPEND WebCore_IDL_FILES
         Modules/webdatabase/WorkerContextWebDatabase.idl
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_NETSCAPE_PLUGIN_API)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_NETSCAPE_PLUGIN_API)
+    list(APPEND WebCore_SOURCES
         plugins/PluginDebug.cpp
         plugins/PluginStream.cpp
         plugins/npapi.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_SVG)
-    LIST(APPEND WebCore_CSS_PROPERTY_NAMES
+if (ENABLE_SVG)
+    list(APPEND WebCore_CSS_PROPERTY_NAMES
         ${WEBCORE_DIR}/css/SVGCSSPropertyNames.in
     )
-    LIST(APPEND WebCore_CSS_VALUE_KEYWORDS
+    list(APPEND WebCore_CSS_VALUE_KEYWORDS
         ${WEBCORE_DIR}/css/SVGCSSValueKeywords.in
     )
-ENDIF()
+endif ()
 
-IF (ENABLE_SMOOTH_SCROLLING)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_SMOOTH_SCROLLING)
+    list(APPEND WebCore_SOURCES
         platform/ScrollAnimatorNone.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_WEBGL)
-    SET(WTF_USE_3D_GRAPHICS 1)
-    ADD_DEFINITIONS(-DWTF_USE_3D_GRAPHICS=1)
+if (ENABLE_WEBGL)
+    set(WTF_USE_3D_GRAPHICS 1)
+    add_definitions(-DWTF_USE_3D_GRAPHICS=1)
 
-    LIST(APPEND WebCore_SOURCES
+    list(APPEND WebCore_SOURCES
         html/canvas/OESStandardDerivatives.cpp
         html/canvas/OESTextureFloat.cpp
         html/canvas/OESVertexArrayObject.cpp
@@ -2604,7 +2604,7 @@ IF (ENABLE_WEBGL)
         html/canvas/OESVertexArrayObject.cpp
         html/canvas/OESElementIndexUint.cpp
     )
-    LIST(APPEND WebCore_IDL_FILES
+    list(APPEND WebCore_IDL_FILES
         html/canvas/EXTTextureFilterAnisotropic.idl
         html/canvas/OESStandardDerivatives.idl
         html/canvas/OESTextureFloat.idl
@@ -2629,35 +2629,35 @@ IF (ENABLE_WEBGL)
         html/canvas/WebGLUniformLocation.idl
         html/canvas/WebGLVertexArrayObjectOES.idl
     )
-ENDIF ()
+endif ()
 
-IF (WTF_USE_3D_GRAPHICS)
-    LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+if (WTF_USE_3D_GRAPHICS)
+    list(APPEND WebCore_INCLUDE_DIRECTORIES
         ${OPENGL_INCLUDE_DIR}
         "${THIRDPARTY_DIR}/ANGLE/src"
         "${THIRDPARTY_DIR}/ANGLE/include"
         "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
         "${WEBCORE_DIR}/platform/graphics/gpu"
     )
-    LIST(APPEND WebCore_LIBRARIES
+    list(APPEND WebCore_LIBRARIES
         ${OPENGL_gl_LIBRARY}
     )
 
-    IF (BISON_VERSION EQUAL "2.5")
+    if (BISON_VERSION EQUAL "2.5")
         # Bison 2.5 can not compile generated glslang.
         # See https://bugs.webkit.org/show_bug.cgi?id=93487
-        LIST(APPEND ANGLESupport_SOURCES
+        list(APPEND ANGLESupport_SOURCES
             ${THIRDPARTY_DIR}/ANGLE/src/compiler/glslang_lex.cpp
             ${THIRDPARTY_DIR}/ANGLE/src/compiler/glslang_tab.cpp
         )
-    ELSE ()
-        LIST(APPEND ANGLESupport_SOURCES
+    else ()
+        list(APPEND ANGLESupport_SOURCES
             ${DERIVED_SOURCES_WEBCORE_DIR}/glslang.cpp
             ${DERIVED_SOURCES_WEBCORE_DIR}/glslang_tab.cpp
         )
-    ENDIF ()
+    endif ()
 
-    LIST(APPEND ANGLESupport_SOURCES
+    list(APPEND ANGLESupport_SOURCES
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/ArrayBoundsClamper.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/BuiltInFunctionEmulator.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/CodeGenGLSL.cpp
@@ -2723,58 +2723,58 @@ IF (WTF_USE_3D_GRAPHICS)
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/VersionGLSL.cpp
     )
 
-    LIST(APPEND WebCore_SOURCES
+    list(APPEND WebCore_SOURCES
         platform/graphics/ANGLEWebKitBridge.cpp
         platform/graphics/GraphicsContext3D.cpp
         platform/graphics/gpu/DrawingBuffer.cpp
     )
-ENDIF ()
+endif ()
 
-SET(WebCoreTestSupport_INCLUDE_DIRECTORIES
+set(WebCoreTestSupport_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/testing"
 )
 
-SET(WebCoreTestSupport_IDL_INCLUDES
+set(WebCoreTestSupport_IDL_INCLUDES
     testing
 )
 
-SET(WebCoreTestSupport_IDL_FILES
+set(WebCoreTestSupport_IDL_FILES
     testing/Internals.idl
     testing/InternalSettings.idl
     testing/MallocStatistics.idl
 )
 
-SET(WebCoreTestSupport_SOURCES
+set(WebCoreTestSupport_SOURCES
     testing/Internals.cpp
     testing/InternalSettings.cpp
 )
 
 # Modules that the bindings generator scripts may use
-SET(SCRIPTS_RESOLVE_SUPPLEMENTAL
+set(SCRIPTS_RESOLVE_SUPPLEMENTAL
     ${WEBCORE_DIR}/bindings/scripts/IDLParser.pm
 )
-SET(SCRIPTS_BINDINGS
+set(SCRIPTS_BINDINGS
     ${WEBCORE_DIR}/bindings/scripts/IDLParser.pm
     ${WEBCORE_DIR}/bindings/scripts/InFilesParser.pm
     ${WEBCORE_DIR}/bindings/scripts/preprocessor.pm
 )
-SET(IDL_FILES_TMP ${DERIVED_SOURCES_WEBCORE_DIR}/idl_files.tmp)
-SET(SUPPLEMENTAL_DEPENDENCY_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/supplemental_dependency.tmp)
-SET(IDL_ATTRIBUTES_FILE ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
+set(IDL_FILES_TMP ${DERIVED_SOURCES_WEBCORE_DIR}/idl_files.tmp)
+set(SUPPLEMENTAL_DEPENDENCY_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/supplemental_dependency.tmp)
+set(IDL_ATTRIBUTES_FILE ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
 
-INCLUDE(${WEBCORE_DIR}/UseJSC.cmake)
+include(${WEBCORE_DIR}/UseJSC.cmake)
 
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 # ANGLE tokenizer & parser
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/glslang.cpp
     MAIN_DEPENDENCY ${THIRDPARTY_DIR}/ANGLE/src/compiler/glslang.l
     COMMAND ${FLEX_EXECUTABLE} --noline --nounistd --outfile=glslang.cpp ${THIRDPARTY_DIR}/ANGLE/src/compiler/glslang.l
     WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
     VERBATIM)
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/glslang_tab.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/glslang_tab.h
     MAIN_DEPENDENCY ${THIRDPARTY_DIR}/ANGLE/src/compiler/glslang.y
     COMMAND ${BISON_EXECUTABLE} --no-lines --defines=glslang_tab.h --skeleton=yacc.c --output=glslang_tab.cpp ${THIRDPARTY_DIR}/ANGLE/src/compiler/glslang.y
@@ -2782,83 +2782,83 @@ ADD_CUSTOM_COMMAND(
     VERBATIM)
 
 # All Web Inspector generated files are created with this one call to CodeGeneratorInspector.pm
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorProtocolVersion.h
     MAIN_DEPENDENCY inspector/Inspector.json
     DEPENDS ${WEBCORE_DIR}/inspector/generate-inspector-protocol-version ${WEBCORE_DIR}/inspector/Inspector.json
     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/inspector/generate-inspector-protocol-version -o ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorProtocolVersion.h ${WEBCORE_DIR}/inspector/Inspector.json
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorProtocolVersion.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorProtocolVersion.h)
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendDispatcher.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendDispatcher.h ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorFrontend.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorFrontend.h ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorTypeBuilder.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorTypeBuilder.h
     MAIN_DEPENDENCY inspector/Inspector.json
     DEPENDS ${WEBCORE_DIR}/inspector/CodeGeneratorInspector.py
     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/inspector/CodeGeneratorInspector.py ${WEBCORE_DIR}/inspector/Inspector.json --output_h_dir "${DERIVED_SOURCES_WEBCORE_DIR}" --output_cpp_dir "${DERIVED_SOURCES_WEBCORE_DIR}"
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendDispatcher.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorFrontend.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorTypeBuilder.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendDispatcher.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorFrontend.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorTypeBuilder.cpp)
 
 
 # Generate InspectorOverlayPage.h
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorOverlayPage.h
     MAIN_DEPENDENCY inspector/InspectorOverlayPage.html
     COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl InspectorOverlayPage_html ${WEBCORE_DIR}/inspector/InspectorOverlayPage.html ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorOverlayPage.h
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorOverlayPage.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorOverlayPage.h)
 
 
 # Generate InjectedScriptSource.h
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptSource.h
     MAIN_DEPENDENCY inspector/InjectedScriptSource.js
     COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl InjectedScriptSource_js ${WEBCORE_DIR}/inspector/InjectedScriptSource.js ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptSource.h
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptSource.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptSource.h)
 
 
 # Generate InjectedScriptCanvasModuleSource.h
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptCanvasModuleSource.h
     MAIN_DEPENDENCY inspector/InjectedScriptCanvasModuleSource.js
     COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl InjectedScriptCanvasModuleSource_js ${WEBCORE_DIR}/inspector/InjectedScriptCanvasModuleSource.js ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptCanvasModuleSource.h
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptCanvasModuleSource.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptCanvasModuleSource.h)
 
 
 MAKE_HASH_TOOLS(${WEBCORE_DIR}/platform/ColorData)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/ColorData.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/ColorData.cpp)
 
 
 # Generate XMLViewerCSS.h
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/XMLViewerCSS.h
     MAIN_DEPENDENCY xml/XMLViewer.css
     COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl XMLViewer_css ${WEBCORE_DIR}/xml/XMLViewer.css ${DERIVED_SOURCES_WEBCORE_DIR}/XMLViewerCSS.h
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XMLViewerCSS.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XMLViewerCSS.h)
 
 
 # Generate XMLViewerJS.h
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/XMLViewerJS.h
     MAIN_DEPENDENCY xml/XMLViewer.js
     COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl XMLViewer_js ${WEBCORE_DIR}/xml/XMLViewer.js ${DERIVED_SOURCES_WEBCORE_DIR}/XMLViewerJS.h
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XMLViewerJS.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XMLViewerJS.h)
 
 
 # Generate HTML entity table
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLEntityTable.cpp
     MAIN_DEPENDENCY ${WEBCORE_DIR}/html/parser/HTMLEntityNames.in
     DEPENDS ${WEBCORE_DIR}/html/parser/create-html-entity-table
     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/html/parser/create-html-entity-table -o ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLEntityTable.cpp ${WEBCORE_DIR}/html/parser/HTMLEntityNames.in
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLEntityTable.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLEntityTable.cpp)
 
 # Generate CSS property names
-ADD_CUSTOM_COMMAND (
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.in ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.h ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.gperf
     MAIN_DEPENDENCY ${WEBCORE_DIR}/css/makeprop.pl
     DEPENDS ${WebCore_CSS_PROPERTY_NAMES}
@@ -2866,13 +2866,13 @@ ADD_CUSTOM_COMMAND (
     COMMAND ${PERL_EXECUTABLE} -ne "print" ${WebCore_CSS_PROPERTY_NAMES} > ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.in
     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makeprop.pl --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}"
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.cpp)
 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSParser.cpp CSSValueKeywords.h)
 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.cpp CSSPropertyNames.h)
 
 
 # Generate CSS value keywords
-ADD_CUSTOM_COMMAND (
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.in ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.h ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.gperf
     MAIN_DEPENDENCY ${WEBCORE_DIR}/css/makevalues.pl
     DEPENDS ${WebCore_CSS_VALUE_KEYWORDS}
@@ -2880,28 +2880,28 @@ ADD_CUSTOM_COMMAND (
     COMMAND ${PERL_EXECUTABLE} -ne "print" ${WebCore_CSS_VALUE_KEYWORDS} > ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.in
     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makevalues.pl --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}"
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.cpp)
 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSParser.cpp CSSValueKeywords.h)
 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSPrimitiveValueMappings.h CSSValueKeywords.h)
 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.cpp CSSValueKeywords.h)
 
 # Generate user agent styles
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheetsData.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheets.h
     MAIN_DEPENDENCY ${WEBCORE_DIR}/css/make-css-file-arrays.pl
     DEPENDS ${WebCore_USER_AGENT_STYLE_SHEETS} ${WEBCORE_DIR}/bindings/scripts/preprocessor.pm
     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/make-css-file-arrays.pl --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheets.h ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheetsData.cpp ${WebCore_USER_AGENT_STYLE_SHEETS}
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheetsData.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheetsData.cpp)
 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/StyleResolver.cpp UserAgentStyleSheetsData.cpp UserAgentStyleSheets.h)
 
 
 GENERATE_GRAMMAR(cssyy ${WEBCORE_DIR}/css/CSSGrammar.y.in ${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.h ${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.cpp "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.cpp)
 
 
 GENERATE_GRAMMAR(xpathyy ${WEBCORE_DIR}/xml/XPathGrammar.y ${DERIVED_SOURCES_WEBCORE_DIR}/XPathGrammar.h ${DERIVED_SOURCES_WEBCORE_DIR}/XPathGrammar.cpp "")
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XPathGrammar.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XPathGrammar.cpp)
 
 
 
@@ -2909,11 +2909,11 @@ ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/html/HTMLTreeBuilder.cpp
 
 
 GENERATE_DOM_NAMES(HTML ${WEBCORE_DIR}/html/HTMLAttributeNames.in ${WEBCORE_DIR}/html/HTMLTagNames.in "")
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLNames.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLElementFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/JSHTMLElementWrapperFactory.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLNames.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLElementFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/JSHTMLElementWrapperFactory.cpp)
 
 
 GENERATE_EVENT_FACTORY(${WEBCORE_DIR}/dom/EventNames.in EventFactory.cpp)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/EventFactory.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/EventFactory.cpp)
 
 
 GENERATE_EVENT_FACTORY(${WEBCORE_DIR}/dom/EventTargetFactory.in EventTargetInterfaces.h)
@@ -2921,85 +2921,85 @@ ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/dom/EventNames.cpp EventT
 
 
 GENERATE_EXCEPTION_CODE_DESCRIPTION(${WEBCORE_DIR}/dom/DOMExceptions.in ExceptionCodeDescription.cpp)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/ExceptionCodeDescription.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/ExceptionCodeDescription.cpp)
 
 
 GENERATE_SETTINGS_MACROS(${WEBCORE_DIR}/page/Settings.in SettingsMacros.h)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SettingsMacros.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SettingsMacros.h)
 
 
 GENERATE_FONT_NAMES(${WEBCORE_DIR}/css/WebKitFontFamilyNames.in)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitFontFamilyNames.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitFontFamilyNames.cpp)
 
 
 GENERATE_DOM_NAMES(MathML ${WEBCORE_DIR}/mathml/mathattrs.in ${WEBCORE_DIR}/mathml/mathtags.in "")
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/MathMLNames.cpp)
-IF (ENABLE_MATHML)
-    LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/MathMLElementFactory.cpp)
-ENDIF ()
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/MathMLNames.cpp)
+if (ENABLE_MATHML)
+    list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/MathMLElementFactory.cpp)
+endif ()
 
 # SVG extra defines need to map to a numerical value for correct preprocessing of svgtags.in.
-SET(SVG_EXTRA_DEFINES "")
-IF (ENABLE_FILTERS)
-    LIST(APPEND SVG_EXTRA_DEFINES "ENABLE_FILTERS=1")
-ENDIF ()
-IF (ENABLE_SVG_FONTS)
-    LIST(APPEND SVG_EXTRA_DEFINES "ENABLE_SVG_FONTS=1")
-ENDIF ()
+set(SVG_EXTRA_DEFINES "")
+if (ENABLE_FILTERS)
+    list(APPEND SVG_EXTRA_DEFINES "ENABLE_FILTERS=1")
+endif ()
+if (ENABLE_SVG_FONTS)
+    list(APPEND SVG_EXTRA_DEFINES "ENABLE_SVG_FONTS=1")
+endif ()
 
 GENERATE_DOM_NAMES(SVG ${WEBCORE_DIR}/svg/svgattrs.in ${WEBCORE_DIR}/svg/svgtags.in "${SVG_EXTRA_DEFINES}")
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SVGNames.cpp)
-IF (ENABLE_SVG)
-    LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SVGElementFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/JSSVGElementWrapperFactory.cpp)
-ENDIF ()
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SVGNames.cpp)
+if (ENABLE_SVG)
+    list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SVGElementFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/JSSVGElementWrapperFactory.cpp)
+endif ()
 
 
 GENERATE_DOM_NAMES(XLink ${WEBCORE_DIR}/svg/xlinkattrs.in)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XLinkNames.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XLinkNames.cpp)
 
 
 GENERATE_DOM_NAMES(XMLNS ${WEBCORE_DIR}/xml/xmlnsattrs.in)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XMLNSNames.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XMLNSNames.cpp)
 
 
 GENERATE_DOM_NAMES(XML ${WEBCORE_DIR}/xml/xmlattrs.in)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XMLNames.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XMLNames.cpp)
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitVersion.h
     MAIN_DEPENDENCY ${WEBKIT_DIR}/scripts/generate-webkitversion.pl
     DEPENDS ${WEBKIT_DIR}/mac/Configurations/Version.xcconfig
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/scripts/generate-webkitversion.pl --config ${WEBKIT_DIR}/mac/Configurations/Version.xcconfig --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitVersion.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitVersion.h)
 
 WEBKIT_WRAP_SOURCELIST(${WebCore_IDL_FILES} ${WebCore_SOURCES})
 WEBKIT_WRAP_SOURCELIST(${WebCoreTestSupport_IDL_FILES} ${WebCoreTestSupport_SOURCES})
 
-ADD_DEFINITIONS(-DBUILDING_WebCore)
-INCLUDE_DIRECTORIES(${WebCore_INCLUDE_DIRECTORIES} ${WebCoreTestSupport_INCLUDE_DIRECTORIES})
+add_definitions(-DBUILDING_WebCore)
+include_directories(${WebCore_INCLUDE_DIRECTORIES} ${WebCoreTestSupport_INCLUDE_DIRECTORIES})
 
-ADD_LIBRARY(${WebCore_LIBRARY_NAME} ${WebCore_LIBRARY_TYPE} ${WebCore_SOURCES})
-SET_TARGET_PROPERTIES(${WebCore_LIBRARY_NAME} PROPERTIES FOLDER "WebCore")
-SET_TARGET_PROPERTIES(${WebCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
+add_library(${WebCore_LIBRARY_NAME} ${WebCore_LIBRARY_TYPE} ${WebCore_SOURCES})
+set_target_properties(${WebCore_LIBRARY_NAME} PROPERTIES FOLDER "WebCore")
+set_target_properties(${WebCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
 
-ADD_LIBRARY(${WebCoreTestSupport_LIBRARY_NAME} ${WebCoreTestSupport_LIBRARY_TYPE} ${WebCoreTestSupport_SOURCES})
-SET_TARGET_PROPERTIES(${WebCoreTestSupport_LIBRARY_NAME} PROPERTIES FOLDER "WebCore")
+add_library(${WebCoreTestSupport_LIBRARY_NAME} ${WebCoreTestSupport_LIBRARY_TYPE} ${WebCoreTestSupport_SOURCES})
+set_target_properties(${WebCoreTestSupport_LIBRARY_NAME} PROPERTIES FOLDER "WebCore")
 
-ADD_DEPENDENCIES(${WebCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_NAME})
-ADD_DEPENDENCIES(${WebCoreTestSupport_LIBRARY_NAME} ${WebCore_LIBRARY_NAME})
+add_dependencies(${WebCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_NAME})
+add_dependencies(${WebCoreTestSupport_LIBRARY_NAME} ${WebCore_LIBRARY_NAME})
 
-IF (WTF_USE_3D_GRAPHICS)
-    SET(ANGLESupport_LIBRARY_NAME ANGLESupport)
-    ADD_LIBRARY(${ANGLESupport_LIBRARY_NAME} STATIC ${ANGLESupport_SOURCES})
-    SET_TARGET_PROPERTIES(${ANGLESupport_LIBRARY_NAME} PROPERTIES FOLDER "WebCore")
-    LIST(APPEND WebCore_LIBRARIES ${ANGLESupport_LIBRARY_NAME})
+if (WTF_USE_3D_GRAPHICS)
+    set(ANGLESupport_LIBRARY_NAME ANGLESupport)
+    add_library(${ANGLESupport_LIBRARY_NAME} STATIC ${ANGLESupport_SOURCES})
+    set_target_properties(${ANGLESupport_LIBRARY_NAME} PROPERTIES FOLDER "WebCore")
+    list(APPEND WebCore_LIBRARIES ${ANGLESupport_LIBRARY_NAME})
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(${ANGLESupport_LIBRARY_NAME} IGNORECXX_WARNINGS)
-ENDIF ()
+endif ()
 
-TARGET_LINK_LIBRARIES(${WebCore_LIBRARY_NAME} ${WebCore_LIBRARIES})
+target_link_libraries(${WebCore_LIBRARY_NAME} ${WebCore_LIBRARIES})
 
-IF (SHARED_CORE)
-    SET_TARGET_PROPERTIES(${WebCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
-    INSTALL(TARGETS ${WebCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
-ENDIF ()
+if (SHARED_CORE)
+    set_target_properties(${WebCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
+    install(TARGETS ${WebCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
+endif ()
index 8f5c776..7a1c8ef 100644 (file)
@@ -1,3 +1,35 @@
+2012-12-05  Halton Huo  <halton.huo@intel.com>
+
+        [CMake] Unify coding style for CMake files
+        https://bugs.webkit.org/show_bug.cgi?id=103605
+
+        Reviewed by Laszlo Gombos.
+
+        Update cmake files(.cmake, CMakeLists.txt) with following style rules:
+        1. Indentation
+        1.1 Use spaces, not tabs.
+        1.2 Four spaces as indent.
+        2. Spacing
+        2.1 Place one space between control statements and their parentheses.
+            For eg, if (), else (), elseif (), endif (), foreach (),
+            endforeach (), while (), endwhile (), break ().
+        2.2 Do not place spaces between function and macro statements and
+            their parentheses. For eg, macro(), endmacro(), function(),
+            endfunction().
+        2.3 Do not place spaces between a command or function or macro and its
+            parentheses, or between a parenthesis and its content. For eg,
+            message("testing") not message( "testing") or message ("testing" )
+        2.4 No space at line ending.
+        3. Lowercase when call commands macros and functions. For eg,
+           add_executable() not ADD_EXECUTABLE(), set() not SET().
+
+        * CMakeLists.txt:
+        * PlatformBlackBerry.cmake:
+        * PlatformEfl.cmake:
+        * PlatformWinCE.cmake:
+        * UseJSC.cmake:
+        * UseV8.cmake:
+
 2012-12-05  Kentaro Hara  <haraken@chromium.org>
 
         [V8] Remove unused property names from V8HiddenPropertyName
index 0d76e41..cb9e9ae 100644 (file)
@@ -1,9 +1,9 @@
-LIST(INSERT WebCore_INCLUDE_DIRECTORIES 0
+list(INSERT WebCore_INCLUDE_DIRECTORIES 0
     "${BLACKBERRY_THIRD_PARTY_DIR}" # For <unicode.h>, which is included from <sys/keycodes.h>.
     "${BLACKBERRY_THIRD_PARTY_DIR}/icu"
 )
 
-LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/bindings/cpp"
     "${WEBCORE_DIR}/platform/blackberry/CookieDatabaseBackingStore"
     "${WEBCORE_DIR}/platform/graphics/blackberry/skia"
@@ -17,7 +17,7 @@ LIST(APPEND WebCore_INCLUDE_DIRECTORIES
 )
 
 # Skia sources
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     platform/graphics/skia/FloatPointSkia.cpp
     platform/graphics/skia/FloatRectSkia.cpp
     platform/graphics/skia/FontCustomPlatformData.cpp
@@ -41,7 +41,7 @@ LIST(APPEND WebCore_SOURCES
 )
 
 # Skia font backend sources
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     platform/graphics/blackberry/FontCacheBlackberry.cpp
     platform/graphics/blackberry/skia/PlatformBridge.cpp
     platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp
@@ -55,7 +55,7 @@ LIST(APPEND WebCore_SOURCES
 )
 
 # Other sources
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     bindings/cpp/WebDOMCString.cpp
     bindings/cpp/WebDOMEventTarget.cpp
     bindings/cpp/WebDOMString.cpp
@@ -80,7 +80,7 @@ LIST(APPEND WebCore_SOURCES
 )
 
 # Networking sources
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     platform/network/MIMESniffing.cpp
     platform/network/ProxyServer.cpp
     platform/network/blackberry/AutofillBackingStore.cpp
@@ -103,12 +103,12 @@ LIST(APPEND WebCore_SOURCES
     platform/network/blackberry/rss/RSSParserBase.cpp
 )
 
-LIST(APPEND WebCore_USER_AGENT_STYLE_SHEETS
+list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
     ${WEBCORE_DIR}/css/mediaControlsBlackBerry.css
     ${WEBCORE_DIR}/css/themeBlackBerry.css
 )
 
-LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/bridge/blackberry"
     "${WEBCORE_DIR}/history/blackberry"
     "${WEBCORE_DIR}/page/blackberry"
@@ -128,7 +128,7 @@ LIST(APPEND WebCore_INCLUDE_DIRECTORIES
 )
 
 # BlackBerry sources
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     editing/blackberry/EditorBlackBerry.cpp
     editing/blackberry/SmartReplaceBlackBerry.cpp
     loader/blackberry/CookieJarBlackBerry.cpp
@@ -177,32 +177,32 @@ LIST(APPEND WebCore_SOURCES
 )
 
 # Credential Persistence sources
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     platform/network/blackberry/CredentialBackingStore.cpp
     platform/network/blackberry/CredentialStorageBlackBerry.cpp
 )
 
 # File System support
-IF (ENABLE_FILE_SYSTEM)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_FILE_SYSTEM)
+    list(APPEND WebCore_SOURCES
         platform/blackberry/AsyncFileSystemBlackBerry.cpp
     )
-ENDIF ()
+endif ()
 
 # Touch sources
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     dom/Touch.cpp
     dom/TouchEvent.cpp
     dom/TouchList.cpp
 )
 
-IF (ENABLE_SMOOTH_SCROLLING)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_SMOOTH_SCROLLING)
+    list(APPEND WebCore_SOURCES
         platform/blackberry/ScrollAnimatorBlackBerry.cpp
     )
-ENDIF ()
+endif ()
 
-LIST(APPEND WEBDOM_IDL_HEADERS
+list(APPEND WEBDOM_IDL_HEADERS
     bindings/cpp/WebDOMCString.h
     bindings/cpp/WebDOMEventTarget.h
     bindings/cpp/WebDOMObject.h
@@ -210,19 +210,19 @@ LIST(APPEND WEBDOM_IDL_HEADERS
 )
 
 if (ENABLE_REQUEST_ANIMATION_FRAME)
-    LIST(APPEND WebCore_SOURCES
+    list(APPEND WebCore_SOURCES
         platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp
         platform/graphics/DisplayRefreshMonitor.cpp
     )
-ENDIF ()
+endif ()
 
 if (ENABLE_WEBGL)
-    ADD_DEFINITIONS (-DWTF_USE_OPENGL_ES_2=1)
-    LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+    add_definitions(-DWTF_USE_OPENGL_ES_2=1)
+    list(APPEND WebCore_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/platform/graphics/gpu"
         "${WEBCORE_DIR}/platform/graphics/opengl"
     )
-    LIST(APPEND WebCore_SOURCES
+    list(APPEND WebCore_SOURCES
         platform/graphics/blackberry/DrawingBufferBlackBerry.cpp
         platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp
         platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
@@ -231,16 +231,16 @@ if (ENABLE_WEBGL)
         platform/graphics/opengl/Extensions3DOpenGLES.cpp
         platform/graphics/gpu/SharedGraphicsContext3D.cpp
     )
-ENDIF ()
+endif ()
 
 if (ENABLE_MEDIA_STREAM)
-    LIST(APPEND WebCore_SOURCES
+    list(APPEND WebCore_SOURCES
         platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_NETSCAPE_PLUGIN_API)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_NETSCAPE_PLUGIN_API)
+    list(APPEND WebCore_SOURCES
         plugins/PluginDatabase.cpp
         plugins/PluginPackage.cpp
         plugins/PluginView.cpp
@@ -250,8 +250,8 @@ IF (ENABLE_NETSCAPE_PLUGIN_API)
         plugins/blackberry/PluginViewBlackBerry.cpp
         plugins/blackberry/PluginViewPrivateBlackBerry.cpp
     )
-ELSE ()
-    LIST(APPEND WebCore_SOURCES
+else ()
+    list(APPEND WebCore_SOURCES
         plugins/PluginDataNone.cpp
         plugins/PluginDatabase.cpp
         plugins/PluginPackage.cpp
@@ -259,13 +259,13 @@ ELSE ()
         plugins/PluginView.cpp
         plugins/PluginViewNone.cpp
     )
-ENDIF ()
+endif ()
 
 # To speed up linking when working on accel comp, you can move this whole chunk
 # to Source/WebKit/blackberry/CMakeListsBlackBerry.txt.
 # Append to WebKit_SOURCES instead of WebCore_SOURCES.
-IF (WTF_USE_ACCELERATED_COMPOSITING)
-    LIST(APPEND WebCore_SOURCES
+if (WTF_USE_ACCELERATED_COMPOSITING)
+    list(APPEND WebCore_SOURCES
         ${WEBCORE_DIR}/platform/graphics/GraphicsLayer.cpp
         ${WEBCORE_DIR}/platform/graphics/GraphicsLayerUpdater.cpp
         ${WEBCORE_DIR}/platform/graphics/blackberry/CanvasLayerWebKitThread.cpp
@@ -287,30 +287,30 @@ IF (WTF_USE_ACCELERATED_COMPOSITING)
         ${WEBCORE_DIR}/rendering/RenderLayerBacking.cpp
         ${WEBCORE_DIR}/rendering/RenderLayerCompositor.cpp
     )
-ENDIF ()
+endif ()
 
-SET(ENV{WEBKITDIR} ${CMAKE_SOURCE_DIR}/Source)
-SET(ENV{PLATFORMNAME} ${CMAKE_SYSTEM_NAME})
-EXECUTE_PROCESS(
+set(ENV{WEBKITDIR} ${CMAKE_SOURCE_DIR}/Source)
+set(ENV{PLATFORMNAME} ${CMAKE_SYSTEM_NAME})
+execute_process(
     COMMAND hostname
     OUTPUT_VARIABLE host
 )
-STRING(REPLACE "\n" "" host1 "${host}")
-SET(ENV{COMPUTERNAME} ${host1})
+string(REPLACE "\n" "" host1 "${host}")
+set(ENV{COMPUTERNAME} ${host1})
 
-IF ($ENV{PUBLIC_BUILD})
-    ADD_DEFINITIONS(-DPUBLIC_BUILD=$ENV{PUBLIC_BUILD})
-ENDIF ()
+if ($ENV{PUBLIC_BUILD})
+    add_definitions(-DPUBLIC_BUILD=$ENV{PUBLIC_BUILD})
+endif ()
 
-INSTALL(FILES ${WEBDOM_IDL_HEADERS} DESTINATION usr/include/browser/webkit/dom)
+install(FILES ${WEBDOM_IDL_HEADERS} DESTINATION usr/include/browser/webkit/dom)
 
 # Create DOM C++ code given an IDL input
 # We define a new list of feature defines that is prefixed with LANGUAGE_CPP=1 so as to avoid the
 # warning "missing whitespace after the macro name" when inlining "LANGUAGE_CPP=1 ${FEATURE_DEFINES}".
-SET(FEATURE_DEFINES_WEBCORE "LANGUAGE_CPP=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
+set(FEATURE_DEFINES_WEBCORE "LANGUAGE_CPP=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
 
 # FIXME: We need to add the IDLs for SQL storage and Web Workers. See PR #123484.
-SET(WebCore_NO_CPP_IDL_FILES
+set(WebCore_NO_CPP_IDL_FILES
     ${WebCore_SVG_IDL_FILES}
     dom/CustomEvent.idl
     dom/PopStateEvent.idl
@@ -318,27 +318,27 @@ SET(WebCore_NO_CPP_IDL_FILES
     inspector/ScriptProfileNode.idl
 )
 
-LIST(APPEND WebCore_IDL_FILES
+list(APPEND WebCore_IDL_FILES
     css/MediaQueryListListener.idl
 )
 
-SET(WebCore_CPP_IDL_FILES ${WebCore_IDL_FILES})
+set(WebCore_CPP_IDL_FILES ${WebCore_IDL_FILES})
 
-FOREACH (_file ${WebCore_NO_CPP_IDL_FILES})
-    STRING(REPLACE "${_file}" "" WebCore_CPP_IDL_FILES "${WebCore_CPP_IDL_FILES}")
-ENDFOREACH ()
+foreach (_file ${WebCore_NO_CPP_IDL_FILES})
+    string(REPLACE "${_file}" "" WebCore_CPP_IDL_FILES "${WebCore_CPP_IDL_FILES}")
+endforeach ()
 
-SET(WebCore_CPP_IDL_FILES
+set(WebCore_CPP_IDL_FILES
     dom/EventListener.idl
     "${WebCore_CPP_IDL_FILES}"
 )
 
-FOREACH (_idl ${WebCore_CPP_IDL_FILES})
-    SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
-ENDFOREACH ()
-FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
+foreach (_idl ${WebCore_CPP_IDL_FILES})
+    set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
+endforeach ()
+file(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE}
     DEPENDS ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl ${SCRIPTS_RESOLVE_SUPPLEMENTAL} ${WebCore_CPP_IDL_FILES} ${IDL_ATTRIBUTES_FILE}
     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --idlFilesList ${IDL_FILES_TMP} --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --supplementalDependencyFile ${SUPPLEMENTAL_DEPENDENCY_FILE} --idlAttributesFile ${IDL_ATTRIBUTES_FILE}
@@ -353,16 +353,16 @@ GENERATE_BINDINGS(WebCore_SOURCES
     ${SUPPLEMENTAL_DEPENDENCY_FILE})
 
 # Generate contents for PopupPicker.cpp
-SET(WebCore_POPUP_CSS_AND_JS
+set(WebCore_POPUP_CSS_AND_JS
     ${WEBCORE_DIR}/Resources/blackberry/popupControlBlackBerry.css
     ${WEBCORE_DIR}/Resources/blackberry/selectControlBlackBerry.css
     ${WEBCORE_DIR}/Resources/blackberry/selectControlBlackBerry.js
 )
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.h ${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.cpp
     MAIN_DEPENDENCY ${WEBCORE_DIR}/make-file-arrays.py
     DEPENDS ${WebCore_POPUP_CSS_AND_JS}
     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/make-file-arrays.py --out-h=${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.h --out-cpp=${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.cpp ${WebCore_POPUP_CSS_AND_JS}
 )
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.cpp)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.cpp)
index 01f7d39..7924d57 100644 (file)
-LIST(APPEND WebCore_INCLUDE_DIRECTORIES
-  "${WEBCORE_DIR}/accessibility/atk"
-  "${WEBCORE_DIR}/page/efl"
-  "${WEBCORE_DIR}/platform/cairo"
-  "${WEBCORE_DIR}/platform/efl"
-  "${WEBCORE_DIR}/platform/graphics/cairo"
-  "${WEBCORE_DIR}/platform/graphics/efl"
-  "${WEBCORE_DIR}/platform/graphics/freetype"
-  "${WEBCORE_DIR}/platform/graphics/harfbuzz/"
-  "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
-  "${WEBCORE_DIR}/platform/linux"
-  "${WEBCORE_DIR}/platform/mediastream/gstreamer"
-  "${WEBCORE_DIR}/platform/network/soup"
-  "${WEBCORE_DIR}/platform/text/efl"
-  "${WEBCORE_DIR}/plugins/efl"
-  ${ATK_INCLUDE_DIRS}
+list(APPEND WebCore_INCLUDE_DIRECTORIES
+    "${WEBCORE_DIR}/accessibility/atk"
+    "${WEBCORE_DIR}/page/efl"
+    "${WEBCORE_DIR}/platform/cairo"
+    "${WEBCORE_DIR}/platform/efl"
+    "${WEBCORE_DIR}/platform/graphics/cairo"
+    "${WEBCORE_DIR}/platform/graphics/efl"
+    "${WEBCORE_DIR}/platform/graphics/freetype"
+    "${WEBCORE_DIR}/platform/graphics/harfbuzz/"
+    "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
+    "${WEBCORE_DIR}/platform/linux"
+    "${WEBCORE_DIR}/platform/mediastream/gstreamer"
+    "${WEBCORE_DIR}/platform/network/soup"
+    "${WEBCORE_DIR}/platform/text/efl"
+    "${WEBCORE_DIR}/plugins/efl"
+    ${ATK_INCLUDE_DIRS}
 )
 
-LIST(APPEND WebCore_SOURCES
-  accessibility/atk/AXObjectCacheAtk.cpp
-  accessibility/atk/AccessibilityObjectAtk.cpp
-  accessibility/atk/WebKitAccessibleHyperlink.cpp
-  accessibility/atk/WebKitAccessibleInterfaceAction.cpp
-  accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
-  accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
-  accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
-  accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
-  accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
-  accessibility/atk/WebKitAccessibleInterfaceImage.cpp
-  accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
-  accessibility/atk/WebKitAccessibleInterfaceTable.cpp
-  accessibility/atk/WebKitAccessibleInterfaceText.cpp
-  accessibility/atk/WebKitAccessibleInterfaceValue.cpp
-  accessibility/atk/WebKitAccessibleUtil.cpp
-  accessibility/atk/WebKitAccessibleWrapperAtk.cpp
-  editing/SmartReplaceICU.cpp
-  page/efl/DragControllerEfl.cpp
-  page/efl/EventHandlerEfl.cpp
-  platform/cairo/WidgetBackingStoreCairo.cpp
-  platform/Cursor.cpp
-  platform/efl/AsyncFileSystemEfl.cpp
-  platform/efl/BatteryProviderEfl.cpp
-  platform/efl/ClipboardEfl.cpp
-  platform/efl/ContextMenuEfl.cpp
-  platform/efl/ContextMenuItemEfl.cpp
-  platform/efl/CursorEfl.cpp
-  platform/efl/DragDataEfl.cpp
-  platform/efl/DragImageEfl.cpp
-  platform/efl/EflKeyboardUtilities.cpp
-  platform/efl/EflScreenUtilities.cpp
-  platform/efl/ErrorsEfl.cpp
-  platform/efl/EventLoopEfl.cpp
-  platform/efl/FileSystemEfl.cpp
-  platform/efl/GamepadsEfl.cpp
-  platform/efl/KURLEfl.cpp
-  platform/efl/LanguageEfl.cpp
-  platform/efl/LocalizedStringsEfl.cpp
-  platform/efl/LoggingEfl.cpp
-  platform/efl/MIMETypeRegistryEfl.cpp
-  platform/efl/NetworkInfoProviderEfl.cpp
-  platform/efl/PasteboardEfl.cpp
-  platform/efl/PlatformKeyboardEventEfl.cpp
-  platform/efl/PlatformMouseEventEfl.cpp
-  platform/efl/PlatformScreenEfl.cpp
-  platform/efl/PlatformWheelEventEfl.cpp
-  platform/efl/RenderThemeEfl.cpp
-  platform/efl/RunLoopEfl.cpp
-  platform/efl/ScrollbarEfl.cpp
-  platform/efl/ScrollbarThemeEfl.cpp
-  platform/efl/ScrollViewEfl.cpp
-  platform/efl/SharedTimerEfl.cpp
-  platform/efl/SoundEfl.cpp
-  platform/efl/SystemTimeEfl.cpp
-  platform/efl/TemporaryLinkStubs.cpp
-  platform/efl/WidgetEfl.cpp
+list(APPEND WebCore_SOURCES
+    accessibility/atk/AXObjectCacheAtk.cpp
+    accessibility/atk/AccessibilityObjectAtk.cpp
+    accessibility/atk/WebKitAccessibleHyperlink.cpp
+    accessibility/atk/WebKitAccessibleInterfaceAction.cpp
+    accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
+    accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
+    accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
+    accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
+    accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
+    accessibility/atk/WebKitAccessibleInterfaceImage.cpp
+    accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
+    accessibility/atk/WebKitAccessibleInterfaceTable.cpp
+    accessibility/atk/WebKitAccessibleInterfaceText.cpp
+    accessibility/atk/WebKitAccessibleInterfaceValue.cpp
+    accessibility/atk/WebKitAccessibleUtil.cpp
+    accessibility/atk/WebKitAccessibleWrapperAtk.cpp
+    editing/SmartReplaceICU.cpp
+    page/efl/DragControllerEfl.cpp
+    page/efl/EventHandlerEfl.cpp
+    platform/cairo/WidgetBackingStoreCairo.cpp
+    platform/Cursor.cpp
+    platform/efl/AsyncFileSystemEfl.cpp
+    platform/efl/BatteryProviderEfl.cpp
+    platform/efl/ClipboardEfl.cpp
+    platform/efl/ContextMenuEfl.cpp
+    platform/efl/ContextMenuItemEfl.cpp
+    platform/efl/CursorEfl.cpp
+    platform/efl/DragDataEfl.cpp
+    platform/efl/DragImageEfl.cpp
+    platform/efl/EflKeyboardUtilities.cpp
+    platform/efl/EflScreenUtilities.cpp
+    platform/efl/ErrorsEfl.cpp
+    platform/efl/EventLoopEfl.cpp
+    platform/efl/FileSystemEfl.cpp
+    platform/efl/GamepadsEfl.cpp
+    platform/efl/KURLEfl.cpp
+    platform/efl/LanguageEfl.cpp
+    platform/efl/LocalizedStringsEfl.cpp
+    platform/efl/LoggingEfl.cpp
+    platform/efl/MIMETypeRegistryEfl.cpp
+    platform/efl/NetworkInfoProviderEfl.cpp
+    platform/efl/PasteboardEfl.cpp
+    platform/efl/PlatformKeyboardEventEfl.cpp
+    platform/efl/PlatformMouseEventEfl.cpp
+    platform/efl/PlatformScreenEfl.cpp
+    platform/efl/PlatformWheelEventEfl.cpp
+    platform/efl/RenderThemeEfl.cpp
+    platform/efl/RunLoopEfl.cpp
+    platform/efl/ScrollbarEfl.cpp
+    platform/efl/ScrollbarThemeEfl.cpp
+    platform/efl/ScrollViewEfl.cpp
+    platform/efl/SharedTimerEfl.cpp
+    platform/efl/SoundEfl.cpp
+    platform/efl/SystemTimeEfl.cpp
+    platform/efl/TemporaryLinkStubs.cpp
+    platform/efl/WidgetEfl.cpp
 
-  platform/graphics/cairo/BitmapImageCairo.cpp
-  platform/graphics/cairo/CairoUtilities.cpp  
-  platform/graphics/cairo/FontCairo.cpp
-  platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
-  platform/graphics/cairo/GradientCairo.cpp
-  platform/graphics/cairo/GraphicsContextCairo.cpp
-  platform/graphics/cairo/ImageBufferCairo.cpp
-  platform/graphics/cairo/ImageCairo.cpp
-  platform/graphics/cairo/IntRectCairo.cpp
-  platform/graphics/cairo/NativeImageCairo.cpp
-  platform/graphics/cairo/OwnPtrCairo.cpp
-  platform/graphics/cairo/PathCairo.cpp  
-  platform/graphics/cairo/PatternCairo.cpp
-  platform/graphics/cairo/PlatformContextCairo.cpp
-  platform/graphics/cairo/PlatformPathCairo.cpp   
-  platform/graphics/cairo/RefPtrCairo.cpp
-  platform/graphics/cairo/TileCairo.cpp  
-  platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp
-  platform/graphics/cairo/TransformationMatrixCairo.cpp
+    platform/graphics/cairo/BitmapImageCairo.cpp
+    platform/graphics/cairo/CairoUtilities.cpp
+    platform/graphics/cairo/FontCairo.cpp
+    platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
+    platform/graphics/cairo/GradientCairo.cpp
+    platform/graphics/cairo/GraphicsContextCairo.cpp
+    platform/graphics/cairo/ImageBufferCairo.cpp
+    platform/graphics/cairo/ImageCairo.cpp
+    platform/graphics/cairo/IntRectCairo.cpp
+    platform/graphics/cairo/NativeImageCairo.cpp
+    platform/graphics/cairo/OwnPtrCairo.cpp
+    platform/graphics/cairo/PathCairo.cpp
+    platform/graphics/cairo/PatternCairo.cpp
+    platform/graphics/cairo/PlatformContextCairo.cpp
+    platform/graphics/cairo/PlatformPathCairo.cpp
+    platform/graphics/cairo/RefPtrCairo.cpp
+    platform/graphics/cairo/TileCairo.cpp
+    platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp
+    platform/graphics/cairo/TransformationMatrixCairo.cpp
 
-  platform/graphics/efl/CairoUtilitiesEfl.cpp
-  platform/graphics/efl/IconEfl.cpp
-  platform/graphics/efl/ImageEfl.cpp
-  platform/graphics/efl/IntPointEfl.cpp
-  platform/graphics/efl/IntRectEfl.cpp
+    platform/graphics/efl/CairoUtilitiesEfl.cpp
+    platform/graphics/efl/IconEfl.cpp
+    platform/graphics/efl/ImageEfl.cpp
+    platform/graphics/efl/IntPointEfl.cpp
+    platform/graphics/efl/IntRectEfl.cpp
 
-  platform/graphics/freetype/FontCacheFreeType.cpp
-  platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
-  platform/graphics/freetype/FontPlatformDataFreeType.cpp
-  platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
-  platform/graphics/freetype/SimpleFontDataFreeType.cpp
+    platform/graphics/freetype/FontCacheFreeType.cpp
+    platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
+    platform/graphics/freetype/FontPlatformDataFreeType.cpp
+    platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
+    platform/graphics/freetype/SimpleFontDataFreeType.cpp
 
-  platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp
-  platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCairo.cpp
-  platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp 
-  platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp
+    platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp
+    platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCairo.cpp
+    platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp
+    platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp
 
-  platform/graphics/WOFFFileFormat.cpp
-  platform/image-decoders/cairo/ImageDecoderCairo.cpp  
-  platform/linux/GamepadDeviceLinux.cpp
-  platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
-  platform/network/efl/NetworkStateNotifierEfl.cpp
+    platform/graphics/WOFFFileFormat.cpp
+    platform/image-decoders/cairo/ImageDecoderCairo.cpp
+    platform/linux/GamepadDeviceLinux.cpp
+    platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
+    platform/network/efl/NetworkStateNotifierEfl.cpp
 
-  platform/network/soup/AuthenticationChallengeSoup.cpp
-  platform/network/soup/CookieJarSoup.cpp
-  platform/network/soup/CookieStorageSoup.cpp
-  platform/network/soup/CredentialStorageSoup.cpp
-  platform/network/soup/DNSSoup.cpp
-  platform/network/soup/GOwnPtrSoup.cpp
-  platform/network/soup/ProxyResolverSoup.cpp
-  platform/network/soup/ProxyServerSoup.cpp
-  platform/network/soup/ResourceErrorSoup.cpp
-  platform/network/soup/ResourceHandleSoup.cpp
-  platform/network/soup/ResourceRequestSoup.cpp
-  platform/network/soup/ResourceResponseSoup.cpp
-  platform/network/soup/SocketStreamHandleSoup.cpp
-  platform/network/soup/SoupURIUtils.cpp
+    platform/network/soup/AuthenticationChallengeSoup.cpp
+    platform/network/soup/CookieJarSoup.cpp
+    platform/network/soup/CookieStorageSoup.cpp
+    platform/network/soup/CredentialStorageSoup.cpp
+    platform/network/soup/DNSSoup.cpp
+    platform/network/soup/GOwnPtrSoup.cpp
+    platform/network/soup/ProxyResolverSoup.cpp
+    platform/network/soup/ProxyServerSoup.cpp
+    platform/network/soup/ResourceErrorSoup.cpp
+    platform/network/soup/ResourceHandleSoup.cpp
+    platform/network/soup/ResourceRequestSoup.cpp
+    platform/network/soup/ResourceResponseSoup.cpp
+    platform/network/soup/SocketStreamHandleSoup.cpp
+    platform/network/soup/SoupURIUtils.cpp
 
-  platform/PlatformStrategies.cpp
-  platform/posix/FileSystemPOSIX.cpp
-  platform/posix/SharedBufferPOSIX.cpp
-  platform/text/efl/TextBreakIteratorInternalICUEfl.cpp
-  platform/text/enchant/TextCheckerEnchant.cpp
-  platform/text/TextBreakIteratorICU.cpp   
-  platform/text/TextCodecICU.cpp
-  platform/text/TextEncodingDetectorICU.cpp
+    platform/PlatformStrategies.cpp
+    platform/posix/FileSystemPOSIX.cpp
+    platform/posix/SharedBufferPOSIX.cpp
+    platform/text/efl/TextBreakIteratorInternalICUEfl.cpp
+    platform/text/enchant/TextCheckerEnchant.cpp
+    platform/text/TextBreakIteratorICU.cpp
+    platform/text/TextCodecICU.cpp
+    platform/text/TextEncodingDetectorICU.cpp
 )
 
-IF (ENABLE_BATTERY_STATUS)
-    LIST(APPEND WebCore_INCLUDE_DIRECTORIES ${DBUS_INCLUDE_DIRS})
-    LIST(APPEND WebCore_LIBRARIES ${DBUS_LIBRARIES})
-ENDIF ()
+if (ENABLE_BATTERY_STATUS)
+    list(APPEND WebCore_INCLUDE_DIRECTORIES ${DBUS_INCLUDE_DIRS})
+    list(APPEND WebCore_LIBRARIES ${DBUS_LIBRARIES})
+endif ()
 
-IF (ENABLE_NETSCAPE_PLUGIN_API)
-  LIST(APPEND WebCore_SOURCES
-    plugins/PluginDatabase.cpp
-    plugins/PluginDebug.cpp
-    plugins/PluginPackage.cpp
-    plugins/PluginStream.cpp
-    plugins/PluginView.cpp
+if (ENABLE_NETSCAPE_PLUGIN_API)
+    list(APPEND WebCore_SOURCES
+        plugins/PluginDatabase.cpp
+        plugins/PluginDebug.cpp
+        plugins/PluginPackage.cpp
+        plugins/PluginStream.cpp
+        plugins/PluginView.cpp
 
-    plugins/efl/PluginPackageEfl.cpp
-    plugins/efl/PluginViewEfl.cpp
-  )
-ELSE ()
-  LIST(APPEND WebCore_SOURCES
-    plugins/PluginPackageNone.cpp
-    plugins/PluginViewNone.cpp
-  )
-ENDIF ()
+        plugins/efl/PluginPackageEfl.cpp
+        plugins/efl/PluginViewEfl.cpp
+    )
+else ()
+    list(APPEND WebCore_SOURCES
+        plugins/PluginPackageNone.cpp
+        plugins/PluginViewNone.cpp
+    )
+endif ()
 
-LIST(APPEND WebCore_USER_AGENT_STYLE_SHEETS
+list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
     ${WEBCORE_DIR}/css/mediaControlsEfl.css
     ${WEBCORE_DIR}/css/mediaControlsEflFullscreen.css
 )
 
-IF (WTF_USE_TEXTURE_MAPPER)
-  LIST(APPEND WebCore_SOURCES
-    platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
-  )
-ENDIF ()
+if (WTF_USE_TEXTURE_MAPPER)
+    list(APPEND WebCore_SOURCES
+        platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
+    )
+endif ()
 
-LIST(APPEND WebCore_LIBRARIES
-  ${ATK_LIBRARIES}
-  ${CAIRO_LIBRARIES}
-  ${ECORE_LIBRARIES}
-  ${ECORE_EVAS_LIBRARIES}
-  ${ECORE_FILE_LIBRARIES}
-  ${ECORE_X_LIBRARIES}
-  ${E_DBUS_LIBRARIES}
-  ${E_DBUS_EUKIT_LIBRARIES}
-  ${EDJE_LIBRARIES}
-  ${EEZE_LIBRARIES}
-  ${EINA_LIBRARIES}
-  ${EVAS_LIBRARIES}
-  ${FONTCONFIG_LIBRARIES}
-  ${FREETYPE_LIBRARIES}
-  ${ICU_LIBRARIES}
-  ${JPEG_LIBRARIES}
-  ${LIBXML2_LIBRARIES}
-  ${LIBXSLT_LIBRARIES}
-  ${PNG_LIBRARIES}
-  ${SQLITE_LIBRARIES}
-  ${GLIB_LIBRARIES}
-  ${GLIB_GIO_LIBRARIES}
-  ${GLIB_GOBJECT_LIBRARIES}
-  ${LIBSOUP_LIBRARIES}
-  ${ZLIB_LIBRARIES}
-  ${HARFBUZZ_LIBRARIES}
+list(APPEND WebCore_LIBRARIES
+    ${ATK_LIBRARIES}
+    ${CAIRO_LIBRARIES}
+    ${ECORE_LIBRARIES}
+    ${ECORE_EVAS_LIBRARIES}
+    ${ECORE_FILE_LIBRARIES}
+    ${ECORE_X_LIBRARIES}
+    ${E_DBUS_LIBRARIES}
+    ${E_DBUS_EUKIT_LIBRARIES}
+    ${EDJE_LIBRARIES}
+    ${EEZE_LIBRARIES}
+    ${EINA_LIBRARIES}
+    ${EVAS_LIBRARIES}
+    ${FONTCONFIG_LIBRARIES}
+    ${FREETYPE_LIBRARIES}
+    ${ICU_LIBRARIES}
+    ${JPEG_LIBRARIES}
+    ${LIBXML2_LIBRARIES}
+    ${LIBXSLT_LIBRARIES}
+    ${PNG_LIBRARIES}
+    ${SQLITE_LIBRARIES}
+    ${GLIB_LIBRARIES}
+    ${GLIB_GIO_LIBRARIES}
+    ${GLIB_GOBJECT_LIBRARIES}
+    ${LIBSOUP_LIBRARIES}
+    ${ZLIB_LIBRARIES}
+    ${HARFBUZZ_LIBRARIES}
 )
 
-LIST(APPEND WebCore_INCLUDE_DIRECTORIES
-  ${CAIRO_INCLUDE_DIRS}
-  ${ECORE_INCLUDE_DIRS}
-  ${ECORE_EVAS_INCLUDE_DIRS}
-  ${ECORE_FILE_INCLUDE_DIRS}
-  ${ECORE_X_INCLUDE_DIRS}
-  ${E_DBUS_INCLUDE_DIRS}
-  ${E_DBUS_EUKIT_INCLUDE_DIRS}
-  ${EDJE_INCLUDE_DIRS}
-  ${EEZE_INCLUDE_DIRS}
-  ${EINA_INCLUDE_DIRS}
-  ${EVAS_INCLUDE_DIRS}
-  ${FREETYPE_INCLUDE_DIRS}
-  ${ICU_INCLUDE_DIRS}
-  ${LIBXML2_INCLUDE_DIR}
-  ${LIBXSLT_INCLUDE_DIR}
-  ${SQLITE_INCLUDE_DIR}
-  ${GLIB_INCLUDE_DIRS}
-  ${LIBSOUP_INCLUDE_DIRS}
-  ${ZLIB_INCLUDE_DIRS}
-  ${HARFBUZZ_INCLUDE_DIRS}
+list(APPEND WebCore_INCLUDE_DIRECTORIES
+    ${CAIRO_INCLUDE_DIRS}
+    ${ECORE_INCLUDE_DIRS}
+    ${ECORE_EVAS_INCLUDE_DIRS}
+    ${ECORE_FILE_INCLUDE_DIRS}
+    ${ECORE_X_INCLUDE_DIRS}
+    ${E_DBUS_INCLUDE_DIRS}
+    ${E_DBUS_EUKIT_INCLUDE_DIRS}
+    ${EDJE_INCLUDE_DIRS}
+    ${EEZE_INCLUDE_DIRS}
+    ${EINA_INCLUDE_DIRS}
+    ${EVAS_INCLUDE_DIRS}
+    ${FREETYPE_INCLUDE_DIRS}
+    ${ICU_INCLUDE_DIRS}
+    ${LIBXML2_INCLUDE_DIR}
+    ${LIBXSLT_INCLUDE_DIR}
+    ${SQLITE_INCLUDE_DIR}
+    ${GLIB_INCLUDE_DIRS}
+    ${LIBSOUP_INCLUDE_DIRS}
+    ${ZLIB_INCLUDE_DIRS}
+    ${HARFBUZZ_INCLUDE_DIRS}
 )
 
-IF (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
-  LIST(APPEND WebCore_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/platform/graphics/gstreamer"
+if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
+    list(APPEND WebCore_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/platform/graphics/gstreamer"
 
-    ${GSTREAMER_INCLUDE_DIRS}
-    ${GSTREAMER_BASE_INCLUDE_DIRS}
-    ${GSTREAMER_APP_INCLUDE_DIRS}
-    ${GSTREAMER_INTERFACES_INCLUDE_DIRS}
-    ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
-  )
-  LIST(APPEND WebCore_SOURCES
-    platform/graphics/gstreamer/GRefPtrGStreamer.cpp
-    platform/graphics/gstreamer/GStreamerUtilities.cpp
-    platform/graphics/gstreamer/GStreamerVersioning.cpp
-  )
-  LIST(APPEND WebCore_LIBRARIES
-    ${GSTREAMER_LIBRARIES}
-    ${GSTREAMER_BASE_LIBRARIES}
-    ${GSTREAMER_APP_LIBRARIES}
-    ${GSTREAMER_INTERFACES_LIBRARIES}
-    ${GSTREAMER_PBUTILS_LIBRARIES}
-  )
-ENDIF ()
+        ${GSTREAMER_INCLUDE_DIRS}
+        ${GSTREAMER_BASE_INCLUDE_DIRS}
+        ${GSTREAMER_APP_INCLUDE_DIRS}
+        ${GSTREAMER_INTERFACES_INCLUDE_DIRS}
+        ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
+    )
+    list(APPEND WebCore_SOURCES
+        platform/graphics/gstreamer/GRefPtrGStreamer.cpp
+        platform/graphics/gstreamer/GStreamerUtilities.cpp
+        platform/graphics/gstreamer/GStreamerVersioning.cpp
+    )
+    list(APPEND WebCore_LIBRARIES
+        ${GSTREAMER_LIBRARIES}
+        ${GSTREAMER_BASE_LIBRARIES}
+        ${GSTREAMER_APP_LIBRARIES}
+        ${GSTREAMER_INTERFACES_LIBRARIES}
+        ${GSTREAMER_PBUTILS_LIBRARIES}
+    )
+endif ()
 
-IF (ENABLE_VIDEO)
-  LIST(APPEND WebCore_INCLUDE_DIRECTORIES
-    ${GSTREAMER_VIDEO_INCLUDE_DIRS}
-  )
-  LIST(APPEND WebCore_SOURCES
-    platform/graphics/gstreamer/GStreamerGWorld.cpp
-    platform/graphics/gstreamer/ImageGStreamerCairo.cpp
-    platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
-    platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp
-    platform/graphics/gstreamer/VideoSinkGStreamer.cpp
-    platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
-  )
-  LIST(APPEND WebCore_LIBRARIES
-    ${GSTREAMER_VIDEO_LIBRARIES}
-  )
-ENDIF ()
+if (ENABLE_VIDEO)
+    list(APPEND WebCore_INCLUDE_DIRECTORIES
+        ${GSTREAMER_VIDEO_INCLUDE_DIRS}
+    )
+    list(APPEND WebCore_SOURCES
+        platform/graphics/gstreamer/GStreamerGWorld.cpp
+        platform/graphics/gstreamer/ImageGStreamerCairo.cpp
+        platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+        platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp
+        platform/graphics/gstreamer/VideoSinkGStreamer.cpp
+        platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
+    )
+    list(APPEND WebCore_LIBRARIES
+        ${GSTREAMER_VIDEO_LIBRARIES}
+    )
+endif ()
 
-IF (WTF_USE_3D_GRAPHICS)
-  SET(WTF_USE_OPENGL 1)
-  ADD_DEFINITIONS(-DWTF_USE_OPENGL=1)
+if (WTF_USE_3D_GRAPHICS)
+    set(WTF_USE_OPENGL 1)
+    add_definitions(-DWTF_USE_OPENGL=1)
 
-  LIST(APPEND WebCore_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/platform/graphics/opengl"
-    "${WEBCORE_DIR}/platform/graphics/surfaces"
-    "${WEBCORE_DIR}/platform/graphics/surfaces/glx"
-    "${WEBCORE_DIR}/platform/graphics/texmap"
-  )
-  LIST(APPEND WebCore_SOURCES
-    platform/graphics/OpenGLShims.cpp
-    platform/graphics/cairo/DrawingBufferCairo.cpp
-    platform/graphics/efl/GraphicsContext3DEfl.cpp
-    platform/graphics/efl/GraphicsContext3DPrivate.cpp
-    platform/graphics/opengl/Extensions3DOpenGL.cpp
-    platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
-    platform/graphics/opengl/GLPlatformContext.cpp
-    platform/graphics/opengl/GLPlatformSurface.cpp
-    platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
-    platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
-    platform/graphics/surfaces/GraphicsSurface.cpp
-    platform/graphics/surfaces/glx/GLXSurface.cpp
-    platform/graphics/surfaces/glx/GLXContext.cpp
-    platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp
-    platform/graphics/texmap/TextureMapperGL.cpp
-    platform/graphics/texmap/TextureMapperShaderManager.cpp
-  )
-  LIST(APPEND WebCore_LIBRARIES
-    ${X11_X11_LIB}
-    ${X11_Xcomposite_LIB}
-    ${X11_Xrender_LIB}
-  )
-ENDIF ()
+    list(APPEND WebCore_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/platform/graphics/opengl"
+        "${WEBCORE_DIR}/platform/graphics/surfaces"
+        "${WEBCORE_DIR}/platform/graphics/surfaces/glx"
+        "${WEBCORE_DIR}/platform/graphics/texmap"
+    )
+    list(APPEND WebCore_SOURCES
+        platform/graphics/OpenGLShims.cpp
+        platform/graphics/cairo/DrawingBufferCairo.cpp
+        platform/graphics/efl/GraphicsContext3DEfl.cpp
+        platform/graphics/efl/GraphicsContext3DPrivate.cpp
+        platform/graphics/opengl/Extensions3DOpenGL.cpp
+        platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
+        platform/graphics/opengl/GLPlatformContext.cpp
+        platform/graphics/opengl/GLPlatformSurface.cpp
+        platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
+        platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
+        platform/graphics/surfaces/GraphicsSurface.cpp
+        platform/graphics/surfaces/glx/GLXSurface.cpp
+        platform/graphics/surfaces/glx/GLXContext.cpp
+        platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp
+        platform/graphics/texmap/TextureMapperGL.cpp
+        platform/graphics/texmap/TextureMapperShaderManager.cpp
+    )
+    list(APPEND WebCore_LIBRARIES
+        ${X11_X11_LIB}
+        ${X11_Xcomposite_LIB}
+        ${X11_Xrender_LIB}
+    )
+endif ()
 
-ADD_DEFINITIONS(-DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}")
+add_definitions(-DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}")
 
-IF (ENABLE_WEB_AUDIO)
-  LIST(APPEND WebCore_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/platform/audio/gstreamer"
+if (ENABLE_WEB_AUDIO)
+    list(APPEND WebCore_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/platform/audio/gstreamer"
 
-    ${GSTREAMER_AUDIO_INCLUDE_DIRS}
-    ${GSTREAMER_FFT_INCLUDE_DIRS}
-  )
-  LIST(APPEND WebCore_SOURCES
-    platform/audio/efl/AudioBusEfl.cpp
-    platform/audio/gstreamer/AudioDestinationGStreamer.cpp
-    platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
-    platform/audio/gstreamer/FFTFrameGStreamer.cpp
-    platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
-  )
-  LIST(APPEND WebCore_LIBRARIES
-    ${GSTREAMER_AUDIO_LIBRARIES}
-    ${GSTREAMER_FFT_LIBRARIES}
-  )
-  SET(WEB_AUDIO_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/webaudio/resources)
-  FILE(GLOB WEB_AUDIO_DATA "${WEBCORE_DIR}/platform/audio/resources/*.wav")
-  INSTALL(FILES ${WEB_AUDIO_DATA} DESTINATION ${WEB_AUDIO_DIR})
-  ADD_DEFINITIONS(-DUNINSTALLED_AUDIO_RESOURCES_DIR="${WEBCORE_DIR}/platform/audio/resources")
-ENDIF ()
+        ${GSTREAMER_AUDIO_INCLUDE_DIRS}
+        ${GSTREAMER_FFT_INCLUDE_DIRS}
+    )
+    list(APPEND WebCore_SOURCES
+        platform/audio/efl/AudioBusEfl.cpp
+        platform/audio/gstreamer/AudioDestinationGStreamer.cpp
+        platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
+        platform/audio/gstreamer/FFTFrameGStreamer.cpp
+        platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
+    )
+    list(APPEND WebCore_LIBRARIES
+        ${GSTREAMER_AUDIO_LIBRARIES}
+        ${GSTREAMER_FFT_LIBRARIES}
+    )
+    set(WEB_AUDIO_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/webaudio/resources)
+    file(GLOB WEB_AUDIO_DATA "${WEBCORE_DIR}/platform/audio/resources/*.wav")
+    install(FILES ${WEB_AUDIO_DATA} DESTINATION ${WEB_AUDIO_DIR})
+    add_definitions(-DUNINSTALLED_AUDIO_RESOURCES_DIR="${WEBCORE_DIR}/platform/audio/resources")
+endif ()
 
-IF (ENABLE_SPELLCHECK)
-    LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+if (ENABLE_SPELLCHECK)
+    list(APPEND WebCore_INCLUDE_DIRECTORIES
         ${ENCHANT_INCLUDE_DIRS}
     )
-    LIST(APPEND WebCore_LIBRARIES
+    list(APPEND WebCore_LIBRARIES
         ${ENCHANT_LIBRARIES}
     )
-ENDIF()
+endif ()
index a0d044b..d20738b 100644 (file)
@@ -1,4 +1,4 @@
-LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/wince"
     "${WEBCORE_DIR}/platform/win"
     "${WEBCORE_DIR}/platform/graphics/wince"
@@ -15,7 +15,7 @@ LIST(APPEND WebCore_INCLUDE_DIRECTORIES
     "${3RDPARTY_DIR}/zlib"
 )
 
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     page/win/DragControllerWin.cpp
     page/win/EventHandlerWin.cpp
     page/wince/FrameWinCE.cpp
@@ -103,7 +103,7 @@ LIST(APPEND WebCore_SOURCES
     platform/text/wince/TextBreakIteratorWince.cpp
 )
 
-LIST(APPEND WebCore_LIBRARIES
+list(APPEND WebCore_LIBRARIES
     libjpeg
     libpng
     libxml2
@@ -115,18 +115,18 @@ LIST(APPEND WebCore_LIBRARIES
 )
 
 
-IF (ENABLE_NETSCAPE_PLUGIN_API)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_NETSCAPE_PLUGIN_API)
+    list(APPEND WebCore_SOURCES
         plugins/win/PluginMessageThrottlerWin.cpp
         plugins/win/PluginPackageWin.cpp
         plugins/win/PluginViewWin.cpp
         plugins/PluginPackage.cpp
         plugins/PluginView.cpp
     )
-ELSE ()
-    LIST(APPEND WebCore_SOURCES
+else ()
+    list(APPEND WebCore_SOURCES
         plugins/PluginPackage.cpp
         plugins/PluginPackageNone.cpp
         plugins/PluginViewNone.cpp
     )
-ENDIF ()
+endif ()
index a0faedf..202cf85 100644 (file)
@@ -1,27 +1,27 @@
-LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/bindings/js"
     "${WEBCORE_DIR}/bridge/jsc"
 )
 
-LIST(APPEND WebCoreTestSupport_INCLUDE_DIRECTORIES
+list(APPEND WebCoreTestSupport_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/testing/js"
 )
 
-LIST(APPEND WebCore_IDL_INCLUDES
+list(APPEND WebCore_IDL_INCLUDES
     bindings/js
 )
 
-IF (PORT MATCHES "BlackBerry")
-    LIST(APPEND WebCore_IDL_INCLUDES
+if (PORT MATCHES "BlackBerry")
+    list(APPEND WebCore_IDL_INCLUDES
         testing/js
     )
-    LIST(APPEND WebCore_IDL_FILES
+    list(APPEND WebCore_IDL_FILES
         testing/Internals.idl
         testing/InternalSettings.idl
     )
-ENDIF ()
+endif ()
 
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     bindings/js/ArrayValue.cpp
     bindings/js/BindingState.cpp
     bindings/js/CallbackFunction.cpp
@@ -174,47 +174,47 @@ LIST(APPEND WebCore_SOURCES
     bridge/jsc/BridgeJSC.cpp
 )
 
-LIST(APPEND WebCoreTestSupport_SOURCES
+list(APPEND WebCoreTestSupport_SOURCES
     testing/js/WebCoreTestSupport.cpp
 )
 
-IF (ENABLE_BLOB)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_BLOB)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSFileReaderCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_REQUEST_ANIMATION_FRAME)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_REQUEST_ANIMATION_FRAME)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSRequestAnimationFrameCallbackCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_SQL_DATABASE)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_SQL_DATABASE)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSCustomSQLStatementErrorCallback.cpp
         bindings/js/JSSQLResultSetRowListCustom.cpp
         bindings/js/JSSQLTransactionCustom.cpp
         bindings/js/JSSQLTransactionSyncCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_INDEXED_DATABASE)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_INDEXED_DATABASE)
+    list(APPEND WebCore_SOURCES
         bindings/js/IDBBindingUtilities.cpp
         bindings/js/JSIDBAnyCustom.cpp
         bindings/js/JSIDBKeyCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_WEB_SOCKETS)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_WEB_SOCKETS)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSWebSocketCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_WORKERS)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_WORKERS)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSDedicatedWorkerContextCustom.cpp
         bindings/js/JSWorkerContextBase.cpp
         bindings/js/JSWorkerContextCustom.cpp
@@ -222,94 +222,94 @@ IF (ENABLE_WORKERS)
         bindings/js/WorkerScriptController.cpp
         bindings/js/WorkerScriptDebugServer.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_VIDEO_TRACK)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_VIDEO_TRACK)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSTextTrackCueCustom.cpp
         bindings/js/JSTextTrackCustom.cpp
         bindings/js/JSTextTrackListCustom.cpp
         bindings/js/JSTrackCustom.cpp
         bindings/js/JSTrackEventCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_SHARED_WORKERS)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_SHARED_WORKERS)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSSharedWorkerCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_NOTIFICATIONS)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_NOTIFICATIONS)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSDesktopNotificationsCustom.cpp
         bindings/js/JSNotificationCustom.cpp
     )
-ENDIF ()
+endif ()
 
 if (ENABLE_FILE_SYSTEM)
-    LIST(APPEND WebCore_SOURCES
+    list(APPEND WebCore_SOURCES
         bindings/js/JSEntryCustom.cpp
         bindings/js/JSEntrySyncCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_SVG)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_SVG)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSSVGElementInstanceCustom.cpp
         bindings/js/JSSVGLengthCustom.cpp
         bindings/js/JSSVGPathSegCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_WEBGL)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_WEBGL)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSWebGLRenderingContextCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_WEB_AUDIO)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_WEB_AUDIO)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSAudioBufferSourceNodeCustom.cpp
         bindings/js/JSAudioContextCustom.cpp
         bindings/js/JSScriptProcessorNodeCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_WEB_INTENTS)
-    LIST (APPEND WebCore_SOURCES
+if (ENABLE_WEB_INTENTS)
+    list(APPEND WebCore_SOURCES
         bindings/js/JSIntentConstructor.cpp
     )
-ENDIF ()
+endif ()
 
-LIST(APPEND SCRIPTS_BINDINGS
+list(APPEND SCRIPTS_BINDINGS
     ${WEBCORE_DIR}/bindings/scripts/CodeGenerator.pm
     ${WEBCORE_DIR}/bindings/scripts/CodeGeneratorJS.pm
 )
 
-SET(IDL_INCLUDES "")
-FOREACH (_include ${WebCore_IDL_INCLUDES})
-    LIST(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
-ENDFOREACH ()
+set(IDL_INCLUDES "")
+foreach (_include ${WebCore_IDL_INCLUDES})
+    list(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
+endforeach ()
 
-FOREACH (_include ${WebCoreTestSupport_IDL_INCLUDES})
-    LIST(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
-ENDFOREACH ()
+foreach (_include ${WebCoreTestSupport_IDL_INCLUDES})
+    list(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
+endforeach ()
 
-SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
+set(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
 
 # Create JavaScript C++ code given an IDL input
-FOREACH (_idl ${WebCore_IDL_FILES})
-    SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
-ENDFOREACH ()
+foreach (_idl ${WebCore_IDL_FILES})
+    set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
+endforeach ()
 
-FOREACH (_idl ${WebCoreTestSupport_IDL_FILES})
-    SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
-ENDFOREACH ()
+foreach (_idl ${WebCoreTestSupport_IDL_FILES})
+    set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
+endforeach ()
 
-FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
+file(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE}
     DEPENDS ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl ${SCRIPTS_PREPROCESS_IDLS} ${WebCore_IDL_FILES} ${WebCoreTestSupport_IDL_FILES} ${IDL_ATTRIBUTES_FILE}
     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --idlFilesList ${IDL_FILES_TMP} --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --supplementalDependencyFile ${SUPPLEMENTAL_DEPENDENCY_FILE} --idlAttributesFile ${IDL_ATTRIBUTES_FILE}
index 03633cb..7d67f16 100644 (file)
@@ -1,21 +1,21 @@
-ADD_DEFINITIONS(-DUSING_V8_SHARED)
-ADD_DEFINITIONS(-DWTF_CHANGES=1)
+add_definitions(-DUSING_V8_SHARED)
+add_definitions(-DWTF_CHANGES=1)
 
-LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/bindings/v8"
     "${WEBCORE_DIR}/bindings/v8/custom"
     "${JAVASCRIPTCORE_DIR}/runtime"
 )
 
-LIST(APPEND WebCoreTestSupport_INCLUDE_DIRECTORIES
+list(APPEND WebCoreTestSupport_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/testing/v8"
 )
 
-LIST(APPEND WebCore_IDL_INCLUDES
+list(APPEND WebCore_IDL_INCLUDES
     bindings/v8
 )
 
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     bindings/generic/BindingSecurity.cpp
 
     bindings/v8/BindingState.cpp
@@ -155,19 +155,19 @@ LIST(APPEND WebCore_SOURCES
     bindings/v8/custom/V8XSLTProcessorCustom.cpp
 )
 
-LIST(APPEND WebCoreTestSupport_SOURCES
+list(APPEND WebCoreTestSupport_SOURCES
     testing/v8/WebCoreTestSupport.cpp
 )
 
-LIST(APPEND WebCore_SOURCES
+list(APPEND WebCore_SOURCES
     ${JAVASCRIPTCORE_DIR}/yarr/YarrInterpreter.cpp
     ${JAVASCRIPTCORE_DIR}/yarr/YarrJIT.cpp
     ${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp
     ${JAVASCRIPTCORE_DIR}/yarr/YarrSyntaxChecker.cpp
 )
 
-IF (ENABLE_JAVASCRIPT_DEBUGGER)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_JAVASCRIPT_DEBUGGER)
+    list(APPEND WebCore_SOURCES
         bindings/v8/JavaScriptCallFrame.cpp
         bindings/v8/ScriptDebugServer.cpp
         bindings/v8/ScriptHeapSnapshot.cpp
@@ -179,58 +179,58 @@ IF (ENABLE_JAVASCRIPT_DEBUGGER)
         bindings/v8/custom/V8ScriptProfileCustom.cpp
         bindings/v8/custom/V8ScriptProfileNodeCustom.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_NETSCAPE_PLUGIN_API)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_NETSCAPE_PLUGIN_API)
+    list(APPEND WebCore_SOURCES
         bindings/v8/NPV8Object.cpp
         bindings/v8/V8NPObject.cpp
         bindings/v8/V8NPUtils.cpp
     )
-ENDIF()
+endif ()
 
-IF (ENABLE_VIDEO)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_VIDEO)
+    list(APPEND WebCore_SOURCES
         bindings/v8/custom/V8HTMLAudioElementConstructor.cpp
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_SVG)
-    LIST(APPEND WebCore_SOURCES
+if (ENABLE_SVG)
+    list(APPEND WebCore_SOURCES
         bindings/v8/custom/V8SVGDocumentCustom.cpp
         bindings/v8/custom/V8SVGElementCustom.cpp
         bindings/v8/custom/V8SVGLengthCustom.cpp
         bindings/v8/custom/V8SVGPathSegCustom.cpp
     )
-ENDIF ()
+endif ()
 
-LIST(APPEND SCRIPTS_BINDINGS
+list(APPEND SCRIPTS_BINDINGS
     ${WEBCORE_DIR}/bindings/scripts/CodeGenerator.pm
     ${WEBCORE_DIR}/bindings/scripts/CodeGeneratorV8.pm
 )
 
-SET(IDL_INCLUDES "")
-FOREACH (_include ${WebCore_IDL_INCLUDES})
-    LIST(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
-ENDFOREACH ()
+set(IDL_INCLUDES "")
+foreach (_include ${WebCore_IDL_INCLUDES})
+    list(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
+endforeach ()
 
-FOREACH (_include ${WebCoreTestSupport_IDL_INCLUDES})
-    LIST(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
-ENDFOREACH ()
+foreach (_include ${WebCoreTestSupport_IDL_INCLUDES})
+    list(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
+endforeach ()
 
-SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 V8_BINDING=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
+set(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 V8_BINDING=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
 
 # Generate DebuggerScriptSource.h
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h
     MAIN_DEPENDENCY ${WEBCORE_DIR}/bindings/v8/DebuggerScript.js
     DEPENDS ${WEBCORE_DIR}/inspector/xxd.pl
     COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl DebuggerScriptSource_js ${WEBCORE_DIR}/bindings/v8/DebuggerScript.js ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h)
 
 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/RegExpJitTables.h
     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_WEBCORE_DIR}/RegExpJitTables.h
@@ -238,26 +238,26 @@ ADD_CUSTOM_COMMAND(
 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/RegExpJitTables.h)
 
 # Generate V8ArrayBufferViewCustomScript.h
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h
     MAIN_DEPENDENCY ${WEBCORE_DIR}/bindings/v8/custom/V8ArrayBufferViewCustomScript.js
     DEPENDS ${WEBCORE_DIR}/inspector/xxd.pl
     COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl V8ArrayBufferViewCustomScript_js ${WEBCORE_DIR}/bindings/v8/custom/V8ArrayBufferViewCustomScript.js ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h
     VERBATIM)
-LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h)
 
 # Create JavaScript C++ code given an IDL input
-FOREACH (_idl ${WebCore_IDL_FILES})
-    SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
-ENDFOREACH ()
+foreach (_idl ${WebCore_IDL_FILES})
+    set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
+endforeach ()
 
-FOREACH (_idl ${WebCoreTestSupport_IDL_FILES})
-    SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
-ENDFOREACH ()
+foreach (_idl ${WebCoreTestSupport_IDL_FILES})
+    set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
+endforeach ()
 
-FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
+file(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE}
     DEPENDS ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl ${SCRIPTS_PREPROCESS_IDLS} ${WebCore_IDL_FILES} ${WebCoreTestSupport_IDL_FILES} ${IDL_ATTRIBUTES_FILE}
     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --idlFilesList ${IDL_FILES_TMP} --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --supplementalDependencyFile ${SUPPLEMENTAL_DEPENDENCY_FILE} --idlAttributesFile ${IDL_ATTRIBUTES_FILE}
index 5d0e361..4c4830d 100644 (file)
@@ -1,4 +1,4 @@
-SET(WebKit_INCLUDE_DIRECTORIES
+set(WebKit_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}"
     "${WEBCORE_DIR}"
     "${WEBCORE_DIR}/Modules/intents"
@@ -65,35 +65,35 @@ SET(WebKit_INCLUDE_DIRECTORIES
     "${CMAKE_BINARY_DIR}"
 )
 
-IF (WTF_USE_SOUP)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/network/soup")
-ENDIF ()
+if (WTF_USE_SOUP)
+  list(APPEND WebKit_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/network/soup")
+endif ()
 
-IF (WTF_USE_CURL)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/network/curl")
-ENDIF ()
+if (WTF_USE_CURL)
+  list(APPEND WebKit_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/network/curl")
+endif ()
 
-SET(WebKit_LIBRARIES
+set(WebKit_LIBRARIES
     ${WebCore_LIBRARY_NAME}
 )
 
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
-ADD_DEFINITIONS(-DBUILDING_WebKit)
-INCLUDE_DIRECTORIES(${WebKit_INCLUDE_DIRECTORIES})
-ADD_LIBRARY(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARY_TYPE} ${WebKit_SOURCES})
-ADD_DEPENDENCIES(${WebKit_LIBRARY_NAME} ${WebCore_LIBRARY_NAME})
-TARGET_LINK_LIBRARIES(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARIES})
-SET_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} PROPERTIES FOLDER "WebKit")
-SET_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
+add_definitions(-DBUILDING_WebKit)
+include_directories(${WebKit_INCLUDE_DIRECTORIES})
+add_library(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARY_TYPE} ${WebKit_SOURCES})
+add_dependencies(${WebKit_LIBRARY_NAME} ${WebCore_LIBRARY_NAME})
+target_link_libraries(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARIES})
+set_target_properties(${WebKit_LIBRARY_NAME} PROPERTIES FOLDER "WebKit")
+set_target_properties(${WebKit_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
 
-IF (WebKit_LINK_FLAGS)
+if (WebKit_LINK_FLAGS)
     ADD_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} LINK_FLAGS "${WebKit_LINK_FLAGS}")
-ENDIF ()
+endif ()
 
-IF (VERSION_SCRIPT)
+if (VERSION_SCRIPT)
     ADD_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} LINK_FLAGS "${VERSION_SCRIPT}")
-ENDIF ()
+endif ()
 
-SET_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
-INSTALL(TARGETS ${WebKit_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
+set_target_properties(${WebKit_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
+install(TARGETS ${WebKit_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
index 712a43b..40981ea 100644 (file)
@@ -1,3 +1,33 @@
+2012-12-05  Halton Huo  <halton.huo@intel.com>
+
+        [CMake] Unify coding style for CMake files
+        https://bugs.webkit.org/show_bug.cgi?id=103605
+
+        Reviewed by Laszlo Gombos.
+
+        Update cmake files(.cmake, CMakeLists.txt) with following style rules:
+        1. Indentation
+        1.1 Use spaces, not tabs.
+        1.2 Four spaces as indent.
+        2. Spacing
+        2.1 Place one space between control statements and their parentheses.
+            For eg, if (), else (), elseif (), endif (), foreach (),
+            endforeach (), while (), endwhile (), break ().
+        2.2 Do not place spaces between function and macro statements and
+            their parentheses. For eg, macro(), endmacro(), function(),
+            endfunction().
+        2.3 Do not place spaces between a command or function or macro and its
+            parentheses, or between a parenthesis and its content. For eg,
+            message("testing") not message( "testing") or message ("testing" )
+        2.4 No space at line ending.
+        3. Lowercase when call commands macros and functions. For eg,
+           add_executable() not ADD_EXECUTABLE(), set() not SET().
+
+        * CMakeLists.txt:
+        * PlatformBlackBerry.cmake:
+        * PlatformEfl.cmake:
+        * PlatformWinCE.cmake:
+
 2012-12-03  Pierre Rossi  <pierre.rossi@digia.com>
 
         [Qt] another stab at fixing the windows build 
index d50b7e2..85e0966 100644 (file)
@@ -1,9 +1,9 @@
-LIST(INSERT WebKit_INCLUDE_DIRECTORIES 0
+list(INSERT WebKit_INCLUDE_DIRECTORIES 0
     "${BLACKBERRY_THIRD_PARTY_DIR}" # For <unicode.h>, which is included from <sys/keycodes.h>.
     "${BLACKBERRY_THIRD_PARTY_DIR}/icu"
 )
 
-LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+list(APPEND WebKit_INCLUDE_DIRECTORIES
     "${JAVASCRIPTCORE_DIR}/dfg"
     "${WEBCORE_DIR}/bindings/cpp"
     "${WEBCORE_DIR}/fileapi"
@@ -28,25 +28,25 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
     "${CMAKE_SOURCE_DIR}"
 )
 
-IF (ENABLE_NOTIFICATIONS)
-    LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+if (ENABLE_NOTIFICATIONS)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/Modules/notifications"
     )
-ENDIF ()
-IF (WTF_USE_SKIA)
-    LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+endif ()
+if (WTF_USE_SKIA)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/platform/graphics/chromium"
         "${WEBCORE_DIR}/platform/graphics/blackberry/skia"
         "${WEBCORE_DIR}/platform/graphics/skia"
     )
-ELSE ()
-    LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+else ()
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/platform/image-encoders"
     )
-ENDIF ()
+endif ()
 
-IF (NOT PUBLIC_BUILD)
-    LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+if (NOT PUBLIC_BUILD)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
         # needed for DRT for now
         "${WEBCORE_DIR}/platform/mock"
         "${WEBCORE_DIR}/svg/animation"
@@ -55,32 +55,32 @@ IF (NOT PUBLIC_BUILD)
         "${TOOLS_DIR}/DumpRenderTree"
         "${TOOLS_DIR}/DumpRenderTree/blackberry"
     )
-ENDIF ()
+endif ()
 
-IF (ENABLE_BATTERY_STATUS)
-    LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/Modules/battery)
-    LIST(APPEND WebKit_SOURCES blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp)
-ENDIF ()
+if (ENABLE_BATTERY_STATUS)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/Modules/battery)
+    list(APPEND WebKit_SOURCES blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp)
+endif ()
 
-IF (ENABLE_NAVIGATOR_CONTENT_UTILS)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+if (ENABLE_NAVIGATOR_CONTENT_UTILS)
+  list(APPEND WebKit_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/Modules/navigatorcontentutils"
   )
-ENDIF ()
+endif ()
 
-IF (ENABLE_MEDIA_STREAM)
-    LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+if (ENABLE_MEDIA_STREAM)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/Modules/mediastream"
         "${WEBCORE_DIR}/platform/mediastream"
     )
-    LIST(APPEND WebKit_SOURCES
+    list(APPEND WebKit_SOURCES
         blackberry/WebCoreSupport/UserMediaClientImpl.cpp
     )
-ENDIF ()
+endif ()
 
-ADD_DEFINITIONS(-DUSER_PROCESSES)
+add_definitions(-DUSER_PROCESSES)
 
-LIST(APPEND WebKit_SOURCES
+list(APPEND WebKit_SOURCES
     blackberry/Api/BackingStore.cpp
     blackberry/Api/BlackBerryGlobal.cpp
     blackberry/Api/InRegionScroller.cpp
@@ -142,21 +142,21 @@ LIST(APPEND WebKit_SOURCES
     blackberry/WebKitSupport/WebKitThreadViewportAccessor.cpp
 )
 
-IF (ENABLE_WEBGL)
-    ADD_DEFINITIONS (-DWTF_USE_OPENGL_ES_2=1)
-    LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+if (ENABLE_WEBGL)
+    add_definitions(-DWTF_USE_OPENGL_ES_2=1)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
         ${OPENGL_INCLUDE_DIR}
         ${THIRDPARTY_DIR}/ANGLE/src
         ${THIRDPARTY_DIR}/ANGLE/include/GLSLANG
     )
-    LIST(APPEND WebKit_LIBRARIES
+    list(APPEND WebKit_LIBRARIES
         ${OPENGL_gl_LIBRARY}
     )
-ENDIF (ENABLE_WEBGL)
+endif (ENABLE_WEBGL)
 
-IF (NOT PUBLIC_BUILD)
+if (NOT PUBLIC_BUILD)
     # DumpRenderTree sources
-    LIST(APPEND WebKit_SOURCES
+    list(APPEND WebKit_SOURCES
         blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
         ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp
         ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp
@@ -177,11 +177,11 @@ IF (NOT PUBLIC_BUILD)
         ${TOOLS_DIR}/DumpRenderTree/GCController.cpp
         ${WTF_DIR}/wtf/MD5.cpp
     )
-ENDIF ()
+endif ()
 
-SET(WebKit_LINK_FLAGS ${BLACKBERRY_LINK_FLAGS})
+set(WebKit_LINK_FLAGS ${BLACKBERRY_LINK_FLAGS})
 
-LIST(APPEND WebKit_LIBRARIES
+list(APPEND WebKit_LIBRARIES
     ${CURL_LIBRARY}
     ${FONTCONFIG_LIBRARY}
     ${ICUData_LIBRARY}
@@ -202,88 +202,88 @@ LIST(APPEND WebKit_LIBRARIES
     ${Z_LIBRARY}
 )
 
-IF (WTF_USE_SKIA)
-    LIST(APPEND WebKit_LIBRARIES
+if (WTF_USE_SKIA)
+    list(APPEND WebKit_LIBRARIES
         ${FREETYPE_LIBRARY}
         ${HARFBUZZ_LIBRARY}
         ${Skia_LIBRARY}
         ${Skia_QNX_LIBRARY}
     )
-ELSE ()
-    LIST(APPEND WebKit_LIBRARIES
+else ()
+    list(APPEND WebKit_LIBRARIES
         ${ITYPE_LIBRARY}
         ${WTLE_LIBRARY}
     )
-ENDIF ()
+endif ()
 
-IF (PROFILING)
-    LIST(APPEND WebKit_LIBRARIES
+if (PROFILING)
+    list(APPEND WebKit_LIBRARIES
         ${PROFILING_LIBRARY}
     )
-ENDIF ()
+endif ()
 
-IF (WTF_USE_ACCELERATED_COMPOSITING)
-    LIST(APPEND WebKit_SOURCES
+if (WTF_USE_ACCELERATED_COMPOSITING)
+    list(APPEND WebKit_SOURCES
         blackberry/WebKitSupport/GLES2Context.cpp
     )
-    LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/platform/graphics/gles2"
     )
-    LIST(APPEND WebKit_LIBRARIES
+    list(APPEND WebKit_LIBRARIES
         ${GLESv2_LIBRARY}
         ${EGL_LIBRARY}
     )
-ENDIF ()
+endif ()
 
-FILE(GLOB BBWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/blackberry/Api/*.h")
+file(GLOB BBWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/blackberry/Api/*.h")
 
-INSTALL(FILES ${BBWebKit_HEADERS}
+install(FILES ${BBWebKit_HEADERS}
         DESTINATION ../../usr/include/browser/webkit)
 
-IF (NOT PUBLIC_BUILD)
-    INSTALL(FILES ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
+if (NOT PUBLIC_BUILD)
+    install(FILES ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
             DESTINATION ../../usr/include/browser/webkit)
-ENDIF ()
+endif ()
 
-IF (ENABLE_VIDEO_TRACK)
-    LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+if (ENABLE_VIDEO_TRACK)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/html/track"
     )
-ENDIF ()
+endif ()
 
-INSTALL(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
+install(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
         DESTINATION ../../usr/share/webkit/inspector/
         FILES_MATCHING PATTERN "*.js")
-INSTALL(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
+install(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
         DESTINATION ../../usr/share/webkit/inspector/
         FILES_MATCHING PATTERN "*.css")
-INSTALL(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
+install(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
         DESTINATION ../../usr/share/webkit/inspector/
         FILES_MATCHING PATTERN "*.png")
-INSTALL(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
+install(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
         DESTINATION ../../usr/share/webkit/inspector/
         FILES_MATCHING PATTERN "*.jpg")
-INSTALL(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
+install(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
         DESTINATION ../../usr/share/webkit/inspector/
         FILES_MATCHING PATTERN "*.gif")
-INSTALL(FILES ${DERIVED_SOURCES_WEBCORE_DIR}/inspectorBB.html
+install(FILES ${DERIVED_SOURCES_WEBCORE_DIR}/inspectorBB.html
               ${WEBKIT_DIR}/blackberry/WebCoreSupport/inspectorBB.js
               ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendCommands.js
         DESTINATION ../../usr/share/webkit/inspector/)
 
-IF (NOT PUBLIC_BUILD)
+if (NOT PUBLIC_BUILD)
     # Add the custom target to build the host-side ImageDiff binary.
     # Reuse the Qt version.
-    ADD_CUSTOM_TARGET(
+    add_custom_target(
         ImageDiff ALL
         WORKING_DIRECTORY ${TOOLS_DIR}/DumpRenderTree/blackberry/
         COMMAND ./build
         DEPENDS ${TOOLS_DIR}/DumpRenderTree/qt/ImageDiff.cpp
         COMMENT "ImageDiff building..."
     )
-ENDIF ()
+endif ()
 
-ADD_CUSTOM_TARGET (
+add_custom_target(
     inspector ALL
     command cp ${WEBCORE_DIR}/inspector/front-end/inspector.html ${DERIVED_SOURCES_WEBCORE_DIR}/inspectorBB.html && echo '<script src="inspectorBB.js"></script>'  >> ${DERIVED_SOURCES_WEBCORE_DIR}/inspectorBB.html
     DEPENDS ${WebCore_LIBRARY_NAME}
@@ -291,28 +291,28 @@ ADD_CUSTOM_TARGET (
 )
 
 # Generate contents for AboutData.cpp
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp
     MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in
     DEPENDS ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl HAVE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp
 )
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp
     MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in
     DEPENDS ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl ENABLE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp
 )
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
     MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in
     DEPENDS ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl USE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
 )
 
-ADD_CUSTOM_TARGET(
+add_custom_target(
     aboutFeatures ALL
     DEPENDS ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
 )
index ed7b94d..2736a25 100644 (file)
@@ -1,4 +1,4 @@
-LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+list(APPEND WebKit_INCLUDE_DIRECTORIES
     "${CMAKE_SOURCE_DIR}/Source"
     "${WEBKIT_DIR}/efl/ewk"
     "${WEBKIT_DIR}/efl/WebCoreSupport"
@@ -26,69 +26,69 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
     ${SQLITE_INCLUDE_DIR}
 )
 
-IF (ENABLE_SVG)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/svg"
-    "${WEBCORE_DIR}/svg/animation"
-    "${WEBCORE_DIR}/rendering/svg"
-  )
-ENDIF ()
+if (ENABLE_SVG)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/svg"
+        "${WEBCORE_DIR}/svg/animation"
+        "${WEBCORE_DIR}/rendering/svg"
+    )
+endif ()
 
-IF (ENABLE_VIDEO)
-LIST(APPEND WebKit_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/platform/graphics/gstreamer"
-    ${GSTREAMER_APP_INCLUDE_DIRS}
-    ${GSTREAMER_INTERFACES_INCLUDE_DIRS}
-    ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
-    ${GSTREAMER_VIDEO_INCLUDE_DIRS}
-)
-ENDIF()
+if (ENABLE_VIDEO)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/platform/graphics/gstreamer"
+        ${GSTREAMER_APP_INCLUDE_DIRS}
+        ${GSTREAMER_INTERFACES_INCLUDE_DIRS}
+        ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
+        ${GSTREAMER_VIDEO_INCLUDE_DIRS}
+    )
+endif ()
 
-IF (ENABLE_VIDEO_TRACK)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/html/track"
-  )
-ENDIF ()
+if (ENABLE_VIDEO_TRACK)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/html/track"
+    )
+endif ()
 
-IF (ENABLE_NOTIFICATIONS)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/Modules/notifications"
-  )
-ENDIF ()
+if (ENABLE_NOTIFICATIONS)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/Modules/notifications"
+    )
+endif ()
 
-IF (ENABLE_VIBRATION)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/Modules/vibration"
-  )
-ENDIF ()
+if (ENABLE_VIBRATION)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/Modules/vibration"
+    )
+endif ()
 
-IF (ENABLE_BATTERY_STATUS)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/Modules/battery"
-  )
-ENDIF ()
+if (ENABLE_BATTERY_STATUS)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/Modules/battery"
+    )
+endif ()
 
-IF (ENABLE_NAVIGATOR_CONTENT_UTILS)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/Modules/navigatorcontentutils"
-  )
-ENDIF ()
+if (ENABLE_NAVIGATOR_CONTENT_UTILS)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/Modules/navigatorcontentutils"
+    )
+endif ()
 
-IF (WTF_USE_3D_GRAPHICS)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/platform/graphics/surfaces"
-    "${WEBCORE_DIR}/platform/graphics/texmap"
-    "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
-  )
-ENDIF ()
+if (WTF_USE_3D_GRAPHICS)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/platform/graphics/surfaces"
+        "${WEBCORE_DIR}/platform/graphics/texmap"
+        "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
+    )
+endif ()
 
-IF (ENABLE_GEOLOCATION)
-  LIST(APPEND WebKit_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/Modules/geolocation"
-  )
-ENDIF ()
+if (ENABLE_GEOLOCATION)
+    list(APPEND WebKit_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/Modules/geolocation"
+    )
+endif ()
 
-LIST(APPEND WebKit_SOURCES
+list(APPEND WebKit_SOURCES
     efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp
     efl/WebCoreSupport/AssertMatchingEnums.cpp
     efl/WebCoreSupport/BatteryClientEfl.cpp
@@ -105,11 +105,11 @@ LIST(APPEND WebKit_SOURCES
     efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
     efl/WebCoreSupport/IconDatabaseClientEfl.cpp
     efl/WebCoreSupport/InspectorClientEfl.cpp
-    efl/WebCoreSupport/NavigatorContentUtilsClientEfl.cpp 
+    efl/WebCoreSupport/NavigatorContentUtilsClientEfl.cpp
     efl/WebCoreSupport/NetworkInfoClientEfl.cpp
     efl/WebCoreSupport/NotificationPresenterClientEfl.cpp
     efl/WebCoreSupport/PageClientEfl.cpp
-    efl/WebCoreSupport/PlatformStrategiesEfl.cpp 
+    efl/WebCoreSupport/PlatformStrategiesEfl.cpp
     efl/WebCoreSupport/PopupMenuEfl.cpp
     efl/WebCoreSupport/SearchPopupMenuEfl.cpp
     efl/WebCoreSupport/StorageTrackerClientEfl.cpp
@@ -143,7 +143,7 @@ LIST(APPEND WebKit_SOURCES
     efl/ewk/ewk_web_database.cpp
 )
 
-LIST(APPEND WebKit_LIBRARIES
+list(APPEND WebKit_LIBRARIES
     ${CAIRO_LIBRARIES}
     ${ECORE_LIBRARIES}
     ${ECORE_EVAS_LIBRARIES}
@@ -163,22 +163,22 @@ LIST(APPEND WebKit_LIBRARIES
     ${LIBSOUP_LIBRARIES}
 )
 
-IF (SHARED_CORE)
-    SET(LIBS_PRIVATE "-l${WTF_LIBRARY_NAME} -l${JavaScriptCore_LIBRARY_NAME} -l${WebCore_LIBRARY_NAME}")
-ELSE ()
-    SET(LIBS_PRIVATE "")
-ENDIF ()
+if (SHARED_CORE)
+    set(LIBS_PRIVATE "-l${WTF_LIBRARY_NAME} -l${JavaScriptCore_LIBRARY_NAME} -l${WebCore_LIBRARY_NAME}")
+else ()
+    set(LIBS_PRIVATE "")
+endif ()
 
-CONFIGURE_FILE(
+configure_file(
     efl/ewebkit.pc.in
     ${CMAKE_BINARY_DIR}/WebKit/efl/ewebkit.pc
     @ONLY)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/WebKit/efl/ewebkit.pc
+install(FILES ${CMAKE_BINARY_DIR}/WebKit/efl/ewebkit.pc
     DESTINATION lib/pkgconfig)
 
-UNSET(LIBS_PRIVATE)
+unset(LIBS_PRIVATE)
 
-SET(EWebKit_HEADERS
+set(EWebKit_HEADERS
     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/EWebKit.h
     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_auth.h
     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_contextmenu.h
@@ -199,12 +199,12 @@ SET(EWebKit_HEADERS
     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_web_database.h
 )
 
-INSTALL(FILES ${EWebKit_HEADERS}
+install(FILES ${EWebKit_HEADERS}
         DESTINATION include/${WebKit_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR})
 
-INCLUDE_DIRECTORIES(${THIRDPARTY_DIR}/gtest/include)
+include_directories(${THIRDPARTY_DIR}/gtest/include)
 
-SET(EWKUnitTests_LIBRARIES
+set(EWKUnitTests_LIBRARIES
     ${WTF_LIBRARY_NAME}
     ${JavaScriptCore_LIBRARY_NAME}
     ${WebCore_LIBRARY_NAME}
@@ -216,7 +216,7 @@ SET(EWKUnitTests_LIBRARIES
     gtest
 )
 
-SET(EWKUnitTests_INCLUDE_DIRECTORIES
+set(EWKUnitTests_INCLUDE_DIRECTORIES
     "${CMAKE_SOURCE_DIR}/Source"
     "${WEBKIT_DIR}/efl/ewk"
     "${JAVASCRIPTCORE_DIR}"
@@ -228,41 +228,41 @@ SET(EWKUnitTests_INCLUDE_DIRECTORIES
     ${EDJE_INCLUDE_DIRS}
 )
 
-LIST(APPEND EWKUnitTests_INCLUDE_DIRECTORIES "${WTF_DIR}/wtf/gobject")
-LIST(APPEND EWKUnitTests_LIBRARIES
+list(APPEND EWKUnitTests_INCLUDE_DIRECTORIES "${WTF_DIR}/wtf/gobject")
+list(APPEND EWKUnitTests_LIBRARIES
     ${GLIB_LIBRARIES}
     ${GLIB_GTHREAD_LIBRARIES}
 )
 
-SET(DEFAULT_TEST_PAGE_DIR ${CMAKE_SOURCE_DIR}/Source/WebKit/efl/tests/resources)
+set(DEFAULT_TEST_PAGE_DIR ${CMAKE_SOURCE_DIR}/Source/WebKit/efl/tests/resources)
 
-ADD_DEFINITIONS(-DDEFAULT_TEST_PAGE_DIR=\"${DEFAULT_TEST_PAGE_DIR}\"
+add_definitions(-DDEFAULT_TEST_PAGE_DIR=\"${DEFAULT_TEST_PAGE_DIR}\"
     -DDEFAULT_THEME_PATH=\"${THEME_BINARY_DIR}\"
     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
 )
 
-ADD_LIBRARY(ewkTestUtils
+add_library(ewkTestUtils
     ${WEBKIT_DIR}/efl/tests/UnitTestUtils/EWKTestBase.cpp
     ${WEBKIT_DIR}/efl/tests/UnitTestUtils/EWKTestEnvironment.cpp
     ${WEBKIT_DIR}/efl/tests/UnitTestUtils/EWKTestView.cpp
 )
-TARGET_LINK_LIBRARIES(ewkTestUtils ${EWKUnitTests_LIBRARIES})
+target_link_libraries(ewkTestUtils ${EWKUnitTests_LIBRARIES})
 
-SET(WEBKIT_EFL_TEST_DIR "${WEBKIT_DIR}/efl/tests/")
+set(WEBKIT_EFL_TEST_DIR "${WEBKIT_DIR}/efl/tests/")
 
-SET(EWKUnitTests_BINARIES
+set(EWKUnitTests_BINARIES
     test_ewk_contextmenu
     test_ewk_frame
     test_ewk_view
 )
 
-IF (ENABLE_API_TESTS)
-    FOREACH (testName ${EWKUnitTests_BINARIES})
-        ADD_EXECUTABLE(${testName} ${WEBKIT_EFL_TEST_DIR}/${testName}.cpp ${WEBKIT_EFL_TEST_DIR}/test_runner.cpp)
-        ADD_TEST(${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${testName})
-        SET_TESTS_PROPERTIES(${testName} PROPERTIES TIMEOUT 60)
-        TARGET_LINK_LIBRARIES(${testName} ${EWKUnitTests_LIBRARIES} ewkTestUtils)
-        SET_TARGET_PROPERTIES(${testName} PROPERTIES FOLDER "WebKit")
-    ENDFOREACH ()
-ENDIF ()
+if (ENABLE_API_TESTS)
+    foreach (testName ${EWKUnitTests_BINARIES})
+        add_executable(${testName} ${WEBKIT_EFL_TEST_DIR}/${testName}.cpp ${WEBKIT_EFL_TEST_DIR}/test_runner.cpp)
+        add_test(${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${testName})
+        set_tests_properties(${testName} PROPERTIES TIMEOUT 60)
+        target_link_libraries(${testName} ${EWKUnitTests_LIBRARIES} ewkTestUtils)
+        set_target_properties(${testName} PROPERTIES FOLDER "WebKit")
+    endforeach ()
+endif ()
 
index de6de60..8ad2a3a 100644 (file)
@@ -1,4 +1,4 @@
-LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+list(APPEND WebKit_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/page/win"
     "${WEBCORE_DIR}/platform/graphics/wince"
     "${WEBCORE_DIR}/platform/graphics/win"
@@ -9,7 +9,7 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
     wince/WebCoreSupport
 )
 
-LIST(APPEND WebKit_SOURCES
+list(APPEND WebKit_SOURCES
     wince/WebView.h
     wince/WebView.cpp
 
@@ -23,4 +23,4 @@ LIST(APPEND WebKit_SOURCES
     wince/WebCoreSupport/PlatformStrategiesWinCE.cpp
 )
 
-SET(WebKit_LIBRARY_TYPE STATIC)
+set(WebKit_LIBRARY_TYPE STATIC)
index 7a46a47..03ccadd 100644 (file)
@@ -1,3 +1,30 @@
+2012-12-05  Halton Huo  <halton.huo@intel.com>
+
+        [CMake] Unify coding style for CMake files
+        https://bugs.webkit.org/show_bug.cgi?id=103605
+
+        Reviewed by Laszlo Gombos.
+
+        Update cmake files(.cmake, CMakeLists.txt) with following style rules:
+        1. Indentation
+        1.1 Use spaces, not tabs.
+        1.2 Four spaces as indent.
+        2. Spacing
+        2.1 Place one space between control statements and their parentheses.
+            For eg, if (), else (), elseif (), endif (), foreach (),
+            endforeach (), while (), endwhile (), break ().
+        2.2 Do not place spaces between function and macro statements and
+            their parentheses. For eg, macro(), endmacro(), function(),
+            endfunction().
+        2.3 Do not place spaces between a command or function or macro and its
+            parentheses, or between a parenthesis and its content. For eg,
+            message("testing") not message( "testing") or message ("testing" )
+        2.4 No space at line ending.
+        3. Lowercase when call commands macros and functions. For eg,
+           add_executable() not ADD_EXECUTABLE(), set() not SET().
+
+        * DefaultTheme/CMakeLists.txt:
+
 2012-11-30  Mihai Maerean  <mmaerean@adobe.com>
 
         [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
index ded4108..9e01683 100644 (file)
@@ -1,7 +1,7 @@
-MACRO (GENERATE_THEME _target_name _name _option)
-    SET(DefaultTheme_DIR "${WEBKIT_DIR}/efl/DefaultTheme")
+macro(GENERATE_THEME _target_name _name _option)
+    set(DefaultTheme_DIR "${WEBKIT_DIR}/efl/DefaultTheme")
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${THEME_BINARY_DIR}/${_name}
         COMMAND ${EDJE_CC_EXECUTABLE} -v ${_option} default.edc ${THEME_BINARY_DIR}/${_name}
         DEPENDS
@@ -98,19 +98,19 @@ MACRO (GENERATE_THEME _target_name _name _option)
         VERBATIM
     )
 
-    ADD_CUSTOM_TARGET(${_target_name} ALL
+    add_custom_target(${_target_name} ALL
         DEPENDS ${THEME_BINARY_DIR}/${_name}
     )
-ENDMACRO()
+endmacro()
 
-SET(DefaultTheme_DEFINITION "")
-IF (ENABLE_PROGRESS_ELEMENT)
-    LIST(APPEND DefaultTheme_DEFINITION "-DENABLE_PROGRESS_ELEMENT")
-ENDIF ()
+set(DefaultTheme_DEFINITION "")
+if (ENABLE_PROGRESS_ELEMENT)
+    list(APPEND DefaultTheme_DEFINITION "-DENABLE_PROGRESS_ELEMENT")
+endif ()
 
 GENERATE_THEME(DefaultTheme "default.edj" "${DefaultTheme_DEFINITION}")
-INSTALL(FILES "${THEME_BINARY_DIR}/default.edj" DESTINATION ${DATA_INSTALL_DIR}/themes)
+install(FILES "${THEME_BINARY_DIR}/default.edj" DESTINATION ${DATA_INSTALL_DIR}/themes)
 
-IF (ENABLE_API_TESTS)
+if (ENABLE_API_TESTS)
     GENERATE_THEME(BigButtonTheme "big_button_theme.edj" "-DBIG_BUTTON_THEME_FOR_TESTING")
-ENDIF ()
+endif ()
index 187853f..2f4b3c6 100644 (file)
@@ -1,4 +1,4 @@
-SET(WebKit2_INCLUDE_DIRECTORIES
+set(WebKit2_INCLUDE_DIRECTORIES
     "${WEBKIT2_DIR}"
     "${WEBKIT2_DIR}/Platform"
     "${WEBKIT2_DIR}/Platform/CoreIPC"
@@ -112,7 +112,7 @@ SET(WebKit2_INCLUDE_DIRECTORIES
     "${CMAKE_SOURCE_DIR}/Source"
 )
 
-SET(WebKit2_SOURCES
+set(WebKit2_SOURCES
     Platform/Logging.cpp
     Platform/Module.cpp
     Platform/WorkQueue.cpp
@@ -348,7 +348,7 @@ SET(WebKit2_SOURCES
     UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp
     UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp
     UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
-    
+
     UIProcess/Downloads/DownloadProxy.cpp
 
     UIProcess/InspectorServer/WebInspectorServer.cpp
@@ -502,7 +502,7 @@ SET(WebKit2_SOURCES
     WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp
 )
 
-SET(WebKit2_MESSAGES_IN_FILES
+set(WebKit2_MESSAGES_IN_FILES
     PluginProcess/PluginControllerProxy.messages.in
     PluginProcess/PluginProcess.messages.in
     PluginProcess/WebProcessConnection.messages.in
@@ -531,7 +531,7 @@ SET(WebKit2_MESSAGES_IN_FILES
 
 
     UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in
-    
+
     UIProcess/Downloads/DownloadProxy.messages.in
 
     UIProcess/Notifications/WebNotificationManagerProxy.messages.in
@@ -578,24 +578,24 @@ SET(WebKit2_MESSAGES_IN_FILES
     WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.messages.in
 )
 
-SET(WebProcess_EXECUTABLE_NAME WebProcess)
+set(WebProcess_EXECUTABLE_NAME WebProcess)
 
-SET(WebProcess_LIBRARIES
+set(WebProcess_LIBRARIES
     ${JavaScriptCore_LIBRARY_NAME}
     ${WebCore_LIBRARY_NAME}
     ${WebKit2_LIBRARY_NAME}
 )
 
-SET(WebKit2_LIBRARIES
+set(WebKit2_LIBRARIES
     ${WebCore_LIBRARY_NAME}
 )
 
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 # Create JavaScript C++ code given an IDL input
-FOREACH (_file ${WebKit2_MESSAGES_IN_FILES})
-    GET_FILENAME_COMPONENT (_name ${_file} NAME_WE)
-    ADD_CUSTOM_COMMAND(
+foreach (_file ${WebKit2_MESSAGES_IN_FILES})
+    get_filename_component(_name ${_file} NAME_WE)
+    add_custom_command(
         OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}Messages.h
         MAIN_DEPENDENCY ${_file}
         DEPENDS ${WEBKIT2_DIR}/Scripts/webkit2/__init__.py
@@ -607,25 +607,25 @@ FOREACH (_file ${WebKit2_MESSAGES_IN_FILES})
         WORKING_DIRECTORY ${WEBKIT2_DIR}
         VERBATIM)
 
-    LIST(APPEND WebKit2_SOURCES ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp)
-ENDFOREACH ()
+    list(APPEND WebKit2_SOURCES ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp)
+endforeach ()
 
-ADD_DEFINITIONS(-DBUILDING_WEBKIT)
-INCLUDE_DIRECTORIES(${WebKit2_INCLUDE_DIRECTORIES})
-ADD_LIBRARY(${WebKit2_LIBRARY_NAME} ${WebKit2_LIBRARY_TYPE} ${WebKit2_SOURCES})
+add_definitions(-DBUILDING_WEBKIT)
+include_directories(${WebKit2_INCLUDE_DIRECTORIES})
+add_library(${WebKit2_LIBRARY_NAME} ${WebKit2_LIBRARY_TYPE} ${WebKit2_SOURCES})
 
-ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${WebCore_LIBRARY_NAME})
-ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingHeaders_NAME})
-ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingNetworkHeaders_NAME})
-TARGET_LINK_LIBRARIES(${WebKit2_LIBRARY_NAME} ${WebKit2_LIBRARIES})
-SET_TARGET_PROPERTIES(${WebKit2_LIBRARY_NAME} PROPERTIES FOLDER "WebKit")
-SET_TARGET_PROPERTIES(${WebKit2_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
+add_dependencies(${WebKit2_LIBRARY_NAME} ${WebCore_LIBRARY_NAME})
+add_dependencies(${WebKit2_LIBRARY_NAME} ${ForwardingHeaders_NAME})
+add_dependencies(${WebKit2_LIBRARY_NAME} ${ForwardingNetworkHeaders_NAME})
+target_link_libraries(${WebKit2_LIBRARY_NAME} ${WebKit2_LIBRARIES})
+set_target_properties(${WebKit2_LIBRARY_NAME} PROPERTIES FOLDER "WebKit")
+set_target_properties(${WebKit2_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
 
-ADD_EXECUTABLE(${WebProcess_EXECUTABLE_NAME} ${WebProcess_SOURCES})
-TARGET_LINK_LIBRARIES(${WebProcess_EXECUTABLE_NAME} ${WebProcess_LIBRARIES})
-SET_TARGET_PROPERTIES(${WebProcess_EXECUTABLE_NAME} PROPERTIES FOLDER "WebKit")
+add_executable(${WebProcess_EXECUTABLE_NAME} ${WebProcess_SOURCES})
+target_link_libraries(${WebProcess_EXECUTABLE_NAME} ${WebProcess_LIBRARIES})
+set_target_properties(${WebProcess_EXECUTABLE_NAME} PROPERTIES FOLDER "WebKit")
 
-SET_TARGET_PROPERTIES(${WebKit2_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
+set_target_properties(${WebKit2_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
 
-INSTALL(TARGETS ${WebKit2_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
-INSTALL(TARGETS ${WebProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
+install(TARGETS ${WebKit2_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
+install(TARGETS ${WebProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
index cccf555..aca6610 100644 (file)
@@ -1,3 +1,33 @@
+2012-12-05  Halton Huo  <halton.huo@intel.com>
+
+        [CMake] Unify coding style for CMake files
+        https://bugs.webkit.org/show_bug.cgi?id=103605
+
+        Reviewed by Laszlo Gombos.
+
+        Update cmake files(.cmake, CMakeLists.txt) with following style rules:
+        1. Indentation
+        1.1 Use spaces, not tabs.
+        1.2 Four spaces as indent.
+        2. Spacing
+        2.1 Place one space between control statements and their parentheses.
+            For eg, if (), else (), elseif (), endif (), foreach (),
+            endforeach (), while (), endwhile (), break ().
+        2.2 Do not place spaces between function and macro statements and
+            their parentheses. For eg, macro(), endmacro(), function(),
+            endfunction().
+        2.3 Do not place spaces between a command or function or macro and its
+            parentheses, or between a parenthesis and its content. For eg,
+            message("testing") not message( "testing") or message ("testing" )
+        2.4 No space at line ending.
+        3. Lowercase when call commands macros and functions. For eg,
+           add_executable() not ADD_EXECUTABLE(), set() not SET().
+
+        * CMakeLists.txt:
+        * PlatformEfl.cmake:
+        * win/WebKit2ExportGenerator.vcproj:
+        * win/WebKit2ExportGeneratorCommon.vsprops:
+
 2012-12-05  Huang Dongsung  <luxtella@company100.net>
 
         Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy
index dde7c5b..56019b6 100644 (file)
@@ -1,4 +1,4 @@
-LIST(APPEND WebKit2_SOURCES
+list(APPEND WebKit2_SOURCES
     Platform/efl/LoggingEfl.cpp
     Platform/efl/ModuleEfl.cpp
     Platform/efl/WorkQueueEfl.cpp
@@ -35,7 +35,7 @@ LIST(APPEND WebKit2_SOURCES
     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
 
     UIProcess/API/C/efl/WKView.cpp
-    
+
     UIProcess/API/cpp/efl/WKEinaSharedString.cpp
 
     UIProcess/API/C/soup/WKContextSoup.cpp
@@ -147,12 +147,12 @@ LIST(APPEND WebKit2_SOURCES
     WebProcess/soup/WebKitSoupRequestInputStream.cpp
 )
 
-LIST(APPEND WebKit2_MESSAGES_IN_FILES
+list(APPEND WebKit2_MESSAGES_IN_FILES
     UIProcess/soup/WebSoupRequestManagerProxy.messages.in
     WebProcess/soup/WebSoupRequestManager.messages.in
 )
 
-LIST(APPEND WebKit2_INCLUDE_DIRECTORIES
+list(APPEND WebKit2_INCLUDE_DIRECTORIES
     "${JAVASCRIPTCORE_DIR}/llint"
     "${WEBCORE_DIR}/platform/efl"
     "${WEBCORE_DIR}/platform/graphics/cairo"
@@ -191,13 +191,13 @@ LIST(APPEND WebKit2_INCLUDE_DIRECTORIES
     ${WTF_DIR}
 )
 
-IF (WTF_USE_3D_GRAPHICS)
-    LIST(APPEND WebKit2_INCLUDE_DIRECTORIES
+if (WTF_USE_3D_GRAPHICS)
+    list(APPEND WebKit2_INCLUDE_DIRECTORIES
         "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
     )
-ENDIF ()
+endif ()
 
-LIST(APPEND WebKit2_LIBRARIES
+list(APPEND WebKit2_LIBRARIES
     ${CAIRO_LIBRARIES}
     ${ECORE_LIBRARIES}
     ${ECORE_EVAS_LIBRARIES}
@@ -220,11 +220,11 @@ LIST(APPEND WebKit2_LIBRARIES
     ${LIBSOUP_LIBRARIES}
 )
 
-LIST (APPEND WebProcess_SOURCES
+list(APPEND WebProcess_SOURCES
     efl/MainEfl.cpp
 )
 
-LIST (APPEND WebProcess_LIBRARIES
+list(APPEND WebProcess_LIBRARIES
     ${CAIRO_LIBRARIES}
     ${ECORE_IMF_LIBRARIES}
     ${EDJE_LIBRARIES}
@@ -236,24 +236,24 @@ LIST (APPEND WebProcess_LIBRARIES
     ${SQLITE_LIBRARIES}
 )
 
-IF (ENABLE_ECORE_X)
-    LIST(APPEND WebProcess_LIBRARIES
+if (ENABLE_ECORE_X)
+    list(APPEND WebProcess_LIBRARIES
         ${ECORE_X_LIBRARIES}
         ${X11_Xext_LIB})
-ENDIF ()
+endif ()
 
-ADD_CUSTOM_TARGET(forwarding-headerEfl
+add_custom_target(forwarding-headerEfl
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
 )
-SET(ForwardingHeaders_NAME forwarding-headerEfl)
+set(ForwardingHeaders_NAME forwarding-headerEfl)
 
-ADD_CUSTOM_TARGET(forwarding-headerSoup
+add_custom_target(forwarding-headerSoup
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
 )
-SET(ForwardingNetworkHeaders_NAME forwarding-headerSoup)
+set(ForwardingNetworkHeaders_NAME forwarding-headerSoup)
 
-CONFIGURE_FILE(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @ONLY)
-SET (EWebKit2_HEADERS
+configure_file(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @ONLY)
+set(EWebKit2_HEADERS
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/EWebKit2.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_auth_request.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list.h"
@@ -289,35 +289,35 @@ SET (EWebKit2_HEADERS
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_window_features.h"
 )
 
-INSTALL(FILES ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc DESTINATION lib/pkgconfig)
-INSTALL(FILES ${EWebKit2_HEADERS} DESTINATION include/${WebKit2_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR})
+install(FILES ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc DESTINATION lib/pkgconfig)
+install(FILES ${EWebKit2_HEADERS} DESTINATION include/${WebKit2_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR})
 
-IF (ENABLE_PLUGIN_PROCESS)
-    ADD_DEFINITIONS(-DENABLE_PLUGIN_PROCESS=1)
+if (ENABLE_PLUGIN_PROCESS)
+    add_definitions(-DENABLE_PLUGIN_PROCESS=1)
 
-    SET (PluginProcess_EXECUTABLE_NAME PluginProcess)
-    LIST (APPEND PluginProcess_INCLUDE_DIRECTORIES
+    set(PluginProcess_EXECUTABLE_NAME PluginProcess)
+    list(APPEND PluginProcess_INCLUDE_DIRECTORIES
         "${WEBKIT2_DIR}/PluginProcess/unix"
     )
 
-    INCLUDE_DIRECTORIES(${PluginProcess_INCLUDE_DIRECTORIES})
+    include_directories(${PluginProcess_INCLUDE_DIRECTORIES})
 
-    LIST (APPEND PluginProcess_SOURCES
+    list(APPEND PluginProcess_SOURCES
         ${WEBKIT2_DIR}/unix/PluginMainUnix.cpp
     )
 
-    SET(PluginProcess_LIBRARIES
+    set(PluginProcess_LIBRARIES
         ${WebKit2_LIBRARY_NAME}
     )
 
-    ADD_EXECUTABLE(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_SOURCES})
-    TARGET_LINK_LIBRARIES(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_LIBRARIES})
-    INSTALL(TARGETS ${PluginProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
-ENDIF () # ENABLE_PLUGIN_PROCESS
+    add_executable(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_SOURCES})
+    target_link_libraries(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_LIBRARIES})
+    install(TARGETS ${PluginProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
+endif () # ENABLE_PLUGIN_PROCESS
 
-INCLUDE_DIRECTORIES(${THIRDPARTY_DIR}/gtest/include)
+include_directories(${THIRDPARTY_DIR}/gtest/include)
 
-SET(EWK2UnitTests_LIBRARIES
+set(EWK2UnitTests_LIBRARIES
     ${WTF_LIBRARY_NAME}
     ${JavaScriptCore_LIBRARY_NAME}
     ${WebCore_LIBRARY_NAME}
@@ -333,18 +333,18 @@ SET(EWK2UnitTests_LIBRARIES
     gtest
 )
 
-IF (ENABLE_GLIB_SUPPORT)
-    LIST(APPEND EWK2UnitTests_LIBRARIES
+if (ENABLE_GLIB_SUPPORT)
+    list(APPEND EWK2UnitTests_LIBRARIES
         ${GLIB_LIBRARIES}
         ${GLIB_GTHREAD_LIBRARIES}
     )
-ENDIF()
+endif ()
 
-SET(WEBKIT2_EFL_TEST_DIR "${WEBKIT2_DIR}/UIProcess/API/efl/tests")
-SET(TEST_RESOURCES_DIR ${WEBKIT2_EFL_TEST_DIR}/resources)
-SET(TEST_INJECTED_BUNDLE_DIR ${WEBKIT2_EFL_TEST_DIR}/InjectedBundle)
+set(WEBKIT2_EFL_TEST_DIR "${WEBKIT2_DIR}/UIProcess/API/efl/tests")
+set(TEST_RESOURCES_DIR ${WEBKIT2_EFL_TEST_DIR}/resources)
+set(TEST_INJECTED_BUNDLE_DIR ${WEBKIT2_EFL_TEST_DIR}/InjectedBundle)
 
-ADD_DEFINITIONS(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
+add_definitions(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
     -DTEST_LIB_DIR=\"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\"
     -DTEST_THEME_DIR=\"${THEME_BINARY_DIR}\"
     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
@@ -353,18 +353,18 @@ ADD_DEFINITIONS(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
     -DPLUGINPROCESSNAME=\"${PluginProcess_EXECUTABLE_NAME}\"
 )
 
-ADD_LIBRARY(ewk2UnitTestUtils
+add_library(ewk2UnitTestUtils
     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestBase.cpp
     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestEnvironment.cpp
     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestMain.cpp
     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestServer.cpp
 )
 
-TARGET_LINK_LIBRARIES(ewk2UnitTestUtils ${EWK2UnitTests_LIBRARIES})
+target_link_libraries(ewk2UnitTestUtils ${EWK2UnitTests_LIBRARIES})
 
 # The "ewk" on the test name needs to be suffixed with "2", otherwise it
 # will clash with tests from the WebKit 1 test suite.
-SET(EWK2UnitTests_BINARIES
+set(EWK2UnitTests_BINARIES
     test_ewk2_auth_request
     test_ewk2_back_forward_list
     test_ewk2_color_picker
@@ -388,23 +388,23 @@ SET(EWK2UnitTests_BINARIES
     test_ewk2_window_features
 )
 
-IF (ENABLE_API_TESTS)
-    FOREACH (testName ${EWK2UnitTests_BINARIES})
-        ADD_EXECUTABLE(${testName} ${WEBKIT2_EFL_TEST_DIR}/${testName}.cpp)
-        ADD_TEST(${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${testName})
-        SET_TESTS_PROPERTIES(${testName} PROPERTIES TIMEOUT 60)
-        TARGET_LINK_LIBRARIES(${testName} ${EWK2UnitTests_LIBRARIES} ewk2UnitTestUtils)
-    ENDFOREACH ()
+if (ENABLE_API_TESTS)
+    foreach (testName ${EWK2UnitTests_BINARIES})
+        add_executable(${testName} ${WEBKIT2_EFL_TEST_DIR}/${testName}.cpp)
+        add_test(${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${testName})
+        set_tests_properties(${testName} PROPERTIES TIMEOUT 60)
+        target_link_libraries(${testName} ${EWK2UnitTests_LIBRARIES} ewk2UnitTestUtils)
+    endforeach ()
 
-    ADD_LIBRARY(ewk2UnitTestInjectedBundleSample SHARED ${TEST_INJECTED_BUNDLE_DIR}/injected_bundle_sample.cpp)
-    TARGET_LINK_LIBRARIES(ewk2UnitTestInjectedBundleSample ${WebKit2_LIBRARY_NAME})
-ENDIF ()
+    add_library(ewk2UnitTestInjectedBundleSample SHARED ${TEST_INJECTED_BUNDLE_DIR}/injected_bundle_sample.cpp)
+    target_link_libraries(ewk2UnitTestInjectedBundleSample ${WebKit2_LIBRARY_NAME})
+endif ()
 
-IF (ENABLE_SPELLCHECK)
-    LIST(APPEND WebKit2_INCLUDE_DIRECTORIES
+if (ENABLE_SPELLCHECK)
+    list(APPEND WebKit2_INCLUDE_DIRECTORIES
         ${ENCHANT_INCLUDE_DIRS}
     )
-    LIST(APPEND WebKit2_LIBRARIES
+    list(APPEND WebKit2_LIBRARIES
         ${ENCHANT_LIBRARIES}
     )
-ENDIF()
+endif ()
index bf8fbf4..39d4b5b 100644 (file)
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-INCLUDE(CMakeParseArguments)
+include(CMakeParseArguments)
 
-FUNCTION(FIND_EFL_LIBRARY _name)
+function(FIND_EFL_LIBRARY _name)
     CMAKE_PARSE_ARGUMENTS(PARAM "" "LIBRARY" "HEADERS;HEADER_PREFIXES" ${ARGN})
 
-    STRING(TOUPPER ${_name} _name_upper)
-    SET(_version_found FALSE)
+    string(TOUPPER ${_name} _name_upper)
+    set(_version_found FALSE)
 
-    FOREACH (_current_header ${PARAM_HEADERS})
-        FIND_PATH(${_current_header}_INCLUDE_DIR NAMES ${_current_header} PATH_SUFFIXES ${PARAM_HEADER_PREFIXES})
-        LIST(APPEND ${_name}_INCLUDE_DIRS "${${_current_header}_INCLUDE_DIR}")
+    foreach (_current_header ${PARAM_HEADERS})
+        find_path(${_current_header}_INCLUDE_DIR NAMES ${_current_header} PATH_SUFFIXES ${PARAM_HEADER_PREFIXES})
+        list(APPEND ${_name}_INCLUDE_DIRS "${${_current_header}_INCLUDE_DIR}")
 
-        IF (NOT _version_found)
-            SET (_header_path "${${_current_header}_INCLUDE_DIR}/${_current_header}")
-            IF (EXISTS ${_header_path})
-                FILE(READ "${_header_path}" _header_contents)
+        if (NOT _version_found)
+            set(_header_path "${${_current_header}_INCLUDE_DIR}/${_current_header}")
+            if (EXISTS ${_header_path})
+                file(READ "${_header_path}" _header_contents)
 
-                STRING(REGEX MATCH "#define +${_name_upper}_VERSION_MAJOR +([0-9]+)" _dummy "${_header_contents}")
-                SET(_version_major "${CMAKE_MATCH_1}")
-                STRING(REGEX MATCH "#define +${_name_upper}_VERSION_MINOR +([0-9]+)" _dummy "${_header_contents}")
-                SET(_version_minor "${CMAKE_MATCH_1}")
+                string(REGEX MATCH "#define +${_name_upper}_VERSION_MAJOR +([0-9]+)" _dummy "${_header_contents}")
+                set(_version_major "${CMAKE_MATCH_1}")
+                string(REGEX MATCH "#define +${_name_upper}_VERSION_MINOR +([0-9]+)" _dummy "${_header_contents}")
+                set(_version_minor "${CMAKE_MATCH_1}")
 
-                IF (_version_major AND _version_minor)
-                    SET(_version_found TRUE)
-                ENDIF ()
-            ENDIF ()
-        ENDIF ()
-    ENDFOREACH ()
+                if (_version_major AND _version_minor)
+                    set(_version_found TRUE)
+                endif ()
+            endif ()
+        endif ()
+    endforeach ()
 
-    FIND_LIBRARY(${_name}_LIBRARIES NAMES ${PARAM_LIBRARY})
+    find_library(${_name}_LIBRARIES NAMES ${PARAM_LIBRARY})
 
-    SET(${_name}_INCLUDE_DIRS ${${_name}_INCLUDE_DIRS} PARENT_SCOPE)
-    SET(${_name}_LIBRARIES ${${_name}_LIBRARIES} PARENT_SCOPE)
-    SET(${_name}_VERSION "${_version_major}.${_version_minor}" PARENT_SCOPE)
-ENDFUNCTION()
+    set(${_name}_INCLUDE_DIRS ${${_name}_INCLUDE_DIRS} PARENT_SCOPE)
+    set(${_name}_LIBRARIES ${${_name}_LIBRARIES} PARENT_SCOPE)
+    set(${_name}_VERSION "${_version_major}.${_version_minor}" PARENT_SCOPE)
+endfunction()
index c58ba92..e043c1a 100644 (file)
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_ATK atk)
+find_package(PkgConfig)
+pkg_check_modules(PC_ATK atk)
 
-FIND_PATH(ATK_INCLUDE_DIRS
+find_path(ATK_INCLUDE_DIRS
     NAMES atk/atk.h
     HINTS ${PC_ATK_INCLUDEDIR}
           ${PC_ATK_INCLUDE_DIRS}
     PATH_SUFFIXES atk-1.0
 )
 
-FIND_LIBRARY(ATK_LIBRARIES
+find_library(ATK_LIBRARIES
     NAMES atk-1.0
     HINTS ${PC_ATK_LIBRARY_DIRS}
           ${PC_ATK_LIBDIR}
index 4d60ec4..71e7568 100644 (file)
@@ -5,14 +5,14 @@
 #  CFLITE_INCLUDE_DIR - The CFLite include directory
 #  CFLITE_LIBRARIES - The libraries needed to use CFLite
 
-FIND_PATH(CFLITE_INCLUDE_DIR NAMES CoreFoundation/CoreFoundation.h)
+find_path(CFLITE_INCLUDE_DIR NAMES CoreFoundation/CoreFoundation.h)
 
-FIND_LIBRARY(CFLITE_LIBRARIES NAMES CFLite.lib)
+find_library(CFLITE_LIBRARIES NAMES CFLite.lib)
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 
 # handle the QUIETLY and REQUIRED arguments and set COREFOUNDATION_FOUND to TRUE if
 # all listed variables are TRUE
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CFLite DEFAULT_MSG CFLITE_LIBRARIES CFLITE_INCLUDE_DIR)
 
-MARK_AS_ADVANCED(CFLITE_INCLUDE_DIR CFLITE_LIBRARIES)
+mark_as_advanced(CFLITE_INCLUDE_DIR CFLITE_LIBRARIES)
index 1a768e3..ddc8de7 100644 (file)
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_CAIRO cairo) # FIXME: After we require CMake 2.8.2 we can pass QUIET to this call.
+find_package(PkgConfig)
+pkg_check_modules(PC_CAIRO cairo) # FIXME: After we require CMake 2.8.2 we can pass QUIET to this call.
 
-FIND_PATH(CAIRO_INCLUDE_DIRS
+find_path(CAIRO_INCLUDE_DIRS
     NAMES cairo.h
     HINTS ${PC_CAIRO_INCLUDEDIR}
           ${PC_CAIRO_INCLUDE_DIRS}
     PATH_SUFFIXES cairo
 )
 
-FIND_LIBRARY(CAIRO_LIBRARIES
+find_library(CAIRO_LIBRARIES
     NAMES cairo
     HINTS ${PC_CAIRO_LIBDIR}
           ${PC_CAIRO_LIBRARY_DIRS}
 )
 
-IF (CAIRO_INCLUDE_DIRS)
-    IF (EXISTS "${CAIRO_INCLUDE_DIRS}/cairo-version.h")
-        FILE(READ "${CAIRO_INCLUDE_DIRS}/cairo-version.h" CAIRO_VERSION_CONTENT)
+if (CAIRO_INCLUDE_DIRS)
+    if (EXISTS "${CAIRO_INCLUDE_DIRS}/cairo-version.h")
+        file(READ "${CAIRO_INCLUDE_DIRS}/cairo-version.h" CAIRO_VERSION_CONTENT)
 
-        STRING(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
-        SET(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}")
+        string(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
+        set(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}")
 
-        STRING(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
-        SET(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}")
+        string(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
+        set(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}")
 
-        STRING(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
-        SET(CAIRO_VERSION_MICRO "${CMAKE_MATCH_1}")
+        string(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
+        set(CAIRO_VERSION_MICRO "${CMAKE_MATCH_1}")
 
-        SET(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_MICRO}")
-    ENDIF ()
-ENDIF ()
+        set(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_MICRO}")
+    endif ()
+endif ()
 
 # FIXME: Should not be needed anymore once we start depending on CMake 2.8.3
-SET(VERSION_OK TRUE)
-IF (Cairo_FIND_VERSION)
-    IF (Cairo_FIND_VERSION_EXACT)
-        IF ("${Cairo_FIND_VERSION}" VERSION_EQUAL "${CAIRO_VERSION}")
-            # FIXME: Use IF (NOT ...) with CMake 2.8.2+ to get rid of the ELSE block
-        ELSE ()
-            SET(VERSION_OK FALSE)
-        ENDIF ()
-    ELSE ()
-        IF ("${Cairo_FIND_VERSION}" VERSION_GREATER "${CAIRO_VERSION}")
-            SET(VERSION_OK FALSE)
-        ENDIF ()
-    ENDIF ()
-ENDIF ()
+set(VERSION_OK TRUE)
+if (Cairo_FIND_VERSION)
+    if (Cairo_FIND_VERSION_EXACT)
+        if ("${Cairo_FIND_VERSION}" VERSION_EQUAL "${CAIRO_VERSION}")
+            # FIXME: Use if (NOT ...) with CMake 2.8.2+ to get rid of the ELSE block
+        else ()
+            set(VERSION_OK FALSE)
+        endif ()
+    else ()
+        if ("${Cairo_FIND_VERSION}" VERSION_GREATER "${CAIRO_VERSION}")
+            set(VERSION_OK FALSE)
+        endif ()
+    endif ()
+endif ()
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cairo DEFAULT_MSG CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES VERSION_OK)
index 4a1a180..f4752e8 100644 (file)
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_DBUS QUIET dbus-1)
+find_package(PkgConfig)
+pkg_check_modules(PC_DBUS QUIET dbus-1)
 
-FIND_LIBRARY(DBUS_LIBRARIES
+find_library(DBUS_LIBRARIES
     NAMES dbus-1
     HINTS ${PC_DBUS_LIBDIR}
           ${PC_DBUS_LIBRARY_DIRS}
 )
 
-FIND_PATH(DBUS_INCLUDE_DIR
+find_path(DBUS_INCLUDE_DIR
     NAMES dbus/dbus.h
     HINTS ${PC_DBUS_INCLUDEDIR}
           ${PC_DBUS_INCLUDE_DIRS}
 )
 
-GET_FILENAME_COMPONENT(_DBUS_LIBRARY_DIR ${DBUS_LIBRARIES} PATH)
-FIND_PATH(DBUS_ARCH_INCLUDE_DIR
+get_filename_component(_DBUS_LIBRARY_DIR ${DBUS_LIBRARIES} PATH)
+find_path(DBUS_ARCH_INCLUDE_DIR
     NAMES dbus/dbus-arch-deps.h
     HINTS ${PC_DBUS_INCLUDEDIR}
           ${PC_DBUS_INCLUDE_DIRS}
@@ -53,7 +53,7 @@ FIND_PATH(DBUS_ARCH_INCLUDE_DIR
     PATH_SUFFIXES include
 )
 
-SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
+set(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES)
index 41787c9..7aac8d4 100644 (file)
@@ -6,24 +6,24 @@
 #  DirectX_FOUND, If false, do not try to use DirectX.\r
 #  DirectX_ROOT_DIR, directory where DirectX was installed.\r
 \r
-FIND_PATH(DirectX_INCLUDE_DIRS d3d9.h PATHS\r
+find_path(DirectX_INCLUDE_DIRS d3d9.h PATHS\r
     "$ENV{DXSDK_DIR}/Include"\r
     "$ENV{PROGRAMFILES}/Microsoft DirectX SDK*/Include"\r
 )\r
 \r
-GET_FILENAME_COMPONENT(DirectX_ROOT_DIR "${DirectX_INCLUDE_DIRS}/.." ABSOLUTE)\r
+get_filename_component(DirectX_ROOT_DIR "${DirectX_INCLUDE_DIRS}/.." ABSOLUTE)\r
 \r
-IF (CMAKE_CL_64)\r
-    SET(DirectX_LIBRARY_PATHS "${DirectX_ROOT_DIR}/Lib/x64")\r
-ELSE ()\r
-    SET(DirectX_LIBRARY_PATHS "${DirectX_ROOT_DIR}/Lib/x86" "${DirectX_ROOT_DIR}/Lib")\r
-ENDIF ()\r
+if (CMAKE_CL_64)\r
+    set(DirectX_LIBRARY_PATHS "${DirectX_ROOT_DIR}/Lib/x64")\r
+else ()\r
+    set(DirectX_LIBRARY_PATHS "${DirectX_ROOT_DIR}/Lib/x86" "${DirectX_ROOT_DIR}/Lib")\r
+endif ()\r
 \r
-FIND_LIBRARY(DirectX_D3D9_LIBRARY d3d9 ${DirectX_LIBRARY_PATHS} NO_DEFAULT_PATH)\r
-FIND_LIBRARY(DirectX_D3DX9_LIBRARY d3dx9 ${DirectX_LIBRARY_PATHS} NO_DEFAULT_PATH)\r
-SET(DirectX_LIBRARIES ${DirectX_D3D9_LIBRARY} ${DirectX_D3DX9_LIBRARY})\r
+find_library(DirectX_D3D9_LIBRARY d3d9 ${DirectX_LIBRARY_PATHS} NO_DEFAULT_PATH)\r
+find_library(DirectX_D3DX9_LIBRARY d3dx9 ${DirectX_LIBRARY_PATHS} NO_DEFAULT_PATH)\r
+set(DirectX_LIBRARIES ${DirectX_D3D9_LIBRARY} ${DirectX_D3DX9_LIBRARY})\r
 \r
 # handle the QUIETLY and REQUIRED arguments and set DirectX_FOUND to TRUE if all listed variables are TRUE\r
-INCLUDE(FindPackageHandleStandardArgs)\r
+include(FindPackageHandleStandardArgs)\r
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectX DEFAULT_MSG DirectX_ROOT_DIR DirectX_LIBRARIES DirectX_INCLUDE_DIRS)\r
-MARK_AS_ADVANCED(DirectX_INCLUDE_DIRS DirectX_D3D9_LIBRARY DirectX_D3DX9_LIBRARY)\r
+mark_as_advanced(DirectX_INCLUDE_DIRS DirectX_D3D9_LIBRARY DirectX_D3DX9_LIBRARY)\r
index 5a81998..2b56242 100644 (file)
@@ -5,7 +5,7 @@
 #  E_DBUS_INCLUDE_DIRS - directories which contain the E_DBus headers.
 #  E_DBUS_LIBRARIES - libraries required to link against E_DBus.
 #
-# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
+# Optionally, the COMPONENTS keyword can be passed to find_package()
 # and additional E_DBus libraries can be looked for. Currently, the
 # following libraries can be searched, and they define the following
 # variables if found:
@@ -35,7 +35,7 @@
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-INCLUDE(EFLHelpers)
+include(EFLHelpers)
 
 FIND_EFL_LIBRARY(E_DBUS
     HEADERS E_DBus.h
@@ -50,13 +50,13 @@ FIND_EFL_LIBRARY(E_DBUS_EUKIT
     LIBRARY eukit
 )
 
-FOREACH(_component ${E_DBus_FIND_COMPONENTS})
-    SET(_e_dbus_component "E_DBUS_${_component}")
-    STRING(TOUPPER ${_e_dbus_component} _UPPER_NAME)
+foreach (_component ${E_DBus_FIND_COMPONENTS})
+    set(_e_dbus_component "E_DBUS_${_component}")
+    string(TOUPPER ${_e_dbus_component} _UPPER_NAME)
 
-    LIST(APPEND _E_DBUS_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
-ENDFOREACH()
+    list(APPEND _E_DBUS_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
+endforeach ()
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(E_DBus REQUIRED_VARS E_DBUS_INCLUDE_DIRS E_DBUS_LIBRARIES ${_E_DBUS_REQUIRED_COMPONENT_VARS}
                                          VERSION_VAR   E_DBUS_VERSION)
index 38bbf0f..5b3560a 100644 (file)
@@ -5,7 +5,7 @@
 #  ECORE_INCLUDE_DIRS - directories which contain the Ecore headers.
 #  ECORE_LIBRARIES - libraries required to link against Ecore.
 #
-# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
+# Optionally, the COMPONENTS keyword can be passed to find_package()
 # and additional Ecore libraries can be looked for. Currently, the
 # following libraries can be searched, and they define the following
 # variables if found:
@@ -38,7 +38,7 @@
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-INCLUDE(EFLHelpers)
+include(EFLHelpers)
 
 FIND_EFL_LIBRARY(ECORE
     HEADERS Ecore.h
@@ -73,13 +73,13 @@ FIND_EFL_LIBRARY(ECORE_IMF
     LIBRARY ecore_imf
 )
 
-FOREACH(_component ${Ecore_FIND_COMPONENTS})
-    SET(_ecore_component "ECORE_${_component}")
-    STRING(TOUPPER ${_ecore_component} _UPPER_NAME)
+foreach (_component ${Ecore_FIND_COMPONENTS})
+    set(_ecore_component "ECORE_${_component}")
+    string(TOUPPER ${_ecore_component} _UPPER_NAME)
 
-    LIST(APPEND _ECORE_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
-ENDFOREACH()
+    list(APPEND _ECORE_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
+endforeach ()
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ecore REQUIRED_VARS ECORE_INCLUDE_DIRS ECORE_LIBRARIES ${_ECORE_REQUIRED_COMPONENT_VARS}
                                         VERSION_VAR   ECORE_VERSION)
index 01ff8d8..509b5a1 100644 (file)
@@ -29,7 +29,7 @@
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-INCLUDE(EFLHelpers)
+include(EFLHelpers)
 
 FIND_EFL_LIBRARY(EDJE
     HEADERS Edje.h
@@ -37,10 +37,10 @@ FIND_EFL_LIBRARY(EDJE
     LIBRARY edje
 )
 
-FIND_PROGRAM(EDJE_CC_EXECUTABLE
+find_program(EDJE_CC_EXECUTABLE
     NAMES edje_cc
 )
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Edje REQUIRED_VARS EDJE_INCLUDE_DIRS EDJE_LIBRARIES EDJE_CC_EXECUTABLE
                                        VERSION_VAR   EDJE_VERSION)
index fbbfc5f..51abd12 100644 (file)
@@ -28,7 +28,7 @@
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-INCLUDE(EFLHelpers)
+include(EFLHelpers)
 
 FIND_EFL_LIBRARY(EET
     HEADERS Eet.h
@@ -36,6 +36,6 @@ FIND_EFL_LIBRARY(EET
     LIBRARY eet
 )
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eet REQUIRED_VARS EET_INCLUDE_DIRS EET_LIBRARIES
                                       VERSION_VAR   EET_VERSION)
index 93edc48..d92ac33 100644 (file)
@@ -28,7 +28,7 @@
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-INCLUDE(EFLHelpers)
+include(EFLHelpers)
 
 FIND_EFL_LIBRARY(EEZE
     HEADERS Eeze.h
@@ -36,6 +36,6 @@ FIND_EFL_LIBRARY(EEZE
     LIBRARY eeze
 )
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eeze REQUIRED_VARS EEZE_INCLUDE_DIRS EEZE_LIBRARIES
                                        VERSION_VAR   EEZE_VERSION)
index 22d704b..9e67a7b 100644 (file)
@@ -28,7 +28,7 @@
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-INCLUDE(EFLHelpers)
+include(EFLHelpers)
 
 FIND_EFL_LIBRARY(EFREET
     HEADERS Efreet.h
@@ -36,6 +36,6 @@ FIND_EFL_LIBRARY(EFREET
     LIBRARY efreet
 )
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Efreet REQUIRED_VARS EFREET_INCLUDE_DIRS EFREET_LIBRARIES
                                          VERSION_VAR   EFREET_VERSION)
index 5ac9480..8f9a877 100644 (file)
@@ -28,7 +28,7 @@
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-INCLUDE(EFLHelpers)
+include(EFLHelpers)
 
 FIND_EFL_LIBRARY(EINA
     HEADERS Eina.h eina_main.h
@@ -36,6 +36,6 @@ FIND_EFL_LIBRARY(EINA
     LIBRARY eina
 )
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eina REQUIRED_VARS EINA_INCLUDE_DIRS EINA_LIBRARIES
                                        VERSION_VAR   EINA_VERSION)
index 455ca78..73483f7 100644 (file)
@@ -28,7 +28,7 @@
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-INCLUDE(EFLHelpers)
+include(EFLHelpers)
 
 FIND_EFL_LIBRARY(ELEMENTARY
     HEADERS Elementary.h
@@ -36,6 +36,6 @@ FIND_EFL_LIBRARY(ELEMENTARY
     LIBRARY elementary
 )
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Elementary REQUIRED_VARS ELEMENTARY_INCLUDE_DIRS ELEMENTARY_LIBRARIES
                                              VERSION_VAR   ELM_VERSION)
index d69c71c..929979e 100644 (file)
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_ENCHANT enchant)
+find_package(PkgConfig)
+pkg_check_modules(PC_ENCHANT enchant)
 
-FIND_PATH(ENCHANT_INCLUDE_DIRS
+find_path(ENCHANT_INCLUDE_DIRS
     NAMES enchant.h
     PATHS ${PC_ENCHANT_INCLUDEDIR}
           ${PC_ENCHANT_INCLUDE_DIRS}
 )
 
-FIND_LIBRARY(ENCHANT_LIBRARIES
+find_library(ENCHANT_LIBRARIES
     NAMES enchant
     PATHS ${PC_ENCHANT_LIBDIR}
           ${PC_ENCHANT_LIBRARY_DIRS}
index ce75eae..6125781 100644 (file)
@@ -28,7 +28,7 @@
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-INCLUDE(EFLHelpers)
+include(EFLHelpers)
 
 FIND_EFL_LIBRARY(EVAS
     HEADERS Evas.h
@@ -36,6 +36,6 @@ FIND_EFL_LIBRARY(EVAS
     LIBRARY evas
 )
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Evas REQUIRED_VARS EVAS_INCLUDE_DIRS EVAS_LIBRARIES
                                        VERSION_VAR   EVAS_VERSION)
index e6fa81d..2ed605d 100644 (file)
@@ -17,7 +17,7 @@
 # 2. Redistributions in binary form must reproduce the copyright
 #    notice, this list of conditions and the following disclaimer in the
 #    documentation and/or other materials provided with the distribution.
-# 3. The name of the author may not be used to endorse or promote products 
+# 3. The name of the author may not be used to endorse or promote products
 #    derived from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 
 if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
 
-  # in cache already
-  set(FONTCONFIG_FOUND TRUE)
+    # in cache already
+    set(FONTCONFIG_FOUND TRUE)
 
 else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
 
-  if (NOT WIN32)
-    # use pkg-config to get the directories and then use these values
-    # in the FIND_PATH() and FIND_LIBRARY() calls
-    find_package(PkgConfig)
-    pkg_check_modules(PC_FONTCONFIG fontconfig)
+    if (NOT WIN32)
+        # use pkg-config to get the directories and then use these values
+        # in the find_path() and find_library() calls
+        find_package(PkgConfig)
+        pkg_check_modules(PC_FONTCONFIG fontconfig)
 
-    set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER})
-  endif (NOT WIN32)
+      set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER})
+    endif (NOT WIN32)
 
-  find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
-    PATHS
-    ${PC_FONTCONFIG_INCLUDEDIR}
-    ${PC_FONTCONFIG_INCLUDE_DIRS}
-    /usr/X11/include
-  )
+    find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
+        PATHS
+        ${PC_FONTCONFIG_INCLUDEDIR}
+        ${PC_FONTCONFIG_INCLUDE_DIRS}
+        /usr/X11/include
+    )
 
-  find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
-    PATHS
-    ${PC_FONTCONFIG_LIBDIR}
-    ${PC_FONTCONFIG_LIBRARY_DIRS}
-  )
+    find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
+        PATHS
+        ${PC_FONTCONFIG_LIBDIR}
+        ${PC_FONTCONFIG_LIBRARY_DIRS}
+    )
 
-  include(FindPackageHandleStandardArgs)
-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR )
-  
-  mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
+    include(FindPackageHandleStandardArgs)
+    FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
+
+    mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
 
 endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
index 656aa0b..182e37b 100644 (file)
@@ -5,7 +5,7 @@
 #  GLIB_INCLUDE_DIRS - the Glib include directories
 #  GLIB_LIBRARIES - link these to use Glib
 #
-# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
+# Optionally, the COMPONENTS keyword can be passed to find_package()
 # and Glib components can be looked for.  Currently, the following
 # components can be used, and they define the following variables if
 # found:
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_GLIB QUIET glib-2.0)
+find_package(PkgConfig)
+pkg_check_modules(PC_GLIB QUIET glib-2.0)
 
-FIND_LIBRARY(GLIB_LIBRARIES
+find_library(GLIB_LIBRARIES
     NAMES glib-2.0
     HINTS ${PC_GLIB_LIBDIR}
           ${PC_GLIB_LIBRARY_DIRS}
@@ -52,51 +52,51 @@ FIND_LIBRARY(GLIB_LIBRARIES
 
 # Files in glib's main include path may include glibconfig.h, which,
 # for some odd reason, is normally in $LIBDIR/glib-2.0/include.
-GET_FILENAME_COMPONENT(_GLIB_LIBRARY_DIR ${GLIB_LIBRARIES} PATH)
-FIND_PATH(GLIBCONFIG_INCLUDE_DIR
+get_filename_component(_GLIB_LIBRARY_DIR ${GLIB_LIBRARIES} PATH)
+find_path(GLIBCONFIG_INCLUDE_DIR
     NAMES glibconfig.h
     HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${_GLIB_LIBRARY_DIR}
     PATH_SUFFIXES glib-2.0/include
 )
 
-FIND_PATH(GLIB_INCLUDE_DIR
+find_path(GLIB_INCLUDE_DIR
     NAMES glib.h
     HINTS ${PC_GLIB_INCLUDEDIR}
           ${PC_GLIB_INCLUDE_DIRS}
     PATH_SUFFIXES glib-2.0
 )
 
-SET(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIBCONFIG_INCLUDE_DIR})
+set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIBCONFIG_INCLUDE_DIR})
 
 # Version detection
-FILE(READ "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h" GLIBCONFIG_H_CONTENTS)
-STRING(REGEX MATCH "#define GLIB_MAJOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
-SET(GLIB_VERSION_MAJOR "${CMAKE_MATCH_1}")
-STRING(REGEX MATCH "#define GLIB_MINOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
-SET(GLIB_VERSION_MINOR "${CMAKE_MATCH_1}")
-STRING(REGEX MATCH "#define GLIB_MICRO_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
-SET(GLIB_VERSION_MICRO "${CMAKE_MATCH_1}")
-SET(GLIB_VERSION "${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR}.${GLIB_VERSION_MICRO}")
+file(READ "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h" GLIBCONFIG_H_CONTENTS)
+string(REGEX MATCH "#define GLIB_MAJOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
+set(GLIB_VERSION_MAJOR "${CMAKE_MATCH_1}")
+string(REGEX MATCH "#define GLIB_MINOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
+set(GLIB_VERSION_MINOR "${CMAKE_MATCH_1}")
+string(REGEX MATCH "#define GLIB_MICRO_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
+set(GLIB_VERSION_MICRO "${CMAKE_MATCH_1}")
+set(GLIB_VERSION "${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR}.${GLIB_VERSION_MICRO}")
 
 # Additional Glib components.  We only look for libraries, as not all of them
 # have corresponding headers and all headers are installed alongside the main
 # glib ones.
-FOREACH (_component ${GLIB_FIND_COMPONENTS})
-    IF (${_component} STREQUAL "gio")
-        FIND_LIBRARY(GLIB_GIO_LIBRARIES NAMES gio-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        SET(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_LIBRARIES)
-    ELSEIF (${_component} STREQUAL "gobject")
-        FIND_LIBRARY(GLIB_GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        SET(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GOBJECT_LIBRARIES)
-    ELSEIF (${_component} STREQUAL "gmodule")
-        FIND_LIBRARY(GLIB_GMODULE_LIBRARIES NAMES gmodule-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        SET(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GMODULE_LIBRARIES)
-    ELSEIF (${_component} STREQUAL "gthread")
-        FIND_LIBRARY(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        SET(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES)
-    ENDIF ()
-ENDFOREACH ()
+foreach (_component ${GLIB_FIND_COMPONENTS})
+    if (${_component} STREQUAL "gio")
+        find_library(GLIB_GIO_LIBRARIES NAMES gio-2.0 HINTS ${_GLIB_LIBRARY_DIR})
+        set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_LIBRARIES)
+    elseif (${_component} STREQUAL "gobject")
+        find_library(GLIB_GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${_GLIB_LIBRARY_DIR})
+        set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GOBJECT_LIBRARIES)
+    elseif (${_component} STREQUAL "gmodule")
+        find_library(GLIB_GMODULE_LIBRARIES NAMES gmodule-2.0 HINTS ${_GLIB_LIBRARY_DIR})
+        set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GMODULE_LIBRARIES)
+    elseif (${_component} STREQUAL "gthread")
+        find_library(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR})
+        set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES)
+    endif ()
+endforeach ()
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLIB REQUIRED_VARS GLIB_INCLUDE_DIRS GLIB_LIBRARIES ${ADDITIONAL_REQUIRED_VARS}
                                        VERSION_VAR   GLIB_VERSION)
index 542ebac..82e71ca 100644 (file)
@@ -11,7 +11,7 @@
 #  GSTREAMER_BASE_INCLUDE_DIRS - gstreamer-base's include directory
 #  GSTREAMER_BASE_LIBRARIES - link to these to use gstreamer-base
 #
-# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
+# Optionally, the COMPONENTS keyword can be passed to find_package()
 # and GStreamer plugins can be looked for.  Currently, the following
 # plugins can be searched, and they define the following variables if
 # found:
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-FIND_PACKAGE(PkgConfig)
+find_package(PkgConfig)
 
 # The minimum GStreamer version we support.
-SET(GSTREAMER_MINIMUM_VERSION 0.10.30)
+set(GSTREAMER_MINIMUM_VERSION 0.10.30)
 
 # Helper macro to find a GStreamer plugin (or GStreamer itself)
 #   _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_AUDIO")
 #   _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-0.10", or "gstreamer-video-0.10").
 #   _header is the component's header, relative to the gstreamer-0.10 directory (eg. "gst/gst.h").
 #   _library is the component's library name (eg. "gstreamer-0.10" or "gstvideo-0.10")
-MACRO(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
+macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
     # FIXME: The QUIET keyword can be used once we require CMake 2.8.2.
-    PKG_CHECK_MODULES(PC_${_component_prefix} ${_pkgconfig_name})
+    pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
 
-    FIND_PATH(${_component_prefix}_INCLUDE_DIRS
+    find_path(${_component_prefix}_INCLUDE_DIRS
         NAMES ${_header}
         HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
         PATH_SUFFIXES gstreamer-0.10
     )
 
-    FIND_LIBRARY(${_component_prefix}_LIBRARIES
+    find_library(${_component_prefix}_LIBRARIES
         NAMES ${_library}
         HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR}
     )
-ENDMACRO()
+endmacro()
 
 # ------------------------
 # 1. Find GStreamer itself
@@ -81,29 +81,29 @@ FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-0.10 gst/gst.h gstreamer-0.10)
 FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-0.10 gst/gst.h gstbase-0.10)
 
 # 1.2. Check GStreamer version
-IF (GSTREAMER_INCLUDE_DIRS)
-    IF (EXISTS "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h")
-        FILE (READ "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS)
+if (GSTREAMER_INCLUDE_DIRS)
+    if (EXISTS "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h")
+        file(READ "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS)
 
-        STRING(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
-        SET(GSTREAMER_VERSION_MAJOR "${CMAKE_MATCH_1}")
+        string(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
+        set(GSTREAMER_VERSION_MAJOR "${CMAKE_MATCH_1}")
 
-        STRING(REGEX MATCH "#define +GST_VERSION_MINOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
-        SET(GSTREAMER_VERSION_MINOR "${CMAKE_MATCH_1}")
+        string(REGEX MATCH "#define +GST_VERSION_MINOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
+        set(GSTREAMER_VERSION_MINOR "${CMAKE_MATCH_1}")
 
-        STRING(REGEX MATCH "#define +GST_VERSION_MICRO +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
-        SET(GSTREAMER_VERSION_MICRO "${CMAKE_MATCH_1}")
+        string(REGEX MATCH "#define +GST_VERSION_MICRO +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
+        set(GSTREAMER_VERSION_MICRO "${CMAKE_MATCH_1}")
 
-        SET(GSTREAMER_VERSION "${GSTREAMER_VERSION_MAJOR}.${GSTREAMER_VERSION_MINOR}.${GSTREAMER_VERSION_MICRO}")
-    ENDIF ()
-ENDIF ()
+        set(GSTREAMER_VERSION "${GSTREAMER_VERSION_MAJOR}.${GSTREAMER_VERSION_MINOR}.${GSTREAMER_VERSION_MICRO}")
+    endif ()
+endif ()
 
 # FIXME: With CMake 2.8.3 we can just pass GSTREAMER_VERSION to FIND_PACKAGE_HANDLE_STARNDARD_ARGS as VERSION_VAR
 #        and remove the version check here (GSTREAMER_MINIMUM_VERSION would be passed to FIND_PACKAGE).
-SET(VERSION_OK TRUE)
-IF ("${GSTREAMER_VERSION}" VERSION_LESS "${GSTREAMER_MINIMUM_VERSION}")
-    SET(VERSION_OK FALSE)
-ENDIF ()
+set(VERSION_OK TRUE)
+if ("${GSTREAMER_VERSION}" VERSION_LESS "${GSTREAMER_MINIMUM_VERSION}")
+    set(VERSION_OK FALSE)
+endif ()
 
 # -------------------------
 # 2. Find GStreamer plugins
@@ -119,14 +119,14 @@ FIND_GSTREAMER_COMPONENT(GSTREAMER_VIDEO gstreamer-video-0.10 gst/video/video.h
 # ------------------------------------------------
 # 3. Process the COMPONENTS passed to FIND_PACKAGE
 # ------------------------------------------------
-SET(_GSTREAMER_REQUIRED_VARS GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES VERSION_OK GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES)
+set(_GSTREAMER_REQUIRED_VARS GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES VERSION_OK GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES)
 
-FOREACH(_component ${GStreamer_FIND_COMPONENTS})
-    SET(_gst_component "GSTREAMER_${_component}")
-    STRING(TOUPPER ${_gst_component} _UPPER_NAME)
+foreach (_component ${GStreamer_FIND_COMPONENTS})
+    set(_gst_component "GSTREAMER_${_component}")
+    string(TOUPPER ${_gst_component} _UPPER_NAME)
 
-    LIST(APPEND _GSTREAMER_REQUIRED_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
-ENDFOREACH()
+    list(APPEND _GSTREAMER_REQUIRED_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
+endforeach ()
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer DEFAULT_MSG ${_GSTREAMER_REQUIRED_VARS})
index 0e53912..0574d32 100644 (file)
@@ -1,19 +1,19 @@
 # - Find gperf
-# This module looks for gperf. This module defines the 
+# This module looks for gperf. This module defines the
 # following values:
 #  GPERF_EXECUTABLE: the full path to the gperf tool.
 #  GPERF_FOUND: True if gperf has been found.
 
-INCLUDE(FindCygwin)
+include(FindCygwin)
 
-FIND_PROGRAM(GPERF_EXECUTABLE
+find_program(GPERF_EXECUTABLE
     gperf
     ${CYGWIN_INSTALL_PATH}/bin
 )
 
-# handle the QUIETLY and REQUIRED arguments and set GPERF_FOUND to TRUE if 
+# handle the QUIETLY and REQUIRED arguments and set GPERF_FOUND to TRUE if
 # all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gperf DEFAULT_MSG GPERF_EXECUTABLE)
 
-MARK_AS_ADVANCED(GPERF_EXECUTABLE)
+mark_as_advanced(GPERF_EXECUTABLE)
index a348879..2d81b9b 100644 (file)
 # HARFBUZZ_INCLUDE_DIRS - containg the HarfBuzz headers
 # HARFBUZZ_LIBRARIES - containg the HarfBuzz library
 
-INCLUDE(FindPkgConfig)
+include(FindPkgConfig)
 
-PKG_CHECK_MODULES(PC_HARFBUZZ harfbuzz>=0.9.0)
+pkg_check_modules(PC_HARFBUZZ harfbuzz>=0.9.0)
 
-FIND_PATH(HARFBUZZ_INCLUDE_DIRS NAMES hb.h
-  HINTS ${PC_HARFBUZZ_INCLUDE_DIRS} ${PC_HARFBUZZ_INCLUDEDIR}
+find_path(HARFBUZZ_INCLUDE_DIRS NAMES hb.h
+    HINTS ${PC_HARFBUZZ_INCLUDE_DIRS} ${PC_HARFBUZZ_INCLUDEDIR}
 )
 
-FIND_LIBRARY(HARFBUZZ_LIBRARIES NAMES harfbuzz
-  HINTS ${PC_HARFBUZZ_LIBRARY_DIRS} ${PC_HARFBUZZ_LIBDIR}
+find_library(HARFBUZZ_LIBRARIES NAMES harfbuzz
+    HINTS ${PC_HARFBUZZ_LIBRARY_DIRS} ${PC_HARFBUZZ_LIBDIR}
 )
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(HarfBuzz DEFAULT_MSG HARFBUZZ_INCLUDE_DIRS HARFBUZZ_LIBRARIES)
index 225c731..a3fe795 100644 (file)
 #                       (note: in addition to ICU_LIBRARIES)
 
 # Look for the header file.
-FIND_PATH(
+find_path(
     ICU_INCLUDE_DIR
     NAMES unicode/utypes.h
     DOC "Include directory for the ICU library")
-MARK_AS_ADVANCED(ICU_INCLUDE_DIR)
+mark_as_advanced(ICU_INCLUDE_DIR)
 
 # Look for the library.
-FIND_LIBRARY(
+find_library(
     ICU_LIBRARY
     NAMES icuuc cygicuuc cygicuuc32
     DOC "Libraries to link against for the common parts of ICU")
-MARK_AS_ADVANCED(ICU_LIBRARY)
+mark_as_advanced(ICU_LIBRARY)
 
 # Copy the results to the output variables.
-IF (ICU_INCLUDE_DIR AND ICU_LIBRARY)
-    SET(ICU_FOUND 1)
-    SET(ICU_LIBRARIES ${ICU_LIBRARY})
-    SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
+if (ICU_INCLUDE_DIR AND ICU_LIBRARY)
+    set(ICU_FOUND 1)
+    set(ICU_LIBRARIES ${ICU_LIBRARY})
+    set(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
 
-    SET(ICU_VERSION 0)
-    SET(ICU_MAJOR_VERSION 0)
-    SET(ICU_MINOR_VERSION 0)
-    FILE(READ "${ICU_INCLUDE_DIR}/unicode/uversion.h" _ICU_VERSION_CONENTS)
-    STRING(REGEX REPLACE ".*#define U_ICU_VERSION_MAJOR_NUM ([0-9]+).*" "\\1" ICU_MAJOR_VERSION "${_ICU_VERSION_CONENTS}")
-    STRING(REGEX REPLACE ".*#define U_ICU_VERSION_MINOR_NUM ([0-9]+).*" "\\1" ICU_MINOR_VERSION "${_ICU_VERSION_CONENTS}")
+    set(ICU_VERSION 0)
+    set(ICU_MAJOR_VERSION 0)
+    set(ICU_MINOR_VERSION 0)
+    file(READ "${ICU_INCLUDE_DIR}/unicode/uversion.h" _ICU_VERSION_CONENTS)
+    string(REGEX REPLACE ".*#define U_ICU_VERSION_MAJOR_NUM ([0-9]+).*" "\\1" ICU_MAJOR_VERSION "${_ICU_VERSION_CONENTS}")
+    string(REGEX REPLACE ".*#define U_ICU_VERSION_MINOR_NUM ([0-9]+).*" "\\1" ICU_MINOR_VERSION "${_ICU_VERSION_CONENTS}")
 
-    SET(ICU_VERSION "${ICU_MAJOR_VERSION}.${ICU_MINOR_VERSION}")
+    set(ICU_VERSION "${ICU_MAJOR_VERSION}.${ICU_MINOR_VERSION}")
 
     # Look for the ICU internationalization libraries
-    FIND_LIBRARY(
+    find_library(
         ICU_I18N_LIBRARY
         NAMES icuin icui18n cygicuin cygicuin32
         DOC "Libraries to link against for ICU internationalization")
-    MARK_AS_ADVANCED(ICU_I18N_LIBRARY)
-    IF (ICU_I18N_LIBRARY)
-        SET(ICU_I18N_FOUND 1)
-        SET(ICU_I18N_LIBRARIES ${ICU_I18N_LIBRARY})
-    ELSE ()
-        SET(ICU_I18N_FOUND 0)
-        SET(ICU_I18N_LIBRARIES)
-    ENDIF ()
-ELSE ()
-    SET(ICU_FOUND 0)
-    SET(ICU_I18N_FOUND 0)
-    SET(ICU_LIBRARIES)
-    SET(ICU_I18N_LIBRARIES)
-    SET(ICU_INCLUDE_DIRS)
-    SET(ICU_VERSION)
-    SET(ICU_MAJOR_VERSION)
-    SET(ICU_MINOR_VERSION)
-ENDIF ()
-
-IF (ICU_FOUND)
-    IF (NOT ICU_FIND_QUIETLY)
-        MESSAGE(STATUS "Found ICU header files in ${ICU_INCLUDE_DIRS}")
-        MESSAGE(STATUS "Found ICU libraries: ${ICU_LIBRARIES}")
-    ENDIF ()
-ELSE ()
-    IF (ICU_FIND_REQUIRED)
-        MESSAGE(FATAL_ERROR "Could not find ICU")
-    ELSE ()
-        MESSAGE(STATUS "Optional package ICU was not found")
-    ENDIF ()
-ENDIF ()
+    mark_as_advanced(ICU_I18N_LIBRARY)
+    if (ICU_I18N_LIBRARY)
+        set(ICU_I18N_FOUND 1)
+        set(ICU_I18N_LIBRARIES ${ICU_I18N_LIBRARY})
+    else ()
+        set(ICU_I18N_FOUND 0)
+        set(ICU_I18N_LIBRARIES)
+    endif ()
+else ()
+    set(ICU_FOUND 0)
+    set(ICU_I18N_FOUND 0)
+    set(ICU_LIBRARIES)
+    set(ICU_I18N_LIBRARIES)
+    set(ICU_INCLUDE_DIRS)
+    set(ICU_VERSION)
+    set(ICU_MAJOR_VERSION)
+    set(ICU_MINOR_VERSION)
+endif ()
 
+if (ICU_FOUND)
+    if (NOT ICU_FIND_QUIETLY)
+        message(STATUS "Found ICU header files in ${ICU_INCLUDE_DIRS}")
+        message(STATUS "Found ICU libraries: ${ICU_LIBRARIES}")
+    endif ()
+else ()
+    if (ICU_FIND_REQUIRED)
+        message(FATAL_ERROR "Could not find ICU")
+    else ()
+        message(STATUS "Optional package ICU was not found")
+    endif ()
+endif ()
index cb8e4e2..aaa76e8 100644 (file)
 # LibSoup does not provide an easy way to retrieve its version other than its
 # .pc file, so we need to rely on PC_LIBSOUP_VERSION and REQUIRE the .pc file
 # to be found.
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_LIBSOUP REQUIRED QUIET libsoup-2.4)
+find_package(PkgConfig)
+pkg_check_modules(PC_LIBSOUP REQUIRED QUIET libsoup-2.4)
 
-FIND_PATH(LIBSOUP_INCLUDE_DIRS
+find_path(LIBSOUP_INCLUDE_DIRS
     NAMES libsoup/soup.h
     HINTS ${PC_LIBSOUP_INCLUDEDIR}
           ${PC_LIBSOUP_INCLUDE_DIRS}
     PATH_SUFFIXES libsoup-2.4
 )
 
-FIND_LIBRARY(LIBSOUP_LIBRARIES
+find_library(LIBSOUP_LIBRARIES
     NAMES soup-2.4
     HINTS ${PC_LIBSOUP_LIBDIR}
           ${PC_LIBSOUP_LIBRARY_DIRS}
 )
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibSoup REQUIRED_VARS LIBSOUP_INCLUDE_DIRS LIBSOUP_LIBRARIES
                                           VERSION_VAR   PC_LIBSOUP_VERSION)
index 1c701f5..389b67e 100644 (file)
@@ -5,16 +5,16 @@
 #  QuickTime_LIBRARIES, libraries to link against to use QuickTime.
 #  QuickTime_FOUND, If false, do not try to use QuickTime.
 
-FIND_PATH(QuickTimeSDK_INCLUDE_DIRS QuickTime.h PATHS
+find_path(QuickTimeSDK_INCLUDE_DIRS QuickTime.h PATHS
     "$ENV{PROGRAMFILES}/QuickTime SDK/CIncludes"
 )
 
-SET(QuickTimeSDK_LIBRARY_PATH "${QuickTimeSDK_INCLUDE_DIRS}/../Libraries")
-FIND_LIBRARY(QuickTimeSDK_CVClient_LIBRARY CVClient ${QuickTimeSDK_LIBRARY_PATH} NO_DEFAULT_PATH)
-FIND_LIBRARY(QuickTimeSDK_QTMLClient_LIBRARY QTMLClient ${QuickTimeSDK_LIBRARY_PATH} NO_DEFAULT_PATH)
-SET(QuickTimeSDK_LIBRARIES ${QuickTimeSDK_CVClient_LIBRARY} ${QuickTimeSDK_QTMLClient_LIBRARY})
+set(QuickTimeSDK_LIBRARY_PATH "${QuickTimeSDK_INCLUDE_DIRS}/../Libraries")
+find_library(QuickTimeSDK_CVClient_LIBRARY CVClient ${QuickTimeSDK_LIBRARY_PATH} NO_DEFAULT_PATH)
+find_library(QuickTimeSDK_QTMLClient_LIBRARY QTMLClient ${QuickTimeSDK_LIBRARY_PATH} NO_DEFAULT_PATH)
+set(QuickTimeSDK_LIBRARIES ${QuickTimeSDK_CVClient_LIBRARY} ${QuickTimeSDK_QTMLClient_LIBRARY})
 
 # handle the QUIETLY and REQUIRED arguments and set QuickTimeSDK_FOUND to TRUE if all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(QuickTimeSDK DEFAULT_MSG QuickTimeSDK_LIBRARIES QuickTimeSDK_INCLUDE_DIRS)
-MARK_AS_ADVANCED(QuickTimeSDK_INCLUDE_DIRS QuickTimeSDK_CVClient_LIBRARY QuickTimeSDK_QTMLClient_LIBRARY)
+mark_as_advanced(QuickTimeSDK_INCLUDE_DIRS QuickTimeSDK_CVClient_LIBRARY QuickTimeSDK_QTMLClient_LIBRARY)
index 1bd8625..47caa36 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-if ( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES )
-   # in cache already
-   SET(Sqlite_FIND_QUIETLY TRUE)
-endif ( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES )
+if (SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES)
+    # in cache already
+    set(Sqlite_FIND_QUIETLY TRUE)
+endif (SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES)
 
 # use pkg-config to get the directories and then use these values
-# in the FIND_PATH() and FIND_LIBRARY() calls
-if( NOT WIN32 )
-  find_package(PkgConfig)
+# in the find_path() and find_library() calls
+if (NOT WIN32)
+    find_package(PkgConfig)
 
-  pkg_check_modules(PC_SQLITE sqlite3)
+    pkg_check_modules(PC_SQLITE sqlite3)
 
-  set(SQLITE_DEFINITIONS ${PC_SQLITE_CFLAGS_OTHER})
-endif( NOT WIN32 )
+    set(SQLITE_DEFINITIONS ${PC_SQLITE_CFLAGS_OTHER})
+endif (NOT WIN32)
 
-FIND_PATH(SQLITE_INCLUDE_DIR NAMES sqlite3.h
-  PATHS
-  ${PC_SQLITE_INCLUDEDIR}
-  ${PC_SQLITE_INCLUDE_DIRS}
+find_path(SQLITE_INCLUDE_DIR NAMES sqlite3.h
+    PATHS
+    ${PC_SQLITE_INCLUDEDIR}
+    ${PC_SQLITE_INCLUDE_DIRS}
 )
 
-FIND_LIBRARY(SQLITE_LIBRARIES NAMES sqlite3
-  PATHS
-  ${PC_SQLITE_LIBDIR}
-  ${PC_SQLITE_LIBRARY_DIRS}
+find_library(SQLITE_LIBRARIES NAMES sqlite3
+    PATHS
+    ${PC_SQLITE_LIBDIR}
+    ${PC_SQLITE_LIBRARY_DIRS}
 )
 
 include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sqlite DEFAULT_MSG SQLITE_INCLUDE_DIR SQLITE_LIBRARIES )
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sqlite DEFAULT_MSG SQLITE_INCLUDE_DIR SQLITE_LIBRARIES)
 
 # show the SQLITE_INCLUDE_DIR and SQLITE_LIBRARIES variables only in the advanced view
-MARK_AS_ADVANCED(SQLITE_INCLUDE_DIR SQLITE_LIBRARIES )
-
+mark_as_advanced(SQLITE_INCLUDE_DIR SQLITE_LIBRARIES)
index e99b4a1..ddb828b 100644 (file)
@@ -1,73 +1,72 @@
-SET(PROJECT_VERSION_MAJOR 0)
-SET(PROJECT_VERSION_MINOR 1)
-SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
+set(PROJECT_VERSION_MAJOR 0)
+set(PROJECT_VERSION_MINOR 1)
+set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
 
-SET(DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}-${PROJECT_VERSION})
+set(DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}-${PROJECT_VERSION})
 
-ADD_DEFINITIONS(-DDATA_DIR="${DATA_DIR}")
+add_definitions(-DDATA_DIR="${DATA_DIR}")
 
-ADD_DEFINITIONS(-DWEBCORE_NAVIGATOR_VENDOR="Research In Motion, Ltd.")
-ADD_DEFINITIONS(-DBUILDING_BLACKBERRY__)
-ADD_DEFINITIONS(-DBUILD_WEBKIT)
+add_definitions(-DWEBCORE_NAVIGATOR_VENDOR="Research In Motion, Ltd.")
+add_definitions(-DBUILDING_BLACKBERRY__)
+add_definitions(-DBUILD_WEBKIT)
 
 # Workaround for now so that SK_DEBUG isn't defined in SkPreConfig.h
-ADD_DEFINITIONS(-DSK_RELEASE)
+add_definitions(-DSK_RELEASE)
 
 # TODO: Make this build-time configurable
-SET(WTF_USE_PTHREADS 1)
-ADD_DEFINITIONS(-DWTF_USE_PTHREADS=1)
-SET(WTF_USE_OPENTYPE_SANITIZER 1)
-ADD_DEFINITIONS(-DWTF_USE_OPENTYPE_SANITIZER=1)
-
-IF (SHARED_CORE)
-    ADD_DEFINITIONS(-DWTF_USE_EXPORT_MACROS=1)
-ENDIF()
-
-IF (ENABLE_GLES2)
-    SET(WTF_USE_ACCELERATED_COMPOSITING 1)
-    ADD_DEFINITIONS(-DWTF_USE_ACCELERATED_COMPOSITING=1)
-    ADD_DEFINITIONS(-DBLACKBERRY_PLATFORM_GRAPHICS_EGL=1)
-    ADD_DEFINITIONS(-DBLACKBERRY_PLATFORM_GRAPHICS_GLES2=1)
-    ADD_DEFINITIONS(-DBLACKBERRY_PLATFORM_GRAPHICS_DRAWING_SURFACE=1)
-    ADD_DEFINITIONS(-DBLACKBERRY_PLATFORM_EXPORT_WEBDOM=1)
-    ADD_DEFINITIONS(-DWTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER=1)
-ENDIF ()
-
-IF (ADDITIONAL_SYSTEM_INCLUDE_PATH)
-    SET(CMAKE_INCLUDE_SYSTEM_FLAG_C "-Wp,-isystem")
-    SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-Wp,-isystem")
-    FOREACH (directory ${ADDITIONAL_SYSTEM_INCLUDE_PATH})
-        INCLUDE_DIRECTORIES(SYSTEM ${directory})
-    ENDFOREACH ()
-    IF(ENABLE_WEBGL)
-        INCLUDE_DIRECTORIES(SYSTEM ${THIRDPARTY_DIR}/ANGLE/include) #As system so as to be lower-priority than actual system headers
-    ENDIF ()
-ENDIF ()
-
-IF (PUBLIC_BUILD)
-    ADD_DEFINITIONS(-DPUBLIC_BUILD=1)
+set(WTF_USE_PTHREADS 1)
+add_definitions(-DWTF_USE_PTHREADS=1)
+set(WTF_USE_OPENTYPE_SANITIZER 1)
+add_definitions(-DWTF_USE_OPENTYPE_SANITIZER=1)
+
+if (SHARED_CORE)
+    add_definitions(-DWTF_USE_EXPORT_MACROS=1)
+endif ()
+
+if (ENABLE_GLES2)
+    set(WTF_USE_ACCELERATED_COMPOSITING 1)
+    add_definitions(-DWTF_USE_ACCELERATED_COMPOSITING=1)
+    add_definitions(-DBLACKBERRY_PLATFORM_GRAPHICS_EGL=1)
+    add_definitions(-DBLACKBERRY_PLATFORM_GRAPHICS_GLES2=1)
+    add_definitions(-DBLACKBERRY_PLATFORM_GRAPHICS_DRAWING_SURFACE=1)
+    add_definitions(-DBLACKBERRY_PLATFORM_EXPORT_WEBDOM=1)
+    add_definitions(-DWTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER=1)
+endif ()
+
+if (ADDITIONAL_SYSTEM_INCLUDE_PATH)
+    set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-Wp,-isystem")
+    set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-Wp,-isystem")
+    foreach (directory ${ADDITIONAL_SYSTEM_INCLUDE_PATH})
+        include_directories(SYSTEM ${directory})
+    endforeach ()
+    if (ENABLE_WEBGL)
+        include_directories(SYSTEM ${THIRDPARTY_DIR}/ANGLE/include) #As system so as to be lower-priority than actual system headers
+    endif ()
+endif ()
+
+if (PUBLIC_BUILD)
     message("*** PUBLIC BUILD ***")
-ELSE (PUBLIC_BUILD)
+else (PUBLIC_BUILD)
     message("*** DRT is ENABLED ***")
-ENDIF ()
+endif ()
 
-ADD_DEFINITIONS(-D__QNXNTO__)
-ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
-ADD_DEFINITIONS(-D_LARGEFILE64_SOURCE)
+add_definitions(-D__QNXNTO__)
+add_definitions(-D_FILE_OFFSET_BITS=64)
+add_definitions(-D_LARGEFILE64_SOURCE)
 
 # Find a library only in the staging directory (which is the CMAKE_INSTALL_PATH)
 # TODO: CMAKE_INSTALL_PATH may not be staging directory.
-MACRO(FIND_STAGING_LIBRARY _var _libname)
-  FIND_LIBRARY(${_var} ${_libname}
-    PATHS "${CMAKE_LIBRARY_PATH}"
-    ENV "QNX_TARGET"
-    PATH_SUFFIXES "${CMAKE_SYSTEM_PROCESSOR}/usr/lib" "${CMAKE_SYSTEM_PROCESSOR}/lib"
-    NO_DEFAULT_PATH)
-ENDMACRO()
-
-MACRO(FIND_STAGING_STATIC_LIBRARY _var _libname)
-  SET(${_var} "-Bstatic -l${_libname} -Bdynamic" CACHE STRING ${_libname})
-ENDMACRO()
+macro(FIND_STAGING_LIBRARY _var _libname)
+    find_library(${_var} ${_libname}
+        PATHS "${CMAKE_LIBRARY_PATH}"
+        ENV "QNX_TARGET"
+        PATH_SUFFIXES "${CMAKE_SYSTEM_PROCESSOR}/usr/lib" "${CMAKE_SYSTEM_PROCESSOR}/lib"
+        NO_DEFAULT_PATH)
+endmacro()
+
+macro(FIND_STAGING_STATIC_LIBRARY _var _libname)
+  set(${_var} "-Bstatic -l${_libname} -Bdynamic" CACHE STRING ${_libname})
+endmacro()
 
 FIND_STAGING_LIBRARY(Skia_LIBRARY grskia)
 FIND_STAGING_LIBRARY(Skia_QNX_LIBRARY skia-qnx)
@@ -97,64 +96,64 @@ FIND_STAGING_LIBRARY(ITYPE_LIBRARY iType)
 FIND_STAGING_LIBRARY(WTLE_LIBRARY WTLE)
 
 # Use jpeg-turbo for device build
-IF (TARGETING_PLAYBOOK)
+if (TARGETING_PLAYBOOK)
     FIND_STAGING_STATIC_LIBRARY(JPEG_LIBRARY jpeg-webkit)
-ELSE ()
+else ()
     FIND_STAGING_LIBRARY(JPEG_LIBRARY jpeg)
-ENDIF ()
+endif ()
 
 # Add "-fPIC" to CMAKE_SHARED_LIBRARY_C_FLAGS and CMAKE_SHARED_LIBRARY_CXX_FLAGS
 # This is because "-fPIC" is not included in the default defines under Modules/Platform/QNX.cmake
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC ${CMAKE_SHARED_LIBRARY_C_FLAGS}")
-SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC ${CMAKE_SHARED_LIBRARY_C_FLAGS}")
+set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
 
 # Show unresolved symbols when doing the final shared object link
-IF (PROFILING)
-    SET(BLACKBERRY_LINK_FLAGS "-Wl,-z,defs -Wl,-z,relro -Wl,-E -Wl,--no-keep-memory")
-ELSE (PROFILING)
-    SET(BLACKBERRY_LINK_FLAGS "-Wl,-z,defs -Wl,-z,relro -Wl,--no-keep-memory")
-ENDIF ()
+if (PROFILING)
+    set(BLACKBERRY_LINK_FLAGS "-Wl,-z,defs -Wl,-z,relro -Wl,-E -Wl,--no-keep-memory")
+else (PROFILING)
+    set(BLACKBERRY_LINK_FLAGS "-Wl,-z,defs -Wl,-z,relro -Wl,--no-keep-memory")
+endif ()
 
 # Set custom CFLAGS for our port
-IF (CMAKE_COMPILER_IS_GNUCC)
-    SET(CMAKE_CXX_FLAGS "-fstack-protector -fno-rtti -Wformat -Wformat-security -Werror=format-security ${CMAKE_CXX_FLAGS}")
-    SET(CMAKE_C_FLAGS "-fstack-protector -Wformat -Wformat-security -Werror=format-security ${CMAKE_C_FLAGS}")
-    SET(JSC_LINK_FLAGS "-Wl,-z,defs -Wl,-z,relro -N1024K")
-ENDIF ()
+if (CMAKE_COMPILER_IS_GNUCC)
+    set(CMAKE_CXX_FLAGS "-fstack-protector -fno-rtti -Wformat -Wformat-security -Werror=format-security ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_C_FLAGS "-fstack-protector -Wformat -Wformat-security -Werror=format-security ${CMAKE_C_FLAGS}")
+    set(JSC_LINK_FLAGS "-Wl,-z,defs -Wl,-z,relro -N1024K")
+endif ()
 
-IF (PROFILING)
-    SET(CMAKE_CXX_FLAGS "-finstrument-functions -g ${CMAKE_CXX_FLAGS}")
-    SET(CMAKE_C_FLAGS "-finstrument-functions -g ${CMAKE_C_FLAGS}")
-ENDIF ()
+if (PROFILING)
+    set(CMAKE_CXX_FLAGS "-finstrument-functions -g ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_C_FLAGS "-finstrument-functions -g ${CMAKE_C_FLAGS}")
+endif ()
 
 # FIXME: Make this more elegant
-IF (TARGETING_PLAYBOOK)
-    SET(CMAKE_CXX_FLAGS "-mfpu=neon ${CMAKE_CXX_FLAGS}")
-    SET(CMAKE_C_FLAGS "-mfpu=neon ${CMAKE_C_FLAGS}")
-    SET(CMAKE_CXX_FLAGS "-mthumb -mthumb-interwork ${CMAKE_CXX_FLAGS}")
-    SET(CMAKE_C_FLAGS "-mthumb -mthumb-interwork ${CMAKE_C_FLAGS}")
+if (TARGETING_PLAYBOOK)
+    set(CMAKE_CXX_FLAGS "-mfpu=neon ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_C_FLAGS "-mfpu=neon ${CMAKE_C_FLAGS}")
+    set(CMAKE_CXX_FLAGS "-mthumb -mthumb-interwork ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_C_FLAGS "-mthumb -mthumb-interwork ${CMAKE_C_FLAGS}")
     # check for BB_RELEASE_FLAGS or BB_DEBUG_FLAGS to set CMAKE_C_FLAGS{DEBUG|RELEASE} CMAKE_CXX_FLAGS{DEBUG|RELEASE}
-    if( DEFINED ENV{BB_RELEASE_FLAGS} )
+    if (DEFINED ENV{BB_RELEASE_FLAGS})
         set(CMAKE_CXX_FLAGS_RELEASE  "$ENV{BB_RELEASE_FLAGS} -DNDEBUG")
         set(CMAKE_C_FLAGS_RELEASE  "$ENV{BB_RELEASE_FLAGS} -DNDEBUG")
-        message( "== ENV override RELEASE ${CMAKE_CXX_FLAGS_RELEASE}" )
-    endif()
-    if( DEFINED ENV{BB_DEBUG_FLAGS} )
+        message("== ENV override RELEASE ${CMAKE_CXX_FLAGS_RELEASE}")
+    endif ()
+    if (DEFINED ENV{BB_DEBUG_FLAGS})
         set(CMAKE_CXX_FLAGS_DEBUG "$ENV{BB_DEBUG_FLAGS}")
         set(CMAKE_C_FLAGS_DEBUG "$ENV{BB_DEBUG_FLAGS}")
-        message( "== ENV override DEBUG ${CMAKE_CXX_FLAGS_DEBUG}")
-    endif()
-ENDIF ()
+        message("== ENV override DEBUG ${CMAKE_CXX_FLAGS_DEBUG}")
+    endif ()
+endif ()
 
-INCLUDE_DIRECTORIES(${CMAKE_INCLUDE_PATH})
+include_directories(${CMAKE_INCLUDE_PATH})
 
-SET(JSC_EXECUTABLE_NAME jsc)
+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(WebKit_DRT_LIBRARY_NAME webkit_DRT)
+set(WTF_LIBRARY_NAME wtf)
+set(JavaScriptCore_LIBRARY_NAME javascriptcore)
+set(WebCore_LIBRARY_NAME webcore)
+set(WebKit_LIBRARY_NAME webkit)
+set(WebKit_DRT_LIBRARY_NAME webkit_DRT)
 
 WEBKIT_OPTION_BEGIN()
 
@@ -204,29 +203,29 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_TIMING ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WORKERS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_XHR_RESPONSE_BLOB ON)
 
-IF (ENABLE_GLES2)
+if (ENABLE_GLES2)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_3D_RENDERING ON)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS ON)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_FILTERS ON)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_SHADERS ON)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL ON)
-ELSE ()
+else ()
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_3D_RENDERING OFF)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS OFF)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_FILTERS OFF)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_SHADERS OFF)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL OFF)
-ENDIF ()
+endif ()
 
-IF (CMAKE_SYSTEM_PROCESSOR MATCHES x86)
+if (CMAKE_SYSTEM_PROCESSOR MATCHES x86)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_JIT OFF)
-ELSE ()
+else ()
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_JIT ON)
-ENDIF ()
+endif ()
 
 WEBKIT_OPTION_END()
 
-ADD_DEFINITIONS(-DENABLE_BLACKBERRY_CREDENTIAL_PERSIST=1)
+add_definitions(-DENABLE_BLACKBERRY_CREDENTIAL_PERSIST=1)
 
 # Some of our files, such as platform/graphics/chromium/ComplexTextControllerLinux.cpp, require a
 # newer ICU version than the version associated with the headers in {WebCore, JavaScriptCore}/icu.
@@ -236,6 +235,6 @@ ADD_DEFINITIONS(-DENABLE_BLACKBERRY_CREDENTIAL_PERSIST=1)
 #
 # FIXME: Make this mechanism more general purpose. Maybe accept a list or directories/files to copy
 # instead of individual variables. Generalizing this solution may allow us to fix <https://bugs.webkit.org/show_bug.cgi?id=70913>.
-SET(BLACKBERRY_THIRD_PARTY_DIR "${CMAKE_BINARY_DIR}/ThirdPartyBlackBerry")
-FILE(COPY ${THIRD_PARTY_ICU_DIR} DESTINATION "${BLACKBERRY_THIRD_PARTY_DIR}/icu")
-FILE(COPY ${THIRD_PARTY_UNICODE_FILE} DESTINATION ${BLACKBERRY_THIRD_PARTY_DIR})
+set(BLACKBERRY_THIRD_PARTY_DIR "${CMAKE_BINARY_DIR}/ThirdPartyBlackBerry")
+file(COPY ${THIRD_PARTY_ICU_DIR} DESTINATION "${BLACKBERRY_THIRD_PARTY_DIR}/icu")
+file(COPY ${THIRD_PARTY_UNICODE_FILE} DESTINATION ${BLACKBERRY_THIRD_PARTY_DIR})
index 7010598..4137d3b 100644 (file)
@@ -1,39 +1,39 @@
-ADD_DEFINITIONS(-DBUILDING_WITH_CMAKE=1)
-ADD_DEFINITIONS(-DHAVE_CONFIG_H=1)
+add_definitions(-DBUILDING_WITH_CMAKE=1)
+add_definitions(-DHAVE_CONFIG_H=1)
 
-IF (WTF_OS_UNIX)
-    ADD_DEFINITIONS(-DXP_UNIX)
+if (WTF_OS_UNIX)
+    add_definitions(-DXP_UNIX)
     #TODO: check for X11 target
-    ADD_DEFINITIONS(-DMOZ_X11) 
-ENDIF (WTF_OS_UNIX)
+    add_definitions(-DMOZ_X11)
+endif (WTF_OS_UNIX)
 
 # CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS only matters with GCC >= 4.7.0.  Since this
 # version, -P does not output empty lines, which currently breaks make_names.pl in
 # WebCore. Investigating whether make_names.pl should be changed instead is left as an exercise to
 # the reader.
-IF (MSVC)
+if (MSVC)
     # FIXME: Some codegenerators don't support paths with spaces. So use the executable name only.
-    GET_FILENAME_COMPONENT(CODE_GENERATOR_PREPROCESSOR_EXECUTABLE ${CMAKE_CXX_COMPILER} NAME)
-    SET(CODE_GENERATOR_PREPROCESSOR "${CODE_GENERATOR_PREPROCESSOR_EXECUTABLE} /nologo /EP")
-    SET(CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS "${CODE_GENERATOR_PREPROCESSOR}")
-ELSEIF (CMAKE_SYSTEM_NAME MATCHES QNX)
-    SET(CODE_GENERATOR_PREPROCESSOR "${CMAKE_CXX_COMPILER} -E -Wp,-P -x c++")
-    SET(CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS "${CODE_GENERATOR_PREPROCESSOR}")
-ELSE ()
-    SET(CODE_GENERATOR_PREPROCESSOR "${CMAKE_CXX_COMPILER} -E -P -x c++")
-    SET(CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS "${CMAKE_CXX_COMPILER} -E -x c++")
-ENDIF ()
+    get_filename_component(CODE_GENERATOR_PREPROCESSOR_EXECUTABLE ${CMAKE_CXX_COMPILER} NAME)
+    set(CODE_GENERATOR_PREPROCESSOR "${CODE_GENERATOR_PREPROCESSOR_EXECUTABLE} /nologo /EP")
+    set(CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS "${CODE_GENERATOR_PREPROCESSOR}")
+elseif (CMAKE_SYSTEM_NAME MATCHES QNX)
+    set(CODE_GENERATOR_PREPROCESSOR "${CMAKE_CXX_COMPILER} -E -Wp,-P -x c++")
+    set(CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS "${CODE_GENERATOR_PREPROCESSOR}")
+else ()
+    set(CODE_GENERATOR_PREPROCESSOR "${CMAKE_CXX_COMPILER} -E -P -x c++")
+    set(CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS "${CMAKE_CXX_COMPILER} -E -x c++")
+endif ()
 
-SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
+set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
-STRING(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR)
-IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR}" MATCHES "(i[3-6]86|x86)" AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+string(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR)
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR}" MATCHES "(i[3-6]86|x86)" AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
     # To avoid out of memory when building with debug option in 32bit system.
     # See https://bugs.webkit.org/show_bug.cgi?id=77327
-    SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-keep-memory ${CMAKE_SHARED_LINKER_FLAGS}")
-ENDIF ()
+    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-keep-memory ${CMAKE_SHARED_LINKER_FLAGS}")
+endif ()
 
-SET(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
+set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
 
-SET(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Where to install libraries (lib${LIB_SUFFIX})")
-SET(EXEC_INSTALL_DIR "bin" CACHE PATH "Where to install executables")
+set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Where to install libraries (lib${LIB_SUFFIX})")
+set(EXEC_INSTALL_DIR "bin" CACHE PATH "Where to install executables")
index 3eb8eab..3bbabb6 100644 (file)
@@ -1,47 +1,47 @@
-SET(PROJECT_VERSION_MAJOR 0)
-SET(PROJECT_VERSION_MINOR 1)
-SET(PROJECT_VERSION_PATCH 0)
-SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
-
-ADD_DEFINITIONS(-DBUILDING_EFL__=1)
-
-IF (NOT DEFINED ENABLE_WEBKIT2)
-    SET(ENABLE_WEBKIT2 ON)
-ENDIF ()
-
-FIND_PACKAGE(Cairo 1.10.2 REQUIRED)
-FIND_PACKAGE(Fontconfig 2.8.0 REQUIRED)
-FIND_PACKAGE(Sqlite REQUIRED)
-FIND_PACKAGE(LibXml2 2.8.0 REQUIRED)
-FIND_PACKAGE(LibXslt 1.1.7 REQUIRED)
-FIND_PACKAGE(ICU REQUIRED)
-FIND_PACKAGE(Threads REQUIRED)
-FIND_PACKAGE(JPEG REQUIRED)
-FIND_PACKAGE(PNG REQUIRED)
-FIND_PACKAGE(ZLIB REQUIRED)
-
-FIND_PACKAGE(GLIB 2.33.2 REQUIRED COMPONENTS gio gobject gthread)
-FIND_PACKAGE(LibSoup 2.39.4.1 REQUIRED)
-
-SET(WTF_USE_SOUP 1)
-ADD_DEFINITIONS(-DWTF_USE_SOUP=1)
-ADD_DEFINITIONS(-DWTF_USE_PTHREADS=1)
-ADD_DEFINITIONS(-DWTF_USE_ICU_UNICODE=1)
-ADD_DEFINITIONS(-DWTF_USE_CAIRO=1)
-
-SET(JSC_EXECUTABLE_NAME jsc)
-
-SET(WTF_LIBRARY_NAME wtf_efl)
-SET(JavaScriptCore_LIBRARY_NAME javascriptcore_efl)
-SET(WebCore_LIBRARY_NAME webcore_efl)
-SET(WebKit_LIBRARY_NAME ewebkit)
-SET(WebKit2_LIBRARY_NAME ewebkit2)
-
-SET(DATA_INSTALL_DIR "share/${WebKit_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR}" CACHE PATH "Installation path for theme data")
-SET(THEME_BINARY_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme)
-FILE(MAKE_DIRECTORY ${THEME_BINARY_DIR})
-
-SET(VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/eflsymbols.filter")
+set(PROJECT_VERSION_MAJOR 0)
+set(PROJECT_VERSION_MINOR 1)
+set(PROJECT_VERSION_PATCH 0)
+set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
+
+add_definitions(-DBUILDING_EFL__=1)
+
+if (NOT DEFINED ENABLE_WEBKIT2)
+    set(ENABLE_WEBKIT2 ON)
+endif ()
+
+find_package(Cairo 1.10.2 REQUIRED)
+find_package(Fontconfig 2.8.0 REQUIRED)
+find_package(Sqlite REQUIRED)
+find_package(LibXml2 2.8.0 REQUIRED)
+find_package(LibXslt 1.1.7 REQUIRED)
+find_package(ICU REQUIRED)
+find_package(Threads REQUIRED)
+find_package(JPEG REQUIRED)
+find_package(PNG REQUIRED)
+find_package(ZLIB REQUIRED)
+
+find_package(GLIB 2.33.2 REQUIRED COMPONENTS gio gobject gthread)
+find_package(LibSoup 2.39.4.1 REQUIRED)
+
+set(WTF_USE_SOUP 1)
+add_definitions(-DWTF_USE_SOUP=1)
+add_definitions(-DWTF_USE_PTHREADS=1)
+add_definitions(-DWTF_USE_ICU_UNICODE=1)
+add_definitions(-DWTF_USE_CAIRO=1)
+
+set(JSC_EXECUTABLE_NAME jsc)
+
+set(WTF_LIBRARY_NAME wtf_efl)
+set(JavaScriptCore_LIBRARY_NAME javascriptcore_efl)
+set(WebCore_LIBRARY_NAME webcore_efl)
+set(WebKit_LIBRARY_NAME ewebkit)
+set(WebKit2_LIBRARY_NAME ewebkit2)
+
+set(DATA_INSTALL_DIR "share/${WebKit_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR}" CACHE PATH "Installation path for theme data")
+set(THEME_BINARY_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme)
+file(MAKE_DIRECTORY ${THEME_BINARY_DIR})
+
+set(VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/eflsymbols.filter")
 
 WEBKIT_OPTION_BEGIN()
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_3D_RENDERING ON)
@@ -94,113 +94,113 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(WTF_USE_TILED_BACKING_STORE ON)
 
 # FIXME: Perhaps we need a more generic way of defining dependencies between features.
 # VIDEO_TRACK depends on VIDEO.
-IF (NOT ENABLE_VIDEO AND ENABLE_VIDEO_TRACK)
-    MESSAGE(STATUS "Disabling VIDEO_TRACK since VIDEO support is disabled.")
-    SET(ENABLE_VIDEO_TRACK OFF)
-ENDIF ()
+if (NOT ENABLE_VIDEO AND ENABLE_VIDEO_TRACK)
+    message(STATUS "Disabling VIDEO_TRACK since VIDEO support is disabled.")
+    set(ENABLE_VIDEO_TRACK OFF)
+endif ()
 WEBKIT_OPTION_END()
 
-OPTION(ENABLE_ECORE_X "Enable Ecore_X specific usage (cursor, bell)" ON)
-IF (ENABLE_ECORE_X)
+option(ENABLE_ECORE_X "Enable Ecore_X specific usage (cursor, bell)" ON)
+if (ENABLE_ECORE_X)
     # We need Xext.h to disable Xlib error messages  when running WTR on Xvfb.
     # These errors are dumped on stderr and makes the test driver thinks that
     # the test case has failed.
-    FIND_PACKAGE(X11 REQUIRED)
+    find_package(X11 REQUIRED)
 
-    LIST(APPEND ECORE_ADDITIONAL_COMPONENTS X)
-    ADD_DEFINITIONS(-DHAVE_ECORE_X)
-ENDIF ()
+    list(APPEND ECORE_ADDITIONAL_COMPONENTS X)
+    add_definitions(-DHAVE_ECORE_X)
+endif ()
 
-FIND_PACKAGE(Eina 1.7 REQUIRED)
-FIND_PACKAGE(Evas 1.7 REQUIRED)
-FIND_PACKAGE(Ecore 1.7 COMPONENTS Evas File Input ${ECORE_ADDITIONAL_COMPONENTS})
-FIND_PACKAGE(Edje 1.7 REQUIRED)
-FIND_PACKAGE(Eet 1.7 REQUIRED)
-FIND_PACKAGE(Eeze 1.7 REQUIRED)
-FIND_PACKAGE(Efreet 1.7 REQUIRED)
-FIND_PACKAGE(E_DBus 1.7 COMPONENTS EUKit)
+find_package(Eina 1.7 REQUIRED)
+find_package(Evas 1.7 REQUIRED)
+find_package(Ecore 1.7 COMPONENTS Evas File Input ${ECORE_ADDITIONAL_COMPONENTS})
+find_package(Edje 1.7 REQUIRED)
+find_package(Eet 1.7 REQUIRED)
+find_package(Eeze 1.7 REQUIRED)
+find_package(Efreet 1.7 REQUIRED)
+find_package(E_DBus 1.7 COMPONENTS EUKit)
 
 # Elementary is needed to build MiniBrowser
-FIND_PACKAGE(Elementary 1.7)
+find_package(Elementary 1.7)
 
-FIND_PACKAGE(Freetype 2.4.2 REQUIRED)
-FIND_PACKAGE(HarfBuzz 0.9.2 REQUIRED)
-ADD_DEFINITIONS(-DWTF_USE_FREETYPE=1)
-ADD_DEFINITIONS(-DWTF_USE_HARFBUZZ_NG=1)
+find_package(Freetype 2.4.2 REQUIRED)
+find_package(HarfBuzz 0.9.2 REQUIRED)
+add_definitions(-DWTF_USE_FREETYPE=1)
+add_definitions(-DWTF_USE_HARFBUZZ_NG=1)
 
-IF (ENABLE_WEBKIT2 AND ENABLE_NETSCAPE_PLUGIN_API)
-    SET(ENABLE_PLUGIN_PROCESS 1)
-ENDIF ()
+if (ENABLE_WEBKIT2 AND ENABLE_NETSCAPE_PLUGIN_API)
+    set(ENABLE_PLUGIN_PROCESS 1)
+endif ()
 
-IF (NOT ENABLE_SVG)
-  SET(ENABLE_SVG_FONTS 0)
-ENDIF ()
+if (NOT ENABLE_SVG)
+    set(ENABLE_SVG_FONTS 0)
+endif ()
 
-IF (ENABLE_BATTERY_STATUS)
-    FIND_PACKAGE(DBus REQUIRED)
-ENDIF ()
+if (ENABLE_BATTERY_STATUS)
+    find_package(DBus REQUIRED)
+endif ()
 
-IF (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
-    SET(GSTREAMER_COMPONENTS app interfaces pbutils)
-    SET(WTF_USE_GSTREAMER 1)
-    ADD_DEFINITIONS(-DWTF_USE_GSTREAMER=1)
+if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
+    set(GSTREAMER_COMPONENTS app interfaces pbutils)
+    set(WTF_USE_GSTREAMER 1)
+    add_definitions(-DWTF_USE_GSTREAMER=1)
 
-    IF (ENABLE_VIDEO)
-        LIST(APPEND GSTREAMER_COMPONENTS video)
-    ENDIF()
+    if (ENABLE_VIDEO)
+        list(APPEND GSTREAMER_COMPONENTS video)
+    endif ()
 
-    IF (ENABLE_WEB_AUDIO)
-        LIST(APPEND GSTREAMER_COMPONENTS audio fft)
-        ADD_DEFINITIONS(-DWTF_USE_WEBAUDIO_GSTREAMER=1)
-    ENDIF ()
+    if (ENABLE_WEB_AUDIO)
+        list(APPEND GSTREAMER_COMPONENTS audio fft)
+        add_definitions(-DWTF_USE_WEBAUDIO_GSTREAMER=1)
+    endif ()
 
-    FIND_PACKAGE(GStreamer REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
-ENDIF ()
+    find_package(GStreamer REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
+endif ()
 
-IF (ENABLE_WEBGL OR WTF_USE_TILED_BACKING_STORE)
-    FIND_PACKAGE(OpenGL REQUIRED)
+if (ENABLE_WEBGL OR WTF_USE_TILED_BACKING_STORE)
+    find_package(OpenGL REQUIRED)
     CHECK_INCLUDE_FILES("GL/glx.h" OPENGLX_FOUND)
 
-    IF (OPENGLX_FOUND)
-        ADD_DEFINITIONS(-DHAVE_GLX)
-        IF (X11_Xcomposite_FOUND AND X11_Xrender_FOUND)
-           SET(USE_GRAPHICS_SURFACE 1)
-        ENDIF()
-    ENDIF()
-ENDIF ()
+    if (OPENGLX_FOUND)
+        add_definitions(-DHAVE_GLX)
+        if (X11_Xcomposite_FOUND AND X11_Xrender_FOUND)
+           set(USE_GRAPHICS_SURFACE 1)
+        endif ()
+    endif ()
+endif ()
 
-IF (ENABLE_INSPECTOR)
-    SET(WEB_INSPECTOR_DIR "${DATA_INSTALL_DIR}/inspector")
-    ADD_DEFINITIONS(-DWEB_INSPECTOR_DIR=\"${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}\")
-    ADD_DEFINITIONS(-DWEB_INSPECTOR_INSTALL_DIR=\"${CMAKE_INSTALL_PREFIX}/${WEB_INSPECTOR_DIR}\")
-ENDIF ()
+if (ENABLE_INSPECTOR)
+    set(WEB_INSPECTOR_DIR "${DATA_INSTALL_DIR}/inspector")
+    add_definitions(-DWEB_INSPECTOR_DIR=\"${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}\")
+    add_definitions(-DWEB_INSPECTOR_INSTALL_DIR=\"${CMAKE_INSTALL_PREFIX}/${WEB_INSPECTOR_DIR}\")
+endif ()
 
-SET(CPACK_SOURCE_GENERATOR TBZ2)
+set(CPACK_SOURCE_GENERATOR TBZ2)
 
-IF (WTF_USE_TILED_BACKING_STORE)
-  ADD_DEFINITIONS(-DWTF_USE_ACCELERATED_COMPOSITING=1)
+if (WTF_USE_TILED_BACKING_STORE)
+    add_definitions(-DWTF_USE_ACCELERATED_COMPOSITING=1)
 
-  ADD_DEFINITIONS(-DWTF_USE_COORDINATED_GRAPHICS=1)
+    add_definitions(-DWTF_USE_COORDINATED_GRAPHICS=1)
 
-  SET(WTF_USE_TEXTURE_MAPPER 1)
-  ADD_DEFINITIONS(-DWTF_USE_TEXTURE_MAPPER=1)
+    set(WTF_USE_TEXTURE_MAPPER 1)
+    add_definitions(-DWTF_USE_TEXTURE_MAPPER=1)
 
-  SET(WTF_USE_3D_GRAPHICS 1)
-  ADD_DEFINITIONS(-DWTF_USE_3D_GRAPHICS=1)
+    set(WTF_USE_3D_GRAPHICS 1)
+    add_definitions(-DWTF_USE_3D_GRAPHICS=1)
 
-  SET(ENABLE_3D_RENDERING 1)
-  ADD_DEFINITIONS(-DENABLE_3D_RENDERING=1)
-ENDIF()
+    set(ENABLE_3D_RENDERING 1)
+    add_definitions(-DENABLE_3D_RENDERING=1)
+endif ()
 
-IF (ENABLE_WEBGL)
-    SET(ENABLE_WEBGL 1)
-    IF (USE_GRAPHICS_SURFACE)
-        ADD_DEFINITIONS(-DWTF_USE_GRAPHICS_SURFACE=1)
-    ENDIF()
-ENDIF()
+if (ENABLE_WEBGL)
+    set(ENABLE_WEBGL 1)
+    if (USE_GRAPHICS_SURFACE)
+        add_definitions(-DWTF_USE_GRAPHICS_SURFACE=1)
+    endif ()
+endif ()
 
-IF (ENABLE_SPELLCHECK)
-    FIND_PACKAGE(Enchant REQUIRED)
-ENDIF()
+if (ENABLE_SPELLCHECK)
+    find_package(Enchant REQUIRED)
+endif ()
 
-FIND_PACKAGE(ATK REQUIRED)
+find_package(ATK REQUIRED)
index f682312..eb0d89f 100644 (file)
@@ -1,23 +1,23 @@
-INCLUDE(OptionsWindows)
+include(OptionsWindows)
 
-ADD_DEFINITIONS(-D_CE_CRT_ALLOW_WIN_MINMAX)
-ADD_DEFINITIONS(-DWTF_USE_WCHAR_UNICODE=1)
-ADD_DEFINITIONS(-DWTF_USE_WININET=1)
-ADD_DEFINITIONS(-DWTF_CPU_ARM_TRADITIONAL -DWINCEBASIC)
-ADD_DEFINITIONS(-DJS_NO_EXPORT)
-ADD_DEFINITIONS(-DHAVE_ACCESSIBILITY=0)
-ADD_DEFINITIONS(-DJSCCOLLECTOR_VIRTUALMEM_RESERVATION=0x200000)
+add_definitions(-D_CE_CRT_ALLOW_WIN_MINMAX)
+add_definitions(-DWTF_USE_WCHAR_UNICODE=1)
+add_definitions(-DWTF_USE_WININET=1)
+add_definitions(-DWTF_CPU_ARM_TRADITIONAL -DWINCEBASIC)
+add_definitions(-DJS_NO_EXPORT)
+add_definitions(-DHAVE_ACCESSIBILITY=0)
+add_definitions(-DJSCCOLLECTOR_VIRTUALMEM_RESERVATION=0x200000)
 
-IF (NOT 3RDPARTY_DIR)
-    IF (EXISTS $ENV{WEBKITTHIRDPARTYDIR})
-        SET(3RDPARTY_DIR $ENV{WEBKITTHIRDPARTYDIR})
-    ELSE ()
-        MESSAGE(FATAL_ERROR "You must provide a third party directory for WinCE port.")
-    ENDIF ()
-ENDIF ()
+if (NOT 3RDPARTY_DIR)
+    if (EXISTS $ENV{WEBKITTHIRDPARTYDIR})
+        set(3RDPARTY_DIR $ENV{WEBKITTHIRDPARTYDIR})
+    else ()
+        message(FATAL_ERROR "You must provide a third party directory for WinCE port.")
+    endif ()
+endif ()
 
-INCLUDE_DIRECTORIES(${3RDPARTY_DIR}/ce-compat)
-ADD_SUBDIRECTORY(${3RDPARTY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/3rdparty")
+include_directories(${3RDPARTY_DIR}/ce-compat)
+add_subdirectory(${3RDPARTY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/3rdparty")
 
 WEBKIT_OPTION_BEGIN()
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT OFF)
index 6234b0d..cc29c80 100644 (file)
@@ -1,22 +1,22 @@
-ADD_DEFINITIONS(-DWTF_PLATFORM_WIN=1)
-SET(WTF_PLATFORM_WIN 1)
+add_definitions(-DWTF_PLATFORM_WIN=1)
+set(WTF_PLATFORM_WIN 1)
 
-ADD_DEFINITIONS(-D_HAS_EXCEPTIONS=0 -DNOMINMAX -DUNICODE)
+add_definitions(-D_HAS_EXCEPTIONS=0 -DNOMINMAX -DUNICODE)
 
-INCLUDE_DIRECTORIES(${JAVASCRIPTCORE_DIR}/os-win32)
+include_directories(${JAVASCRIPTCORE_DIR}/os-win32)
 
-IF (MSVC)
-    ADD_DEFINITIONS(/WX
+if (MSVC)
+    add_definitions(/WX
         /wd4018 /wd4065 /wd4068 /wd4099 /wd4100 /wd4127 /wd4138 /wd4180 /wd4189 /wd4201 /wd4244 /wd4251 /wd4275 /wd4288 /wd4291
         /wd4305 /wd4344 /wd4355 /wd4389 /wd4396 /wd4503 /wd4505 /wd4510 /wd4512 /wd4610 /wd4706 /wd4800 /wd4951 /wd4952 /wd4996)
 
-    STRING(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable C++ exceptions
-    STRING(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
+    string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable C++ exceptions
+    string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
 
-    IF (NOT MSVC_VERSION LESS 1500)
-        SET(CMAKE_C_FLAGS "/MP ${CMAKE_C_FLAGS}")
-        SET(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS}")
-    ENDIF ()
-ENDIF ()
+    if (NOT MSVC_VERSION LESS 1500)
+        set(CMAKE_C_FLAGS "/MP ${CMAKE_C_FLAGS}")
+        set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS}")
+    endif ()
+endif ()
 
-STRING(REPLACE "/ENTRY:mainACRTStartup" "/ENTRY:WinMainCRTStartup" CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
+string(REPLACE "/ENTRY:mainACRTStartup" "/ENTRY:WinMainCRTStartup" CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
index 0a0778d..899eaef 100644 (file)
@@ -1,10 +1,10 @@
-FILE(MAKE_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR})
-FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Source/JavaScriptCore/runtime)
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR})
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Source/JavaScriptCore/runtime)
 
-IF (ENABLE_WEBCORE)
-    FILE(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR})
-ENDIF ()
+if (ENABLE_WEBCORE)
+    file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR})
+endif ()
 
-IF (ENABLE_WEBKIT2)
-    FILE(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2_DIR})
-ENDIF ()
+if (ENABLE_WEBKIT2)
+    file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2_DIR})
+endif ()
index 3a0486e..f9f54fe 100644 (file)
@@ -1,16 +1,16 @@
-SET(_WEBKIT_AVAILABLE_OPTIONS "")
+set(_WEBKIT_AVAILABLE_OPTIONS "")
 
-MACRO (WEBKIT_OPTION_DEFINE _name _description _initialvalue)
-    SET(_WEBKIT_AVAILABLE_OPTIONS_INITALVALUE_${_name} ${_initialvalue})
-    SET(_WEBKIT_AVAILABLE_OPTIONS_DESCRIPTION_${_name} ${_description})
-    LIST(APPEND _WEBKIT_AVAILABLE_OPTIONS ${_name})
-ENDMACRO ()
+macro(WEBKIT_OPTION_DEFINE _name _description _initialvalue)
+    set(_WEBKIT_AVAILABLE_OPTIONS_INITALVALUE_${_name} ${_initialvalue})
+    set(_WEBKIT_AVAILABLE_OPTIONS_DESCRIPTION_${_name} ${_description})
+    list(APPEND _WEBKIT_AVAILABLE_OPTIONS ${_name})
+endmacro()
 
-MACRO (WEBKIT_OPTION_DEFAULT_PORT_VALUE _name _value)
-    SET(_WEBKIT_AVAILABLE_OPTIONS_INITALVALUE_${_name} ${_value})
-ENDMACRO ()
+macro(WEBKIT_OPTION_DEFAULT_PORT_VALUE _name _value)
+    set(_WEBKIT_AVAILABLE_OPTIONS_INITALVALUE_${_name} ${_value})
+endmacro()
 
-MACRO (WEBKIT_OPTION_BEGIN)
+macro(WEBKIT_OPTION_BEGIN)
     WEBKIT_OPTION_DEFINE(ENABLE_3D_RENDERING "Toggle 3D rendering support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_ACCELERATED_2D_CANVAS "Toggle accelerated 2D canvas support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_ANIMATION_API "Toggle animation API support" OFF)
@@ -23,7 +23,7 @@ MACRO (WEBKIT_OPTION_BEGIN)
     WEBKIT_OPTION_DEFINE(ENABLE_CSS3_BACKGROUND "Toggle CSS3 Background support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_CSS3_CONDITIONAL_RULES "Toggle CSS3 Conditional Rules support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_CSS3_TEXT "Toggle CSS3 Text support" OFF)
-    WEBKIT_OPTION_DEFINE(ENABLE_CSS_BOX_DECORATION_BREAK "Toggle Box Decoration Break (CSS Backgrounds and Borders) support" ON)
+    WEBKIT_OPTION_DEFINE(ENABLE_CSS_BOX_DECORATION_BREAK "Toggle Box Decoration break (CSS Backgrounds and Borders) support" ON)
     WEBKIT_OPTION_DEFINE(ENABLE_CSS_COMPOSITING "Toggle CSS COMPOSITING support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_CSS_DEVICE_ADAPTATION "Toggle CSS Device Adaptation support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_CSS_EXCLUSIONS "Toggle CSS Exclusion support" OFF)
@@ -128,48 +128,48 @@ MACRO (WEBKIT_OPTION_BEGIN)
     WEBKIT_OPTION_DEFINE(USE_SYSTEM_MALLOC "Toggle system allocator instead of TCmalloc" OFF)
     WEBKIT_OPTION_DEFINE(WTF_USE_TILED_BACKING_STORE "Toggle Tiled Backing Store support" OFF)
     WEBKIT_OPTION_DEFINE(WTF_USE_WTFURL "Toogle the use of WTFURL for URL parsing" OFF)
-ENDMACRO ()
+endmacro()
 
-MACRO (WEBKIT_OPTION_END)
-    FOREACH (_name ${_WEBKIT_AVAILABLE_OPTIONS})
-        OPTION(${_name} "${_WEBKIT_AVAILABLE_OPTIONS_DESCRIPTION_${_name}}" ${_WEBKIT_AVAILABLE_OPTIONS_INITALVALUE_${_name}})
-    ENDFOREACH ()
+macro(WEBKIT_OPTION_END)
+    foreach (_name ${_WEBKIT_AVAILABLE_OPTIONS})
+        option(${_name} "${_WEBKIT_AVAILABLE_OPTIONS_DESCRIPTION_${_name}}" ${_WEBKIT_AVAILABLE_OPTIONS_INITALVALUE_${_name}})
+    endforeach ()
 
 
-    MESSAGE(STATUS "Enabled features:")
+    message(STATUS "Enabled features:")
 
-    SET(_MAX_FEATURE_LENGTH 0)
-    FOREACH (_name ${_WEBKIT_AVAILABLE_OPTIONS})
-        STRING(LENGTH ${_name} _NAME_LENGTH)
-        IF (_NAME_LENGTH GREATER _MAX_FEATURE_LENGTH)
-            SET(_MAX_FEATURE_LENGTH ${_NAME_LENGTH})
-        ENDIF ()
-    ENDFOREACH ()
+    set(_MAX_FEATURE_LENGTH 0)
+    foreach (_name ${_WEBKIT_AVAILABLE_OPTIONS})
+        string(LENGTH ${_name} _NAME_LENGTH)
+        if (_NAME_LENGTH GREATER _MAX_FEATURE_LENGTH)
+            set(_MAX_FEATURE_LENGTH ${_NAME_LENGTH})
+        endif ()
+    endforeach ()
 
-    SET(_SHOULD_PRINT_POINTS OFF)
-    FOREACH (_name ${_WEBKIT_AVAILABLE_OPTIONS})
-        STRING(LENGTH ${_name} _NAME_LENGTH)
+    set(_SHOULD_PRINT_POINTS OFF)
+    foreach (_name ${_WEBKIT_AVAILABLE_OPTIONS})
+        string(LENGTH ${_name} _NAME_LENGTH)
 
-        SET(_MESSAGE " ${_name} ")
+        set(_MESSAGE " ${_name} ")
 
-        IF (_SHOULD_PRINT_POINTS)
-            FOREACH (IGNORE RANGE ${_NAME_LENGTH} ${_MAX_FEATURE_LENGTH})
-                SET(_MESSAGE "${_MESSAGE} ")
-            ENDFOREACH ()
-            SET(_SHOULD_PRINT_POINTS OFF)
-        ELSE ()
-            FOREACH (IGNORE RANGE ${_NAME_LENGTH} ${_MAX_FEATURE_LENGTH})
-                SET(_MESSAGE "${_MESSAGE}.")
-            ENDFOREACH ()
-            SET(_SHOULD_PRINT_POINTS ON)
-        ENDIF ()
+        if (_SHOULD_PRINT_POINTS)
+            foreach (IGNORE RANGE ${_NAME_LENGTH} ${_MAX_FEATURE_LENGTH})
+                set(_MESSAGE "${_MESSAGE} ")
+            endforeach ()
+            set(_SHOULD_PRINT_POINTS OFF)
+        else ()
+            foreach (IGNORE RANGE ${_NAME_LENGTH} ${_MAX_FEATURE_LENGTH})
+                set(_MESSAGE "${_MESSAGE}.")
+            endforeach ()
+            set(_SHOULD_PRINT_POINTS ON)
+        endif ()
 
-        IF (${_name})
-            LIST(APPEND FEATURE_DEFINES ${_name})
-            SET(FEATURE_DEFINES_WITH_SPACE_SEPARATOR "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR} ${_name}")
-        ENDIF ()
+        if (${_name})
+            list(APPEND FEATURE_DEFINES ${_name})
+            set(FEATURE_DEFINES_WITH_SPACE_SEPARATOR "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR} ${_name}")
+        endif ()
 
-        SET(_MESSAGE "${_MESSAGE} ${_WEBKIT_AVAILABLE_OPTIONS_INITALVALUE_${_name}}")
-        MESSAGE(STATUS "${_MESSAGE}")
-    ENDFOREACH ()
-ENDMACRO ()
+        set(_MESSAGE "${_MESSAGE} ${_WEBKIT_AVAILABLE_OPTIONS_INITALVALUE_${_name}}")
+        message(STATUS "${_MESSAGE}")
+    endforeach ()
+endmacro()
index 23b219b..1e51ebc 100644 (file)
-INCLUDE(CMakeParseArguments)
+include(CMakeParseArguments)
 # Sets extra compile flags for a target, depending on the compiler being used.
 # Currently, only GCC is supported.
-MACRO(WEBKIT_SET_EXTRA_COMPILER_FLAGS _target)
-  SET(options ENABLE_WERROR IGNORECXX_WARNINGS)
-  CMAKE_PARSE_ARGUMENTS("OPTION" "${options}" "" "" ${ARGN})
-  IF (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-    GET_TARGET_PROPERTY(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
-    IF (${OLD_COMPILE_FLAGS} STREQUAL "OLD_COMPILE_FLAGS-NOTFOUND")
-        SET(OLD_COMPILE_FLAGS "")
-    ENDIF ()
-
-    INCLUDE(TestCXXAcceptsFlag)
-    CHECK_CXX_ACCEPTS_FLAG("-dumpversion" CMAKE_CXX_ACCEPTS_DUMPVERSION)
-    IF (CMAKE_CXX_ACCEPTS_DUMPVERSION)
-        EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE COMPILER_VERSION)
-    ELSE ()
-        EXEC_PROGRAM("${CMAKE_CXX_COMPILER} -E -Wp,-dM - < /dev/null | grep '#define __VERSION__' | grep -E -o '[0-9]+\\.[0-9]+\\.?[0-9]+?'" OUTPUT_VARIABLE COMPILER_VERSION)
-    ENDIF ()
-
-    # Disable some optimizations on buggy compiler versions
-    # GCC 4.5.1 does not implement -ftree-sra correctly
-    IF (${COMPILER_VERSION} STREQUAL "4.5.1")
-        SET(OLD_COMPILE_FLAGS "-fno-tree-sra ${OLD_COMPILE_FLAGS}")
-    ENDIF ()
-
-    IF (NOT SHARED_CORE)
-        SET(OLD_COMPILE_FLAGS "-fvisibility=hidden ${OLD_COMPILE_FLAGS}")
-    ENDIF ()
-
-    GET_TARGET_PROPERTY(TARGET_TYPE ${_target} TYPE)
-    IF (${TARGET_TYPE} STREQUAL "STATIC_LIBRARY") # -fPIC is automatically added to shared libraries
-        SET(OLD_COMPILE_FLAGS "-fPIC ${OLD_COMPILE_FLAGS}")
-    ENDIF ()
-
-    SET(OLD_COMPILE_FLAGS "-fno-exceptions -fno-strict-aliasing ${OLD_COMPILE_FLAGS}")
-
-    # Enable warnings by default
-    IF (NOT ${OPTION_IGNORECXX_WARNINGS})
-        SET(OLD_COMPILE_FLAGS "-Wall -Wextra -Wcast-align -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wundef -Wwrite-strings ${OLD_COMPILE_FLAGS}")
-    ENDIF ()
-
-    # Enable errors on warning
-    IF (OPTION_ENABLE_WERROR)
-        SET(OLD_COMPILE_FLAGS "-Werror -Wno-error=unused-parameter ${OLD_COMPILE_FLAGS}")
-    ENDIF ()
-
-    # Disable C++0x compat warnings for GCC >= 4.6.0 until we build
-    # cleanly with that.
-    IF (NOT ${OPTION_IGNORECXX_WARNINGS} AND NOT ${COMPILER_VERSION} VERSION_LESS "4.6.0")
-        SET(OLD_COMPILE_FLAGS "${OLD_COMPILE_FLAGS} -Wno-c++0x-compat")
-    ENDIF ()
-
-    SET_TARGET_PROPERTIES (${_target} PROPERTIES
-       COMPILE_FLAGS "${OLD_COMPILE_FLAGS}")
-
-    UNSET(OLD_COMPILE_FLAGS)
-  ENDIF ()
-ENDMACRO()
+macro(WEBKIT_SET_EXTRA_COMPILER_FLAGS _target)
+    set(options ENABLE_WERROR IGNORECXX_WARNINGS)
+    CMAKE_PARSE_ARGUMENTS("OPTION" "${options}" "" "" ${ARGN})
+    if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+        get_target_property(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
+        if (${OLD_COMPILE_FLAGS} STREQUAL "OLD_COMPILE_FLAGS-NOTFOUND")
+            set(OLD_COMPILE_FLAGS "")
+        endif ()
+
+        include(TestCXXAcceptsFlag)
+        CHECK_CXX_ACCEPTS_FLAG("-dumpversion" CMAKE_CXX_ACCEPTS_DUMPVERSION)
+        if (CMAKE_CXX_ACCEPTS_DUMPVERSION)
+            EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE COMPILER_VERSION)
+        else ()
+            EXEC_PROGRAM("${CMAKE_CXX_COMPILER} -E -Wp,-dM - < /dev/null | grep '#define __VERSION__' | grep -E -o '[0-9]+\\.[0-9]+\\.?[0-9]+?'" OUTPUT_VARIABLE COMPILER_VERSION)
+        endif ()
+
+        # Disable some optimizations on buggy compiler versions
+        # GCC 4.5.1 does not implement -ftree-sra correctly
+        if (${COMPILER_VERSION} STREQUAL "4.5.1")
+            set(OLD_COMPILE_FLAGS "-fno-tree-sra ${OLD_COMPILE_FLAGS}")
+        endif ()
+
+        if (NOT SHARED_CORE)
+            set(OLD_COMPILE_FLAGS "-fvisibility=hidden ${OLD_COMPILE_FLAGS}")
+        endif ()
+
+        get_target_property(TARGET_TYPE ${_target} TYPE)
+        if (${TARGET_TYPE} STREQUAL "STATIC_LIBRARY") # -fPIC is automatically added to shared libraries
+            set(OLD_COMPILE_FLAGS "-fPIC ${OLD_COMPILE_FLAGS}")
+        endif ()
+
+        set(OLD_COMPILE_FLAGS "-fno-exceptions -fno-strict-aliasing ${OLD_COMPILE_FLAGS}")
+
+        # Enable warnings by default
+        if (NOT ${OPTION_IGNORECXX_WARNINGS})
+            set(OLD_COMPILE_FLAGS "-Wall -Wextra -Wcast-align -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wundef -Wwrite-strings ${OLD_COMPILE_FLAGS}")
+        endif ()
+
+        # Enable errors on warning
+        if (OPTION_ENABLE_WERROR)
+            set(OLD_COMPILE_FLAGS "-Werror -Wno-error=unused-parameter ${OLD_COMPILE_FLAGS}")
+        endif ()
+
+        # Disable C++0x compat warnings for GCC >= 4.6.0 until we build
+        # cleanly with that.
+        if (NOT ${OPTION_IGNORECXX_WARNINGS} AND NOT ${COMPILER_VERSION} VERSION_LESS "4.6.0")
+            set(OLD_COMPILE_FLAGS "${OLD_COMPILE_FLAGS} -Wno-c++0x-compat")
+        endif ()
+
+        set_target_properties(${_target} PROPERTIES
+            COMPILE_FLAGS "${OLD_COMPILE_FLAGS}")
+
+        unset(OLD_COMPILE_FLAGS)
+    endif ()
+endmacro()
 
 
 # Append the given flag to the target property.
-# Builds on top of GET_TARGET_PROPERTY() and SET_TARGET_PROPERTIES()
-MACRO (ADD_TARGET_PROPERTIES _target _property _flags)
-  GET_TARGET_PROPERTY (_tmp ${_target} ${_property})
-  IF (NOT _tmp)
-    SET (_tmp "")
-  ENDIF (NOT _tmp)
+# Builds on top of get_target_property() and set_target_properties()
+macro(ADD_TARGET_PROPERTIES _target _property _flags)
+    get_target_property(_tmp ${_target} ${_property})
+    if (NOT _tmp)
+        set(_tmp "")
+    endif (NOT _tmp)
 
-  FOREACH (f ${_flags})
-    SET (_tmp "${_tmp} ${f}")
-  ENDFOREACH (f ${_flags})
+    foreach (f ${_flags})
+        set(_tmp "${_tmp} ${f}")
+    endforeach (f ${_flags})
 
-  SET_TARGET_PROPERTIES (${_target} PROPERTIES ${_property} ${_tmp})
-  UNSET (_tmp)
-ENDMACRO (ADD_TARGET_PROPERTIES _target _property _flags)
+    set_target_properties(${_target} PROPERTIES ${_property} ${_tmp})
+    unset(_tmp)
+endmacro(ADD_TARGET_PROPERTIES _target _property _flags)
 
 
 # Append the given dependencies to the source file
-MACRO(ADD_SOURCE_DEPENDENCIES _source _deps)
-  GET_SOURCE_FILE_PROPERTY(_tmp ${_source} OBJECT_DEPENDS)
-  IF (NOT _tmp)
-    SET (_tmp "")
-  ENDIF ()
+macro(ADD_SOURCE_DEPENDENCIES _source _deps)
+    get_source_file_property(_tmp ${_source} OBJECT_DEPENDS)
+    if (NOT _tmp)
+        set(_tmp "")
+    endif ()
 
-  FOREACH (f ${_deps})
-    LIST(APPEND _tmp "${f}")
-  ENDFOREACH ()
+    foreach (f ${_deps})
+        list(APPEND _tmp "${f}")
+    endforeach ()
 
-  SET_SOURCE_FILES_PROPERTIES(${_source} PROPERTIES OBJECT_DEPENDS "${_tmp}")
-  UNSET(_tmp)
-ENDMACRO()
+    set_source_files_properties(${_source} PROPERTIES OBJECT_DEPENDS "${_tmp}")
+    unset(_tmp)
+endmacro()
 
 
 # Append the given dependencies to the source file
 # This one consider the given dependencies are in ${DERIVED_SOURCES_WEBCORE_DIR}
 # and prepends this to every member of dependencies list
-MACRO(ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES _source _deps)
-  SET(_tmp "")
-  FOREACH (f ${_deps})
-    LIST(APPEND _tmp "${DERIVED_SOURCES_WEBCORE_DIR}/${f}")
-  ENDFOREACH ()
-
-  ADD_SOURCE_DEPENDENCIES(${_source} ${_tmp})
-  UNSET(_tmp)
-ENDMACRO()
-
+macro(ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES _source _deps)
+    set(_tmp "")
+    foreach (f ${_deps})
+        list(APPEND _tmp "${DERIVED_SOURCES_WEBCORE_DIR}/${f}")
+    endforeach ()
+
+    ADD_SOURCE_DEPENDENCIES(${_source} ${_tmp})
+    unset(_tmp)
+endmacro()
index 86e6943..ac536a2 100644 (file)
@@ -1,27 +1,27 @@
-MACRO (INCLUDE_IF_EXISTS _file)
-    IF (EXISTS ${_file})
-        MESSAGE(STATUS "Using platform-specific CMakeLists: ${_file}")
-        INCLUDE(${_file})
-    ELSE ()
-        MESSAGE(STATUS "Platform-specific CMakeLists not found: ${_file}")
-    ENDIF ()
-ENDMACRO ()
+macro(INCLUDE_IF_EXISTS _file)
+    if (EXISTS ${_file})
+        message(STATUS "Using platform-specific CMakeLists: ${_file}")
+        include(${_file})
+    else ()
+        message(STATUS "Platform-specific CMakeLists not found: ${_file}")
+    endif ()
+endmacro()
 
 
 # Append the given dependencies to the source file
-MACRO (ADD_SOURCE_DEPENDENCIES _source _deps)
-    SET(_tmp)
-    GET_SOURCE_FILE_PROPERTY(_tmp ${_source} OBJECT_DEPENDS)
-    IF (NOT _tmp)
-        SET(_tmp "")
-    ENDIF ()
+macro(ADD_SOURCE_DEPENDENCIES _source _deps)
+    set(_tmp)
+    get_source_file_property(_tmp ${_source} OBJECT_DEPENDS)
+    if (NOT _tmp)
+        set(_tmp "")
+    endif ()
 
-    FOREACH (f ${_deps})
-        LIST(APPEND _tmp "${f}")
-    ENDFOREACH ()
+    foreach (f ${_deps})
+        list(APPEND _tmp "${f}")
+    endforeach ()
 
-    SET_SOURCE_FILES_PROPERTIES(${_source} PROPERTIES OBJECT_DEPENDS "${_tmp}")
-ENDMACRO ()
+    set_source_files_properties(${_source} PROPERTIES OBJECT_DEPENDS "${_tmp}")
+endmacro()
 
 
 # Helper macro which wraps generate-bindings.pl script.
@@ -34,18 +34,18 @@ ENDMACRO ()
 #   _prefix is a prefix of output files. (eg. JS - it makes JSXXX.cpp JSXXX.h from XXX.idl)
 #   _generator is a value of --generator argument.
 #   _supplemental_dependency_file is a value of --supplementalDependencyFile. (optional)
-MACRO (GENERATE_BINDINGS _output_source _input_files _base_dir _idl_includes _features _destination _prefix _generator)
-    SET(BINDING_GENERATOR ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl)
+macro(GENERATE_BINDINGS _output_source _input_files _base_dir _idl_includes _features _destination _prefix _generator)
+    set(BINDING_GENERATOR ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl)
 
-    SET(_supplemental_dependency_file ${ARGN})
-    IF (_supplemental_dependency_file)
-        SET(_supplemental_dependency --supplementalDependencyFile ${_supplemental_dependency_file})
-    ENDIF ()
+    set(_supplemental_dependency_file ${ARGN})
+    if (_supplemental_dependency_file)
+        set(_supplemental_dependency --supplementalDependencyFile ${_supplemental_dependency_file})
+    endif ()
 
-    FOREACH (_file ${_input_files})
-        GET_FILENAME_COMPONENT (_name ${_file} NAME_WE)
+    foreach (_file ${_input_files})
+        get_filename_component(_name ${_file} NAME_WE)
 
-        ADD_CUSTOM_COMMAND(
+        add_custom_command(
             OUTPUT ${_destination}/${_prefix}${_name}.cpp ${_destination}/${_prefix}${_name}.h
             MAIN_DEPENDENCY ${_file}
             DEPENDS ${BINDING_GENERATOR} ${SCRIPTS_BINDINGS} ${_supplemental_dependency_file}
@@ -53,220 +53,220 @@ MACRO (GENERATE_BINDINGS _output_source _input_files _base_dir _idl_includes _fe
             WORKING_DIRECTORY ${_base_dir}
             VERBATIM)
 
-        LIST(APPEND ${_output_source} ${_destination}/${_prefix}${_name}.cpp)
-    ENDFOREACH ()
-ENDMACRO ()
+        list(APPEND ${_output_source} ${_destination}/${_prefix}${_name}.cpp)
+    endforeach ()
+endmacro()
 
 
-MACRO (GENERATE_FONT_NAMES _infile)
-    SET(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_names.pl)
-    SET(_arguments  --fonts ${_infile})
-    SET(_outputfiles ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitFontFamilyNames.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitFontFamilyNames.h)
+macro(GENERATE_FONT_NAMES _infile)
+    set(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_names.pl)
+    set(_arguments  --fonts ${_infile})
+    set(_outputfiles ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitFontFamilyNames.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitFontFamilyNames.h)
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT  ${_outputfiles}
         MAIN_DEPENDENCY ${_infile}
         DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS}
         COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR} ${_arguments}
         VERBATIM)
-ENDMACRO ()
+endmacro()
 
 
-MACRO (GENERATE_EVENT_FACTORY _infile _outfile)
-    SET(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_event_factory.pl)
+macro(GENERATE_EVENT_FACTORY _infile _outfile)
+    set(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_event_factory.pl)
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT  ${DERIVED_SOURCES_WEBCORE_DIR}/${_outfile}
         MAIN_DEPENDENCY ${_infile}
         DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS}
         COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}
         VERBATIM)
-ENDMACRO ()
+endmacro()
 
 
-MACRO (GENERATE_EXCEPTION_CODE_DESCRIPTION _infile _outfile)
-    SET(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_dom_exceptions.pl)
+macro(GENERATE_EXCEPTION_CODE_DESCRIPTION _infile _outfile)
+    set(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_dom_exceptions.pl)
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT  ${DERIVED_SOURCES_WEBCORE_DIR}/${_outfile}
         MAIN_DEPENDENCY ${_infile}
         DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS}
         COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}
         VERBATIM)
-ENDMACRO ()
+endmacro()
 
 
-MACRO (GENERATE_SETTINGS_MACROS _infile _outfile)
-    SET(NAMES_GENERATOR ${WEBCORE_DIR}/page/make_settings.pl)
+macro(GENERATE_SETTINGS_MACROS _infile _outfile)
+    set(NAMES_GENERATOR ${WEBCORE_DIR}/page/make_settings.pl)
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT  ${DERIVED_SOURCES_WEBCORE_DIR}/${_outfile}
         MAIN_DEPENDENCY ${_infile}
         DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS}
         COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}
         VERBATIM)
-ENDMACRO ()
-
-
-MACRO (GENERATE_DOM_NAMES _namespace _attrs)
-    SET(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_names.pl)
-    SET(_arguments  --attrs ${_attrs})
-    SET(_outputfiles ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}Names.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}Names.h)
-    SET(_extradef)
-    SET(_tags)
-
-    FOREACH (f ${ARGN})
-        IF (_tags)
-            SET(_extradef "${_extradef} ${f}")
-        ELSE ()
-            SET(_tags ${f})
-        ENDIF ()
-    ENDFOREACH ()
-
-    IF (_tags)
-        SET(_arguments "${_arguments}" --tags ${_tags} --factory --wrapperFactory)
-        SET(_outputfiles "${_outputfiles}" ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}ElementFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}ElementFactory.h ${DERIVED_SOURCES_WEBCORE_DIR}/JS${_namespace}ElementWrapperFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/JS${_namespace}ElementWrapperFactory.h)
-    ENDIF ()
-
-    IF (_extradef)
-        SET(_additionArguments "${_additionArguments}" --extraDefines=${_extradef})
-    ENDIF ()
-
-    ADD_CUSTOM_COMMAND(
+endmacro()
+
+
+macro(GENERATE_DOM_NAMES _namespace _attrs)
+    set(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_names.pl)
+    set(_arguments  --attrs ${_attrs})
+    set(_outputfiles ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}Names.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}Names.h)
+    set(_extradef)
+    set(_tags)
+
+    foreach (f ${ARGN})
+        if (_tags)
+            set(_extradef "${_extradef} ${f}")
+        else ()
+            set(_tags ${f})
+        endif ()
+    endforeach ()
+
+    if (_tags)
+        set(_arguments "${_arguments}" --tags ${_tags} --factory --wrapperFactory)
+        set(_outputfiles "${_outputfiles}" ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}ElementFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}ElementFactory.h ${DERIVED_SOURCES_WEBCORE_DIR}/JS${_namespace}ElementWrapperFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/JS${_namespace}ElementWrapperFactory.h)
+    endif ()
+
+    if (_extradef)
+        set(_additionArguments "${_additionArguments}" --extraDefines=${_extradef})
+    endif ()
+
+    add_custom_command(
         OUTPUT  ${_outputfiles}
         DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS} ${_attrs} ${_tags}
         COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --preprocessor "${CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS}" --outputDir ${DERIVED_SOURCES_WEBCORE_DIR} ${_arguments} ${_additionArguments}
         VERBATIM)
-ENDMACRO ()
+endmacro()
 
 
 # - Create hash table *.lut.h
 # GENERATE_HASH_LUT(input_file output_file)
-MACRO (GENERATE_HASH_LUT _input _output)
-    SET(HASH_LUT_GENERATOR "${JAVASCRIPTCORE_DIR}/create_hash_table")
+macro(GENERATE_HASH_LUT _input _output)
+    set(HASH_LUT_GENERATOR "${JAVASCRIPTCORE_DIR}/create_hash_table")
 
-    FOREACH (_tmp ${ARGN})
-        IF (${_tmp} STREQUAL "MAIN_DEPENDENCY")
-            SET(_main_dependency ${_input})
-        ENDIF ()
-    ENDFOREACH ()
+    foreach (_tmp ${ARGN})
+        if (${_tmp} STREQUAL "MAIN_DEPENDENCY")
+            set(_main_dependency ${_input})
+        endif ()
+    endforeach ()
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${_output}
         MAIN_DEPENDENCY ${_main_dependency}
         DEPENDS ${_input} ${HASH_LUT_GENERATOR}
         COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${_input} -i > ${_output}
         VERBATIM)
-ENDMACRO ()
+endmacro()
 
 
-MACRO (GENERATE_GRAMMAR _prefix _input _output_header _output_source _features)
+macro(GENERATE_GRAMMAR _prefix _input _output_header _output_source _features)
     # This is a workaround for winflexbison, which does not work corretly when
     # run in a different working directory than the installation directory.
-    GET_FILENAME_COMPONENT(_working_directory ${BISON_EXECUTABLE} PATH)
+    get_filename_component(_working_directory ${BISON_EXECUTABLE} PATH)
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${_output_header} ${_output_source}
         MAIN_DEPENDENCY ${_input}
         DEPENDS ${_input}
         COMMAND ${PERL_EXECUTABLE} -I ${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makegrammar.pl --outputDir ${DERIVED_SOURCES_WEBCORE_DIR} --extraDefines "${_features}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --bison "${BISON_EXECUTABLE}" --symbolsPrefix ${_prefix} ${_input}
         WORKING_DIRECTORY ${_working_directory}
         VERBATIM)
-ENDMACRO ()
+endmacro()
 
-MACRO(MAKE_HASH_TOOLS _source)
-    GET_FILENAME_COMPONENT(_name ${_source} NAME_WE)
+macro(MAKE_HASH_TOOLS _source)
+    get_filename_component(_name ${_source} NAME_WE)
 
-    IF (${_source} STREQUAL "DocTypeStrings")
-        SET(_hash_tools_h "${DERIVED_SOURCES_WEBCORE_DIR}/HashTools.h")
-    ELSE ()
-        SET(_hash_tools_h "")
-    ENDIF ()
+    if (${_source} STREQUAL "DocTypeStrings")
+        set(_hash_tools_h "${DERIVED_SOURCES_WEBCORE_DIR}/HashTools.h")
+    else ()
+        set(_hash_tools_h "")
+    endif ()
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/${_name}.cpp ${_hash_tools_h}
-        MAIN_DEPENDENCY ${_source}.gperf 
+        MAIN_DEPENDENCY ${_source}.gperf
         COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/make-hash-tools.pl ${DERIVED_SOURCES_WEBCORE_DIR} ${_source}.gperf
         VERBATIM)
 
-    UNSET(_name)
-    UNSET(_hash_tools_h)
-ENDMACRO()
+    unset(_name)
+    unset(_hash_tools_h)
+endmacro()
 
-MACRO (WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS)
+macro(WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS)
     INCLUDE_IF_EXISTS(${CMAKE_CURRENT_SOURCE_DIR}/Platform${PORT}.cmake)
-ENDMACRO ()
+endmacro()
 
-MACRO (WEBKIT_WRAP_SOURCELIST)
-    FOREACH (_file ${ARGN})
-        GET_FILENAME_COMPONENT(_basename ${_file} NAME_WE)
-        GET_FILENAME_COMPONENT(_path ${_file} PATH)
+macro(WEBKIT_WRAP_SOURCELIST)
+    foreach (_file ${ARGN})
+        get_filename_component(_basename ${_file} NAME_WE)
+        get_filename_component(_path ${_file} PATH)
 
-        IF (NOT _file MATCHES "${DERIVED_SOURCES_WEBCORE_DIR}")
-            STRING(REGEX REPLACE "/" "\\\\\\\\" _sourcegroup "${_path}")
-            SOURCE_GROUP("${_sourcegroup}" FILES ${_file})
-        ENDIF ()
+        if (NOT _file MATCHES "${DERIVED_SOURCES_WEBCORE_DIR}")
+            string(REGEX REPLACE "/" "\\\\\\\\" _sourcegroup "${_path}")
+            source_group("${_sourcegroup}" FILES ${_file})
+        endif ()
 
-        IF (WTF_PLATFORM_QT)
-            SET(_moc_filename ${DERIVED_SOURCES_WEBCORE_DIR}/${_basename}.moc)
+        if (WTF_PLATFORM_QT)
+            set(_moc_filename ${DERIVED_SOURCES_WEBCORE_DIR}/${_basename}.moc)
 
-            FILE(READ ${_file} _contents)
+            file(READ ${_file} _contents)
 
-            STRING(REGEX MATCHALL "#include[ ]+\"${_basename}\\.moc\"" _match "${_contents}")
-            IF (_match)
+            string(REGEX MATCHALL "#include[ ]+\"${_basename}\\.moc\"" _match "${_contents}")
+            if (_match)
                 QT4_GENERATE_MOC(${_file} ${_moc_filename})
                 ADD_SOURCE_DEPENDENCIES(${_file} ${_moc_filename})
-            ENDIF ()
-        ENDIF ()
-    ENDFOREACH ()
-
-    SOURCE_GROUP("DerivedSources" REGULAR_EXPRESSION "${DERIVED_SOURCES_WEBCORE_DIR}")
-ENDMACRO ()
-
-
-MACRO (WEBKIT_CREATE_FORWARDING_HEADER _target_directory _file)
-    GET_FILENAME_COMPONENT(_absolute "${_file}" ABSOLUTE)
-    GET_FILENAME_COMPONENT(_name "${_file}" NAME)
-    SET(_content "#include \"${_absolute}\"\n")
-    SET(_filename "${_target_directory}/${_name}")
-
-    IF (EXISTS "${_filename}")
-        FILE(READ "${_filename}" _old_content)
-    ENDIF ()
-
-    IF (NOT _old_content STREQUAL _content)
-        FILE(WRITE "${_filename}" "${_content}")
-    ENDIF ()
-ENDMACRO ()
-
-MACRO (WEBKIT_CREATE_FORWARDING_HEADERS _framework)
-    SET(_processing_directories 0)
-    SET(_processing_files 0)
-    SET(_target_directory "${DERIVED_SOURCES_DIR}/ForwardingHeaders/${_framework}")
-
-    FILE(GLOB _files "${_target_directory}/*.h")
-    FOREACH (_file ${_files})
-        FILE(READ "${_file}" _content)
-        STRING(REGEX MATCH "^#include \"([^\"]*)\"" _matched ${_content})
-        IF (_matched AND NOT EXISTS "${CMAKE_MATCH_1}")
-           FILE(REMOVE "${_file}")
-        ENDIF()
-    ENDFOREACH ()
-
-    FOREACH (_currentArg ${ARGN})
-        IF ("${_currentArg}" STREQUAL "DIRECTORIES")
-            SET(_processing_directories 1)
-            SET(_processing_files 0)
-        ELSEIF ("${_currentArg}" STREQUAL "FILES")
-            SET(_processing_directories 0)
-            SET(_processing_files 1)
-        ELSEIF (_processing_directories)
-            FILE(GLOB _files "${_currentArg}/*.h")
-            FOREACH (_file ${_files})
+            endif ()
+        endif ()
+    endforeach ()
+
+    source_group("DerivedSources" REGULAR_EXPRESSION "${DERIVED_SOURCES_WEBCORE_DIR}")
+endmacro()
+
+
+macro(WEBKIT_CREATE_FORWARDING_HEADER _target_directory _file)
+    get_filename_component(_absolute "${_file}" ABSOLUTE)
+    get_filename_component(_name "${_file}" NAME)
+    set(_content "#include \"${_absolute}\"\n")
+    set(_filename "${_target_directory}/${_name}")
+
+    if (EXISTS "${_filename}")
+        file(READ "${_filename}" _old_content)
+    endif ()
+
+    if (NOT _old_content STREQUAL _content)
+        file(WRITE "${_filename}" "${_content}")
+    endif ()
+endmacro()
+
+macro(WEBKIT_CREATE_FORWARDING_HEADERS _framework)
+    set(_processing_directories 0)
+    set(_processing_files 0)
+    set(_target_directory "${DERIVED_SOURCES_DIR}/ForwardingHeaders/${_framework}")
+
+    file(GLOB _files "${_target_directory}/*.h")
+    foreach (_file ${_files})
+        file(READ "${_file}" _content)
+        string(REGEX MATCH "^#include \"([^\"]*)\"" _matched ${_content})
+        if (_matched AND NOT EXISTS "${CMAKE_MATCH_1}")
+           file(REMOVE "${_file}")
+        endif ()
+    endforeach ()
+
+    foreach (_currentArg ${ARGN})
+        if ("${_currentArg}" STREQUAL "DIRECTORIES")
+            set(_processing_directories 1)
+            set(_processing_files 0)
+        elseif ("${_currentArg}" STREQUAL "FILES")
+            set(_processing_directories 0)
+            set(_processing_files 1)
+        elseif (_processing_directories)
+            file(GLOB _files "${_currentArg}/*.h")
+            foreach (_file ${_files})
                 WEBKIT_CREATE_FORWARDING_HEADER(${_target_directory} ${_file})
-            ENDFOREACH ()
-        ELSEIF (_processing_files)
+            endforeach ()
+        elseif (_processing_files)
             WEBKIT_CREATE_FORWARDING_HEADER(${_target_directory} ${_currentArg})
-        ENDIF ()
-    ENDFOREACH ()
-ENDMACRO ()
+        endif ()
+    endforeach ()
+endmacro()
index 94c96c1..90dcc13 100644 (file)
 #     not defined before)
 # -----------------------------------------------------------------------------
 
-IF(NOT DEFINED CPACK_PACKAGE_NAME)
-  SET(CPACK_PACKAGE_NAME WebKit-${PORT})
-ENDIF()
-
-IF(NOT DEFINED CPACK_SOURCE_IGNORE_FILES)
-  SET(CPACK_SOURCE_IGNORE_FILES
-    # Version control:
-    "/CVS/"
-    "/\\\\.svn/"
-    "/\\\\.bzr/"
-    "/\\\\.hg/"
-    "/\\\\.git/"
-    "\\\\.swp$"
-    "\\\\.#"
-    "/#"
-    "/\\\\.gitignore$"
-    "/\\\\.gitattributes$"
-
-    # SVN-only files should be ignored (site, examples...)
-    "/PerformanceTests/"
-    "/Examples/"
-    "/Websites/"
-
-    # Other build systems:
-    # - Makefiles (.mk/Makefile)
-    "\\\\.mk$"
-    "\\\\.make$"
-    "Makefile"
-    # - Autotools (GTK)
-    "/autotools/"
-    "/configure\\\\.ac"
-    "/autogen\\\\.sh"
-    "/autom4te\\\\.cache/"
-    "/aclocal\\\\.m4$"
-    "/GNUmakefile"
-    "/GNUmakefile"
-    # - XCode (Mac)
-    "\\\\.xcodeproj"
-    "\\\\.xcconfig"
-    # - GYP
-    "\\\\.gyp"
-    # - QMake (Qt)
-    "\\\\.pri$"
-    "\\\\.pro$"
-
-    # Development & Runtime created files
-    "~$"
-    "\\\\.mode"
-    "\\\\.pbxuser$"
-    "\\\\.perspective"
-    "\\\\.pyc$"
-    "\\\\.pyo$"
-    "/cmake-build/"
-    "/build/"
-    "/WebKitBuild/"
-    "/Tools/Scripts/webkitpy/thirdparty/autoinstalled/"
-    )
-
-  IF(NOT WEBKIT_CPACK_ADD_TESTS)
-    LIST(APPEND CPACK_SOURCE_IGNORE_FILES
-      "/LayoutTests/"
-      "/ManualTests/"
-      "/tests/"
-      )
-  ENDIF(NOT WEBKIT_CPACK_ADD_TESTS)
-
-  IF(NOT WEBKIT_CPACK_ADD_TOOLS)
-    LIST(APPEND CPACK_SOURCE_IGNORE_FILES
-      "/Tools/"
-      "/manual-tools/"
-      "/tools/"
-      "/PageLoadTools/"
-      )
-  ENDIF(NOT WEBKIT_CPACK_ADD_TOOLS)
-
-
-  IF(NOT WEBKIT_CPACK_ALL_PORTS)
-
-    # All file and directory patterns that Efl uses
-    SET(FILE_PATTERNS_Efl
-      "/cairo/" "/Cairo/" "cairo\\\\." "Cairo\\\\."
-      "/efl/" "/Efl/" "efl\\\\." "Efl\\\\."
-      "/glib/" "/Glib/" "glib\\\\." "Glib\\\\."
-      "/gobject/" "/Gobject/" "gobject\\\\." "Gobject\\\\."
-      "/icu/" "/Icu/" "icu\\\\." "Icu\\\\."
-      "/posix/" "/Posix/" "posix\\\\." "Posix\\\\."
-      "/soup/" "/Soup/" "soup\\\\." "Soup\\\\."
-      )
-
-    # File and Directory patterns that no CMake-ified port uses
-    SET(FILE_PATTERNS_UNKNOWN_PORTS
-      "/carbon/" "/Carbon/" "carbon\\\\." "Carbon\\\\."
-      "/cf/" "/Cf/" "cf\\\\." "Cf\\\\."
-      "/cg/" "/Cg/" "cg\\\\." "Cg\\\\."
-      "/chromium/" "/Chromium/" "chromium\\\\." "Chromium\\\\."
-      "/cocoa/" "/Cocoa/" "cocoa\\\\." "Cocoa\\\\."
-      "/Configurations/" "/Configurations/" "Configurations\\\\." "Configurations\\\\."
-      "/curl/" "/Curl/" "curl\\\\." "Curl\\\\."
-      "/gstreamer/" "/Gstreamer/" "gstreamer\\\\." "Gstreamer\\\\."
-      "/gtk/" "/Gtk/" "gtk\\\\." "Gtk\\\\."
-      "/iphone/" "/Iphone/" "iphone\\\\." "Iphone\\\\."
-      "/mac/" "/Mac/" "mac\\\\." "Mac\\\\."
-      "/opentype/" "/Opentype/" "opentype\\\\." "Opentype\\\\."
-      "/openvg/" "/Openvg/" "openvg\\\\." "Openvg\\\\."
-      "/os-win32/" "/Os-Win32/" "os-win32\\\\." "Os-Win32\\\\."
-      "/qscriptengine/" "/Qscriptengine/" "qscriptengine\\\\." "Qscriptengine\\\\."
-      "/qscriptstring/" "/Qscriptstring/" "qscriptstring\\\\." "Qscriptstring\\\\."
-      "/qscriptvalue/" "/Qscriptvalue/" "qscriptvalue\\\\." "Qscriptvalue\\\\."
-      "/qt/" "/Qt/" "qt\\\\." "Qt\\\\."
-      "/qt4/" "/Qt4/" "qt4\\\\." "Qt4\\\\."
-      "/skia/" "/Skia/" "skia\\\\." "Skia\\\\."
-      "/v8/" "/V8/" "v8\\\\." "V8\\\\."
-      "/V8/" "/V8/" "V8\\\\." "V8\\\\."
-      "/win/" "/Win/" "win\\\\." "Win\\\\."
-      "/wince/" "/Wince/" "wince\\\\." "Wince\\\\."
-      "/wx/" "/Wx/" "wx\\\\." "Wx\\\\."
-      "/wxcode/" "/Wxcode/" "wxcode\\\\." "Wxcode\\\\."
-      "/WebKitLibraries/"
-      "/English\\\\.lproj/"
-      "/Source/WebKit2/"
-      "\\\\.a$"
-      "\\\\.exe$"
-      "\\\\.mm$"
-      )
-
-    # Append all Unknown port patterns
-    FOREACH(_pattern ${FILE_PATTERNS_UNKNOWN_PORTS})
-      LIST(FIND FILE_PATTERNS_${PORT} ${_pattern} _pattern_index)
-      IF(_pattern_index GREATER -1)
-        MESSAGE("pattern ${_pattern} declared of 'no-port' is actually used by ${PORT}")
-      ELSE()
-        LIST(APPEND CPACK_SOURCE_IGNORE_FILES ${_pattern})
-      ENDIF()
-    ENDFOREACH()
-
-    # Append all "other-ports" patterns
-    FOREACH(_port ${ALL_PORTS})
-      IF(NOT ${_port} STREQUAL ${PORT})
-        FOREACH(_pattern ${FILE_PATTERNS_${_port}})
-
-          LIST(FIND FILE_PATTERNS_${PORT} ${_pattern} _pattern_index)
-          IF(_pattern_index GREATER -1)
-            MESSAGE("pattern ${_pattern} of port ${_port} is also used by ${PORT}")
-          ELSE()
-            LIST(APPEND CPACK_SOURCE_IGNORE_FILES ${_pattern})
-          ENDIF()
-        ENDFOREACH()
-      ENDIF()
-    ENDFOREACH()
-
-  ENDIF(NOT WEBKIT_CPACK_ALL_PORTS)
-
-ENDIF(NOT DEFINED CPACK_SOURCE_IGNORE_FILES)
+if (NOT DEFINED CPACK_PACKAGE_NAME)
+    set(CPACK_PACKAGE_NAME WebKit-${PORT})
+endif ()
+
+if (NOT DEFINED CPACK_SOURCE_IGNORE_FILES)
+    set(CPACK_SOURCE_IGNORE_FILES
+        # Version control:
+        "/CVS/"
+        "/\\\\.svn/"
+        "/\\\\.bzr/"
+        "/\\\\.hg/"
+        "/\\\\.git/"
+        "\\\\.swp$"
+        "\\\\.#"
+        "/#"
+        "/\\\\.gitignore$"
+        "/\\\\.gitattributes$"
+
+        # SVN-only files should be ignored (site, examples...)
+        "/PerformanceTests/"
+        "/Examples/"
+        "/Websites/"
+
+        # Other build systems:
+        # - Makefiles (.mk/Makefile)
+        "\\\\.mk$"
+        "\\\\.make$"
+        "Makefile"
+        # - Autotools (GTK)
+        "/autotools/"
+        "/configure\\\\.ac"
+        "/autogen\\\\.sh"
+        "/autom4te\\\\.cache/"
+        "/aclocal\\\\.m4$"
+        "/GNUmakefile"
+        "/GNUmakefile"
+        # - XCode (Mac)
+        "\\\\.xcodeproj"
+        "\\\\.xcconfig"
+        # - GYP
+        "\\\\.gyp"
+        # - QMake (Qt)
+        "\\\\.pri$"
+        "\\\\.pro$"
+
+        # Development & Runtime created files
+        "~$"
+        "\\\\.mode"
+        "\\\\.pbxuser$"
+        "\\\\.perspective"
+        "\\\\.pyc$"
+        "\\\\.pyo$"
+        "/cmake-build/"
+        "/build/"
+        "/WebKitBuild/"
+        "/Tools/Scripts/webkitpy/thirdparty/autoinstalled/"
+        )
+
+    if (NOT WEBKIT_CPACK_ADD_TESTS)
+        list(APPEND CPACK_SOURCE_IGNORE_FILES
+          "/LayoutTests/"
+          "/ManualTests/"
+          "/tests/"
+          )
+    endif (NOT WEBKIT_CPACK_ADD_TESTS)
+
+    if (NOT WEBKIT_CPACK_ADD_TOOLS)
+        list(APPEND CPACK_SOURCE_IGNORE_FILES
+        "/Tools/"
+        "/manual-tools/"
+        "/tools/"
+        "/PageLoadTools/"
+        )
+    endif (NOT WEBKIT_CPACK_ADD_TOOLS)
+
+
+    if (NOT WEBKIT_CPACK_ALL_PORTS)
+
+        # All file and directory patterns that Efl uses
+        set(FILE_PATTERNS_Efl
+            "/cairo/" "/Cairo/" "cairo\\\\." "Cairo\\\\."
+            "/efl/" "/Efl/" "efl\\\\." "Efl\\\\."
+            "/glib/" "/Glib/" "glib\\\\." "Glib\\\\."
+            "/gobject/" "/Gobject/" "gobject\\\\." "Gobject\\\\."
+            "/icu/" "/Icu/" "icu\\\\." "Icu\\\\."
+            "/posix/" "/Posix/" "posix\\\\." "Posix\\\\."
+            "/soup/" "/Soup/" "soup\\\\." "Soup\\\\."
+            )
+
+        # File and Directory patterns that no CMake-ified port uses
+        set(FILE_PATTERNS_UNKNOWN_PORTS
+            "/carbon/" "/Carbon/" "carbon\\\\." "Carbon\\\\."
+            "/cf/" "/Cf/" "cf\\\\." "Cf\\\\."
+            "/cg/" "/Cg/" "cg\\\\." "Cg\\\\."
+            "/chromium/" "/Chromium/" "chromium\\\\." "Chromium\\\\."
+            "/cocoa/" "/Cocoa/" "cocoa\\\\." "Cocoa\\\\."
+            "/Configurations/" "/Configurations/" "Configurations\\\\." "Configurations\\\\."
+            "/curl/" "/Curl/" "curl\\\\." "Curl\\\\."
+            "/gstreamer/" "/Gstreamer/" "gstreamer\\\\." "Gstreamer\\\\."
+            "/gtk/" "/Gtk/" "gtk\\\\." "Gtk\\\\."
+            "/iphone/" "/Iphone/" "iphone\\\\." "Iphone\\\\."
+            "/mac/" "/Mac/" "mac\\\\." "Mac\\\\."
+            "/opentype/" "/Opentype/" "opentype\\\\." "Opentype\\\\."
+            "/openvg/" "/Openvg/" "openvg\\\\." "Openvg\\\\."
+            "/os-win32/" "/Os-Win32/" "os-win32\\\\." "Os-Win32\\\\."
+            "/qscriptengine/" "/Qscriptengine/" "qscriptengine\\\\." "Qscriptengine\\\\."
+            "/qscriptstring/" "/Qscriptstring/" "qscriptstring\\\\." "Qscriptstring\\\\."
+            "/qscriptvalue/" "/Qscriptvalue/" "qscriptvalue\\\\." "Qscriptvalue\\\\."
+            "/qt/" "/Qt/" "qt\\\\." "Qt\\\\."
+            "/qt4/" "/Qt4/" "qt4\\\\." "Qt4\\\\."
+            "/skia/" "/Skia/" "skia\\\\." "Skia\\\\."
+            "/v8/" "/V8/" "v8\\\\." "V8\\\\."
+            "/V8/" "/V8/" "V8\\\\." "V8\\\\."
+            "/win/" "/Win/" "win\\\\." "Win\\\\."
+            "/wince/" "/Wince/" "wince\\\\." "Wince\\\\."
+            "/wx/" "/Wx/" "wx\\\\." "Wx\\\\."
+            "/wxcode/" "/Wxcode/" "wxcode\\\\." "Wxcode\\\\."
+            "/WebKitLibraries/"
+            "/English\\\\.lproj/"
+            "/Source/WebKit2/"
+            "\\\\.a$"
+            "\\\\.exe$"
+            "\\\\.mm$"
+            )
+
+        # Append all Unknown port patterns
+        foreach (_pattern ${FILE_PATTERNS_UNKNOWN_PORTS})
+            list(FIND FILE_PATTERNS_${PORT} ${_pattern} _pattern_index)
+            if (_pattern_index GREATER -1)
+                message("pattern ${_pattern} declared of 'no-port' is actually used by ${PORT}")
+            else ()
+                list(APPEND CPACK_SOURCE_IGNORE_FILES ${_pattern})
+            endif ()
+        endforeach ()
+
+        # Append all "other-ports" patterns
+        foreach (_port ${ALL_PORTS})
+            if (NOT ${_port} STREQUAL ${PORT})
+                foreach (_pattern ${FILE_PATTERNS_${_port}})
+
+                    list(FIND FILE_PATTERNS_${PORT} ${_pattern} _pattern_index)
+                    if (_pattern_index GREATER -1)
+                        message("pattern ${_pattern} of port ${_port} is also used by ${PORT}")
+                    else ()
+                        list(APPEND CPACK_SOURCE_IGNORE_FILES ${_pattern})
+                    endif ()
+                endforeach ()
+            endif ()
+        endforeach ()
+
+    endif (NOT WEBKIT_CPACK_ALL_PORTS)
+
+endif (NOT DEFINED CPACK_SOURCE_IGNORE_FILES)
 
 # -----------------------------------------------------------------------------
 # Include CPack that will define targets based on the variables defined before
 # -----------------------------------------------------------------------------
-INCLUDE(CPack)
+include(CPack)
index adf0647..2139764 100644 (file)
@@ -3,15 +3,15 @@
 # for our tests. The WebKit version of gtest needs access to some
 # headers from WTF and JSC for configuration.
 
-INCLUDE_DIRECTORIES(${THIRDPARTY_DIR}/gtest
+include_directories(${THIRDPARTY_DIR}/gtest
     ${THIRDPARTY_DIR}/gtest/include
     ${JAVASCRIPTCORE_DIR}
     ${WTF_DIR}
 )
 
-SET(GTEST_DIR "${THIRDPARTY_DIR}/gtest")
+set(GTEST_DIR "${THIRDPARTY_DIR}/gtest")
 
-ADD_LIBRARY(gtest SHARED
+add_library(gtest SHARED
     ${GTEST_DIR}/src/gtest.cc
     ${GTEST_DIR}/src/gtest-death-test.cc
     ${GTEST_DIR}/src/gtest-filepath.cc
@@ -21,13 +21,13 @@ ADD_LIBRARY(gtest SHARED
     ${GTEST_DIR}/src/gtest-typed-test.cc
 )
 
-ADD_DEFINITIONS(-DGTEST_CREATE_SHARED_LIBRARY=1)
+add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=1)
 
-TARGET_LINK_LIBRARIES(gtest
+target_link_libraries(gtest
     ${WTF_LIBRARY_NAME}
 )
 
-IF(CMAKE_USE_PTHREADS_INIT)
-    TARGET_LINK_LIBRARIES(gtest ${CMAKE_THREAD_LIBS_INIT})
-    ADD_DEFINITIONS(-DGTEST_HAS_PTHREAD=1)
-ENDIF()
+if (CMAKE_USE_PTHREADS_INIT)
+    target_link_libraries(gtest ${CMAKE_THREAD_LIBS_INIT})
+    add_definitions(-DGTEST_HAS_PTHREAD=1)
+endif ()
index 1aa39bf..e52105c 100644 (file)
@@ -1,23 +1,23 @@
-IF (ENABLE_WEBKIT2)
-    ADD_SUBDIRECTORY(WebKitTestRunner)
-ENDIF ()
+if (ENABLE_WEBKIT2)
+    add_subdirectory(WebKitTestRunner)
+endif ()
 
-IF ("${PORT}" STREQUAL "Efl")
-    ADD_SUBDIRECTORY(EWebLauncher/ControlTheme)
+if ("${PORT}" STREQUAL "Efl")
+    add_subdirectory(EWebLauncher/ControlTheme)
 
-    IF (ENABLE_WEBKIT)
-        ADD_SUBDIRECTORY(DumpRenderTree/efl)
-        ADD_SUBDIRECTORY(EWebLauncher)
-    ENDIF ()
+    if (ENABLE_WEBKIT)
+        add_subdirectory(DumpRenderTree/efl)
+        add_subdirectory(EWebLauncher)
+    endif ()
 
-    IF (ENABLE_WEBKIT2 AND ELEMENTARY_FOUND)
-        ADD_SUBDIRECTORY(MiniBrowser/efl)
-    ENDIF ()
-    ADD_SUBDIRECTORY(DumpRenderTree/TestNetscapePlugIn)
-ELSEIF ("${PORT}" STREQUAL "WinCE")
-    ADD_SUBDIRECTORY(WinCELauncher)
-ENDIF()
+    if (ENABLE_WEBKIT2 AND ELEMENTARY_FOUND)
+        add_subdirectory(MiniBrowser/efl)
+    endif ()
+    add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
+elseif ("${PORT}" STREQUAL "WinCE")
+    add_subdirectory(WinCELauncher)
+endif ()
 
-IF (ENABLE_WEBKIT2 AND ENABLE_API_TESTS)
-    ADD_SUBDIRECTORY(TestWebKitAPI)
-ENDIF()
+if (ENABLE_WEBKIT2 AND ENABLE_API_TESTS)
+    add_subdirectory(TestWebKitAPI)
+endif ()
index c51eada..5ff7ac5 100644 (file)
@@ -1,3 +1,41 @@
+2012-12-05  Halton Huo  <halton.huo@intel.com>
+
+        [CMake] Unify coding style for CMake files
+        https://bugs.webkit.org/show_bug.cgi?id=103605
+
+        Reviewed by Laszlo Gombos.
+
+        Update cmake files(.cmake, CMakeLists.txt) with following style rules:
+        1. Indentation
+        1.1 Use spaces, not tabs.
+        1.2 Four spaces as indent.
+        2. Spacing
+        2.1 Place one space between control statements and their parentheses.
+            For eg, if (), else (), elseif (), endif (), foreach (),
+            endforeach (), while (), endwhile (), break ().
+        2.2 Do not place spaces between function and macro statements and
+            their parentheses. For eg, macro(), endmacro(), function(),
+            endfunction().
+        2.3 Do not place spaces between a command or function or macro and its
+            parentheses, or between a parenthesis and its content. For eg,
+            message("testing") not message( "testing") or message ("testing" )
+        2.4 No space at line ending.
+        3. Lowercase when call commands macros and functions. For eg,
+           add_executable() not ADD_EXECUTABLE(), set() not SET().
+
+        * CMakeLists.txt:
+        * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
+        * DumpRenderTree/efl/CMakeLists.txt:
+        * EWebLauncher/CMakeLists.txt:
+        * EWebLauncher/ControlTheme/CMakeLists.txt:
+        * MiniBrowser/efl/CMakeLists.txt:
+        * TestWebKitAPI/CMakeLists.txt:
+        * TestWebKitAPI/PlatformEfl.cmake:
+        * WebKitTestRunner/CMakeLists.txt:
+        * WebKitTestRunner/PlatformEfl.cmake:
+        * WinCELauncher/CMakeLists.txt:
+        * clang/ReportMemoryUsagePlugin/CMakeLists.txt:
+
 2012-12-05  Scott Violet  <sky@chromium.org>
 
         [chromium] Remove linux theme related files and switch to default
index 384b5bf..e339ab1 100644 (file)
@@ -1,6 +1,6 @@
-SET(WEBKIT_TESTNETSCAPEPLUGIN_DIR "${TOOLS_DIR}/DumpRenderTree/TestNetscapePlugIn")
+set(WEBKIT_TESTNETSCAPEPLUGIN_DIR "${TOOLS_DIR}/DumpRenderTree/TestNetscapePlugIn")
 
-SET(WebKitTestNetscapePlugin_SOURCES
+set(WebKitTestNetscapePlugin_SOURCES
     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/PluginObject.cpp
     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/PluginTest.cpp
     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/TestObject.cpp
@@ -27,12 +27,12 @@ SET(WebKitTestNetscapePlugin_SOURCES
     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/x11/CallInvalidateRectWithNullNPPArgument.cpp
 )
 
-SET(WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES
+set(WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES
     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}
     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/unix/ForwardingHeaders
     ${WEBCORE_DIR}
 )
 
-INCLUDE_DIRECTORIES(${WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES})
+include_directories(${WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES})
 
-ADD_LIBRARY(TestNetscapePlugin SHARED ${WebKitTestNetscapePlugin_SOURCES})
+add_library(TestNetscapePlugin SHARED ${WebKitTestNetscapePlugin_SOURCES})
index 149cab9..668b442 100644 (file)
@@ -1,4 +1,4 @@
-SET(DumpRenderTree_SOURCES
+set(DumpRenderTree_SOURCES
     ${TOOLS_DIR}/DumpRenderTree/DumpRenderTreeCommon.cpp
     ${TOOLS_DIR}/DumpRenderTree/CyclicRedundancyCheck.cpp
     ${TOOLS_DIR}/DumpRenderTree/GCController.cpp
@@ -21,11 +21,11 @@ SET(DumpRenderTree_SOURCES
     ${TOOLS_DIR}/DumpRenderTree/efl/WorkQueueItemEfl.cpp
 )
 
-SET(ImageDiff_SOURCES
+set(ImageDiff_SOURCES
     ${TOOLS_DIR}/DumpRenderTree/efl/ImageDiff.cpp
 )
 
-SET(DumpRenderTree_LIBRARIES
+set(DumpRenderTree_LIBRARIES
     ${JavaScriptCore_LIBRARY_NAME}
     ${WebCoreTestSupport_LIBRARY_NAME}
     ${WebCore_LIBRARY_NAME}
@@ -47,7 +47,7 @@ SET(DumpRenderTree_LIBRARIES
     ${LIBSOUP_LIBRARIES}
 )
 
-SET(DumpRenderTree_INCLUDE_DIRECTORIES
+set(DumpRenderTree_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/efl/ewk"
     ${WEBKIT_DIR}/efl
     ${WEBKIT_DIR}/efl/WebCoreSupport
@@ -115,16 +115,16 @@ SET(DumpRenderTree_INCLUDE_DIRECTORIES
 
 # FIXME: DOWNLOADED_FONTS_DIR should not hardcode the directory
 # structure. See <https://bugs.webkit.org/show_bug.cgi?id=81475>.
-ADD_DEFINITIONS(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
+add_definitions(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
                 -DDOWNLOADED_FONTS_DIR="${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-0.0.3"
                 -DDATA_DIR="${THEME_BINARY_DIR}")
 
-INCLUDE_DIRECTORIES(${DumpRenderTree_INCLUDE_DIRECTORIES})
+include_directories(${DumpRenderTree_INCLUDE_DIRECTORIES})
 
-ADD_EXECUTABLE(DumpRenderTree ${DumpRenderTree_SOURCES})
-TARGET_LINK_LIBRARIES(DumpRenderTree ${DumpRenderTree_LIBRARIES})
-SET_TARGET_PROPERTIES(DumpRenderTree PROPERTIES FOLDER "Tools")
+add_executable(DumpRenderTree ${DumpRenderTree_SOURCES})
+target_link_libraries(DumpRenderTree ${DumpRenderTree_LIBRARIES})
+set_target_properties(DumpRenderTree PROPERTIES FOLDER "Tools")
 
-ADD_EXECUTABLE(ImageDiff ${ImageDiff_SOURCES})
-TARGET_LINK_LIBRARIES(ImageDiff ${DumpRenderTree_LIBRARIES})
-SET_TARGET_PROPERTIES(ImageDiff PROPERTIES FOLDER "Tools")
+add_executable(ImageDiff ${ImageDiff_SOURCES})
+target_link_libraries(ImageDiff ${DumpRenderTree_LIBRARIES})
+set_target_properties(ImageDiff PROPERTIES FOLDER "Tools")
index 817231d..e27c503 100644 (file)
@@ -1,10 +1,10 @@
-SET(EWebLauncher_SOURCES
+set(EWebLauncher_SOURCES
     ${TOOLS_DIR}/EWebLauncher/url_bar.c
     ${TOOLS_DIR}/EWebLauncher/url_utils.c
     ${TOOLS_DIR}/EWebLauncher/main.c
 )
 
-SET(EWebLauncher_LIBRARIES
+set(EWebLauncher_LIBRARIES
     ${JavaScriptCore_LIBRARY_NAME}
     ${WebCore_LIBRARY_NAME}
     ${WebKit_LIBRARY_NAME}
@@ -23,7 +23,7 @@ SET(EWebLauncher_LIBRARIES
     ${LIBSOUP_LIBRARIES}
 )
 
-SET(EWebLauncher_INCLUDE_DIRECTORIES
+set(EWebLauncher_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/efl/ewk"
     ${CAIRO_INCLUDE_DIRS}
     ${ECORE_INCLUDE_DIRS}
@@ -37,11 +37,11 @@ SET(EWebLauncher_INCLUDE_DIRECTORIES
     ${LIBSOUP_INCLUDE_DIRS}
 )
 
-ADD_DEFINITIONS(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
+add_definitions(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
 
-INCLUDE_DIRECTORIES(${EWebLauncher_INCLUDE_DIRECTORIES})
-ADD_EXECUTABLE(EWebLauncher ${EWebLauncher_SOURCES})
-TARGET_LINK_LIBRARIES(EWebLauncher ${EWebLauncher_LIBRARIES})
-SET_TARGET_PROPERTIES(EWebLauncher PROPERTIES FOLDER "Tools")
+include_directories(${EWebLauncher_INCLUDE_DIRECTORIES})
+add_executable(EWebLauncher ${EWebLauncher_SOURCES})
+target_link_libraries(EWebLauncher ${EWebLauncher_LIBRARIES})
+set_target_properties(EWebLauncher PROPERTIES FOLDER "Tools")
 
-ADD_DEPENDENCIES(EWebLauncher ControlTheme)
+add_dependencies(EWebLauncher ControlTheme)
index f140733..52ef72e 100644 (file)
@@ -1,6 +1,6 @@
-SET(ControlTheme_DIR "${TOOLS_DIR}/EWebLauncher/ControlTheme")
+set(ControlTheme_DIR "${TOOLS_DIR}/EWebLauncher/ControlTheme")
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
     OUTPUT ${THEME_BINARY_DIR}/entry.edj
     COMMAND ${EDJE_CC_EXECUTABLE} -v ${ControlTheme_DIR}/entry.edc ${THEME_BINARY_DIR}/entry.edj
     DEPENDS
@@ -8,4 +8,4 @@ ADD_CUSTOM_COMMAND(
     VERBATIM
 )
 
-ADD_CUSTOM_TARGET(ControlTheme DEPENDS ${THEME_BINARY_DIR}/entry.edj)
+add_custom_target(ControlTheme DEPENDS ${THEME_BINARY_DIR}/entry.edj)
index e39d911..27f080e 100644 (file)
@@ -1,11 +1,11 @@
-SET(MiniBrowser_DIR "${TOOLS_DIR}/MiniBrowser/efl")
+set(MiniBrowser_DIR "${TOOLS_DIR}/MiniBrowser/efl")
 
-SET(MiniBrowser_SOURCES
+set(MiniBrowser_SOURCES
     ${TOOLS_DIR}/EWebLauncher/url_utils.c
     ${MiniBrowser_DIR}/main.c
 )
 
-SET(MiniBrowser_INCLUDE_DIRECTORIES
+set(MiniBrowser_INCLUDE_DIRECTORIES
     ${CAIRO_INCLUDE_DIRS}
     ${ECORE_INCLUDE_DIRS}
     ${ECORE_EVAS_INCLUDE_DIRS}
@@ -24,7 +24,7 @@ SET(MiniBrowser_INCLUDE_DIRECTORIES
     ${CMAKE_SOURCE_DIR}/Source
 )
 
-SET(MiniBrowser_LIBRARIES
+set(MiniBrowser_LIBRARIES
     ${JavaScriptCore_LIBRARY_NAME}
     ${WebCore_LIBRARY_NAME}
     ${WebKit2_LIBRARY_NAME}
@@ -44,17 +44,17 @@ SET(MiniBrowser_LIBRARIES
     ${SQLITE_LIBRARIES}
 )
 
-IF (ENABLE_GLIB_SUPPORT)
-    LIST(APPEND MiniBrowser_LIBRARIES
+if (ENABLE_GLIB_SUPPORT)
+    list(APPEND MiniBrowser_LIBRARIES
         ${GLIB_LIBRARIES}
         ${GLIB_GTHREAD_LIBRARIES}
     )
-ENDIF ()
+endif ()
 
-ADD_DEFINITIONS(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
+add_definitions(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
 
-INCLUDE_DIRECTORIES(${MiniBrowser_INCLUDE_DIRECTORIES})
+include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
 
-ADD_EXECUTABLE(MiniBrowser ${MiniBrowser_SOURCES})
-TARGET_LINK_LIBRARIES(MiniBrowser ${MiniBrowser_LIBRARIES})
-SET_TARGET_PROPERTIES(MiniBrowser PROPERTIES FOLDER "Tools")
+add_executable(MiniBrowser ${MiniBrowser_SOURCES})
+target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES})
+set_target_properties(MiniBrowser PROPERTIES FOLDER "Tools")
index 16033ec..96282ba 100644 (file)
@@ -1,6 +1,6 @@
-SET(TESTWEBKITAPI_DIR "${TOOLS_DIR}/TestWebKitAPI")
+set(TESTWEBKITAPI_DIR "${TOOLS_DIR}/TestWebKitAPI")
 
-INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}
+include_directories(${CMAKE_BINARY_DIR}
     ${TESTWEBKITAPI_DIR}
     ${CMAKE_SOURCE_DIR}/Source
     ${DERIVED_SOURCES_WEBCORE_DIR}
@@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}
 
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
-ADD_LIBRARY(TestWebKitAPIInjectedBundle SHARED
+add_library(TestWebKitAPIInjectedBundle SHARED
     ${bundle_harness_SOURCES}
     ${TESTWEBKITAPI_DIR}/InjectedBundleController.cpp
     ${TESTWEBKITAPI_DIR}/InjectedBundleMain.cpp
@@ -49,22 +49,22 @@ ADD_LIBRARY(TestWebKitAPIInjectedBundle SHARED
     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp
 )
 
-TARGET_LINK_LIBRARIES(TestWebKitAPIInjectedBundle ${WTF_LIBRARY_NAME})
-ADD_DEPENDENCIES(TestWebKitAPIInjectedBundle ${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
+target_link_libraries(TestWebKitAPIInjectedBundle ${WTF_LIBRARY_NAME})
+add_dependencies(TestWebKitAPIInjectedBundle ${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
 
-GET_PROPERTY(TestWebKitAPIInjectedBundle_PATH TARGET TestWebKitAPIInjectedBundle PROPERTY LOCATION)
+get_property(TestWebKitAPIInjectedBundle_PATH TARGET TestWebKitAPIInjectedBundle PROPERTY LOCATION)
 
-ADD_DEFINITIONS(-DGTEST_LINKED_AS_SHARED_LIBRARY=1
+add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1
     -DTEST_WEBKIT2_RESOURCES_DIR=\"${TESTWEBKITAPI_DIR}/Tests/WebKit2\"
     -DTEST_INJECTED_BUNDLE_PATH=\"${TestWebKitAPIInjectedBundle_PATH}\"
 )
 
-SET(test_wtf_LIBRARIES
+set(test_wtf_LIBRARIES
     ${WTF_LIBRARY_NAME}
     gtest
 )
 
-ADD_EXECUTABLE(test_wtf
+add_executable(test_wtf
     ${test_main_SOURCES}
     ${TESTWEBKITAPI_DIR}/TestsController.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WTF/AtomicString.cpp
@@ -88,29 +88,29 @@ ADD_EXECUTABLE(test_wtf
     ${TESTWEBKITAPI_DIR}/Tests/WTF/WTFString.cpp
 )
 
-TARGET_LINK_LIBRARIES(test_wtf ${test_wtf_LIBRARIES})
-ADD_DEPENDENCIES(test_wtf ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
-ADD_TEST(test_wtf ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_wtf)
-SET_TESTS_PROPERTIES(test_wtf PROPERTIES TIMEOUT 60)
+target_link_libraries(test_wtf ${test_wtf_LIBRARIES})
+add_dependencies(test_wtf ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
+add_test(test_wtf ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_wtf)
+set_tests_properties(test_wtf PROPERTIES TIMEOUT 60)
 
-SET(test_webcore_LIBRARIES
+set(test_webcore_LIBRARIES
     gtest
     ${WTF_LIBRARY_NAME}
     ${WebCore_LIBRARY_NAME}
 )
 
-ADD_EXECUTABLE(test_webcore
+add_executable(test_webcore
     ${test_main_SOURCES}
     ${TESTWEBKITAPI_DIR}/TestsController.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WebCore/KURL.cpp
 )
 
-TARGET_LINK_LIBRARIES(test_webcore ${test_webcore_LIBRARIES})
-ADD_DEPENDENCIES(test_webcore ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
-ADD_TEST(test_webcore ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_webcore)
-SET_TESTS_PROPERTIES(test_webcore PROPERTIES TIMEOUT 60)
+target_link_libraries(test_webcore ${test_webcore_LIBRARIES})
+add_dependencies(test_webcore ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
+add_test(test_webcore ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_webcore)
+set_tests_properties(test_webcore PROPERTIES TIMEOUT 60)
 
-ADD_LIBRARY(TestWebKitAPIBase
+add_library(TestWebKitAPIBase
     ${test_main_SOURCES}
     ${webkit2_api_harness_SOURCES}
     ${TESTWEBKITAPI_DIR}/JavaScriptTest.cpp
@@ -118,9 +118,9 @@ ADD_LIBRARY(TestWebKitAPIBase
     ${TESTWEBKITAPI_DIR}/TestsController.cpp
 )
 
-ADD_DEPENDENCIES(TestWebKitAPIBase ${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
+add_dependencies(TestWebKitAPIBase ${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
 
-SET(test_webkit2_api_LIBRARIES
+set(test_webkit2_api_LIBRARIES
     TestWebKitAPIBase
     ${WTF_LIBRARY_NAME}
     ${JavaScriptCore_LIBRARY_NAME}
@@ -128,18 +128,18 @@ SET(test_webkit2_api_LIBRARIES
     gtest
 )
 
-FOREACH(testName ${test_webkit2_api_BINARIES})
-    ADD_EXECUTABLE(test_webkit2_api_${testName} ${TESTWEBKITAPI_DIR}/Tests/WebKit2/${testName}.cpp)
-    ADD_TEST(test_webkit2_api_${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_webkit2_api_${testName})
-    SET_TESTS_PROPERTIES(test_webkit2_api_${testName} PROPERTIES TIMEOUT 60)
-    TARGET_LINK_LIBRARIES(test_webkit2_api_${testName} ${test_webkit2_api_LIBRARIES})
-ENDFOREACH()
+foreach (testName ${test_webkit2_api_BINARIES})
+    add_executable(test_webkit2_api_${testName} ${TESTWEBKITAPI_DIR}/Tests/WebKit2/${testName}.cpp)
+    add_test(test_webkit2_api_${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_webkit2_api_${testName})
+    set_tests_properties(test_webkit2_api_${testName} PROPERTIES TIMEOUT 60)
+    target_link_libraries(test_webkit2_api_${testName} ${test_webkit2_api_LIBRARIES})
+endforeach ()
 
 # We don't run tests that are expected to fail. We could use the WILL_FAIL
 # property, but it reports failure when the test crashes or timeouts and would
 # make the bot red.
 
-FOREACH(testName ${test_webkit2_api_fail_BINARIES})
-    ADD_EXECUTABLE(test_webkit2_api_fail_${testName} ${TESTWEBKITAPI_DIR}/Tests/WebKit2/${testName}.cpp)
-    TARGET_LINK_LIBRARIES(test_webkit2_api_fail_${testName} ${test_webkit2_api_LIBRARIES})
-ENDFOREACH()
+foreach (testName ${test_webkit2_api_fail_BINARIES})
+    add_executable(test_webkit2_api_fail_${testName} ${TESTWEBKITAPI_DIR}/Tests/WebKit2/${testName}.cpp)
+    target_link_libraries(test_webkit2_api_fail_${testName} ${test_webkit2_api_LIBRARIES})
+endforeach ()
index b1aa579..86e56bb 100644 (file)
@@ -1,16 +1,16 @@
-ADD_CUSTOM_TARGET(forwarding-headersEflForTestWebKitAPI
+add_custom_target(forwarding-headersEflForTestWebKitAPI
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
 )
-SET(ForwardingHeadersForTestWebKitAPI_NAME forwarding-headersEflForTestWebKitAPI)
+set(ForwardingHeadersForTestWebKitAPI_NAME forwarding-headersEflForTestWebKitAPI)
 
-ADD_CUSTOM_TARGET(forwarding-headersSoupForTestWebKitAPI
+add_custom_target(forwarding-headersSoupForTestWebKitAPI
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
 )
-SET(ForwardingNetworkHeadersForTestWebKitAPI_NAME forwarding-headersSoupForTestWebKitAPI)
+set(ForwardingNetworkHeadersForTestWebKitAPI_NAME forwarding-headersSoupForTestWebKitAPI)
 
-INCLUDE_DIRECTORIES(
+include_directories(
     ${WEBKIT2_DIR}/UIProcess/API/C/soup
     ${WEBKIT2_DIR}/UIProcess/API/C/efl
     ${WEBKIT2_DIR}/UIProcess/API/efl
@@ -21,16 +21,16 @@ INCLUDE_DIRECTORIES(
     ${LIBSOUP_INCLUDE_DIRS}
 )
 
-SET(test_main_SOURCES
+set(test_main_SOURCES
     ${TESTWEBKITAPI_DIR}/efl/main.cpp
 )
 
-SET(bundle_harness_SOURCES
+set(bundle_harness_SOURCES
     ${TESTWEBKITAPI_DIR}/efl/InjectedBundleController.cpp
     ${TESTWEBKITAPI_DIR}/efl/PlatformUtilities.cpp
 )
 
-SET(webkit2_api_harness_SOURCES
+set(webkit2_api_harness_SOURCES
     ${TESTWEBKITAPI_DIR}/efl/PlatformUtilities.cpp
     ${TESTWEBKITAPI_DIR}/efl/PlatformWebView.cpp
 )
@@ -43,7 +43,7 @@ SET(webkit2_api_harness_SOURCES
 # Make sure that the tests are passing on both Debug and
 # Release builds before adding it to test_webkit2_api_BINARIES.
 
-SET(test_webkit2_api_BINARIES
+set(test_webkit2_api_BINARIES
     AboutBlankLoad
     CookieManager
     DOMWindowExtensionNoCache
@@ -76,7 +76,7 @@ SET(test_webkit2_api_BINARIES
     WillSendSubmitEvent
 )
 
-SET(test_webkit2_api_fail_BINARIES
+set(test_webkit2_api_fail_BINARIES
     CanHandleRequest
     DOMWindowExtensionBasic
     DownloadDecideDestinationCrash
@@ -87,7 +87,7 @@ SET(test_webkit2_api_fail_BINARIES
     WKPageGetScaleFactorNotZero
 )
 
-ADD_DEFINITIONS(-DTHEME_DIR="${THEME_BINARY_DIR}")
+add_definitions(-DTHEME_DIR="${THEME_BINARY_DIR}")
 
 # Tests disabled because of missing features on the test harness:
 #