.:
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Mar 2015 04:18:13 +0000 (04:18 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Mar 2015 04:18:13 +0000 (04:18 +0000)
[CMake] Remove unnecessary INCLUDE_IF_EXISTS macro
https://bugs.webkit.org/show_bug.cgi?id=143138

Reviewed by Csaba Osztrogonác.

INCLUDE_IF_EXISTS isn't used except for 2 places. However those uses can
be replaced with WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS.

* Source/cmake/OptionsWindows.cmake:
Set "PORT" instead of "PORT_FALLBACK" because there is no benefit to define PORT_FALLBACK.
* Source/cmake/WebKitMacros.cmake:

Tools:
[CMake] Remove unnecessary INCLUDE_IF_EXISTS macro
https://bugs.webkit.org/show_bug.cgi?id=143138

Reviewed by Csaba Osztrogonác.

INCLUDE_IF_EXISTS isn't used except for 2 places. However those uses can
be replaced with WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS.

* ImageDiff/CMakeLists.txt:
Use WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() instead of INCLUDE_IF_EXISTS.
* WebKitTestRunner/CMakeLists.txt: ditto.

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

ChangeLog
Source/cmake/OptionsWindows.cmake
Source/cmake/WebKitMacros.cmake
Tools/ChangeLog
Tools/ImageDiff/CMakeLists.txt
Tools/WebKitTestRunner/CMakeLists.txt

index 9aae406..ba5911b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2015-03-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        [CMake] Remove unnecessary INCLUDE_IF_EXISTS macro
+        https://bugs.webkit.org/show_bug.cgi?id=143138
+
+        Reviewed by Csaba Osztrogonác.
+
+        INCLUDE_IF_EXISTS isn't used except for 2 places. However those uses can
+        be replaced with WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS.
+
+        * Source/cmake/OptionsWindows.cmake:
+        Set "PORT" instead of "PORT_FALLBACK" because there is no benefit to define PORT_FALLBACK.
+        * Source/cmake/WebKitMacros.cmake:
+
 2015-03-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
 
         [GStreamer] share GL context in pipeline, part 2
index d2763dd..45dcd50 100644 (file)
@@ -22,7 +22,7 @@ if (MSVC)
     endif ()
 endif ()
 
-set(PORT_FALLBACK Win)
+set(PORT Win)
 set(JavaScriptCore_LIBRARY_TYPE SHARED)
 set(WTF_LIBRARY_TYPE SHARED)
 set(ICU_LIBRARIES libicuuc$(DebugSuffix) libicuin$(DebugSuffix))
index 937a27c..4e8edb0 100644 (file)
@@ -1,4 +1,5 @@
-macro(INCLUDE_IF_EXISTS _file)
+macro(WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS)
+    set(_file ${CMAKE_CURRENT_SOURCE_DIR}/Platform${PORT}.cmake)
     if (EXISTS ${_file})
         message(STATUS "Using platform-specific CMakeLists: ${_file}")
         include(${_file})
@@ -7,7 +8,6 @@ macro(INCLUDE_IF_EXISTS _file)
     endif ()
 endmacro()
 
-
 # Append the given dependencies to the source file
 macro(ADD_SOURCE_DEPENDENCIES _source _deps)
     set(_tmp)
@@ -190,13 +190,6 @@ macro(MAKE_HASH_TOOLS _source)
     unset(_hash_tools_h)
 endmacro()
 
-macro(WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS)
-    if (PORT_FALLBACK)
-        INCLUDE_IF_EXISTS(${CMAKE_CURRENT_SOURCE_DIR}/Platform${PORT_FALLBACK}.cmake)
-    endif ()
-    INCLUDE_IF_EXISTS(${CMAKE_CURRENT_SOURCE_DIR}/Platform${PORT}.cmake)
-endmacro()
-
 macro(WEBKIT_WRAP_SOURCELIST)
     foreach (_file ${ARGN})
         get_filename_component(_basename ${_file} NAME_WE)
index 5abaf92..49457fa 100644 (file)
@@ -1,3 +1,17 @@
+2015-03-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        [CMake] Remove unnecessary INCLUDE_IF_EXISTS macro 
+        https://bugs.webkit.org/show_bug.cgi?id=143138
+
+        Reviewed by Csaba Osztrogonác.
+
+        INCLUDE_IF_EXISTS isn't used except for 2 places. However those uses can
+        be replaced with WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS.
+
+        * ImageDiff/CMakeLists.txt:
+        Use WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() instead of INCLUDE_IF_EXISTS.
+        * WebKitTestRunner/CMakeLists.txt: ditto.
+
 2015-03-27  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Support building WTF on Windows without Cygwin
index 4265a42..9b4c33e 100644 (file)
@@ -10,7 +10,7 @@ set(IMAGE_DIFF_LIBRARIES
     WTF
 )
 
-INCLUDE_IF_EXISTS(${IMAGE_DIFF_DIR}/Platform${PORT}.cmake)
+WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 include_directories(${IMAGE_DIFF_INCLUDE_DIRECTORIES})
 add_executable(ImageDiff ${IMAGE_DIFF_SOURCES})
index b3ea571..89916b8 100644 (file)
@@ -91,7 +91,7 @@ GENERATE_BINDINGS(WebKitTestRunnerInjectedBundle_SOURCES
     ${DERIVED_SOURCES_DIR}/InjectedBundle JS TestRunner cpp
     ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
 
-INCLUDE_IF_EXISTS(${WEBKIT_TESTRUNNER_DIR}/Platform${PORT}.cmake)
+WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 include_directories(${WebKitTestRunner_INCLUDE_DIRECTORIES})