[Win CMake] Allow WebKitLibraries directory to be set from the command line
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Aug 2015 00:43:55 +0000 (00:43 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Aug 2015 00:43:55 +0000 (00:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148112

Reviewed by Brent Fulgham.

.:

* Source/cmake/OptionsWin.cmake:
Don't use an environment variable for WEBKIT_LIBRARIES_DIR.
Instead, use the default location if nothing is passed in from the command line.
This way we can set it from the command line for the AppleInternal build.
Also, set the output directories to be consistent between the old and new build systems (and ninja).

Source/WebCore:

* PlatformAppleWin.cmake:
* PlatformWinCairo.cmake:
Don't use an environment variable for WEBKIT_LIBRARIES_DIR.

Source/WebKit:

* PlatformWin.cmake:
Don't use an environment variable for WEBKIT_LIBRARIES_DIR.

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

ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/PlatformAppleWin.cmake
Source/WebCore/PlatformWinCairo.cmake
Source/WebKit/ChangeLog
Source/WebKit/PlatformWin.cmake
Source/cmake/OptionsWin.cmake

index f7611bc..844a1b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2015-08-17  Alex Christensen  <achristensen@webkit.org>
 
+        [Win CMake] Allow WebKitLibraries directory to be set from the command line
+        https://bugs.webkit.org/show_bug.cgi?id=148112
+
+        Reviewed by Brent Fulgham.
+
+        * Source/cmake/OptionsWin.cmake:
+        Don't use an environment variable for WEBKIT_LIBRARIES_DIR.  
+        Instead, use the default location if nothing is passed in from the command line.
+        This way we can set it from the command line for the AppleInternal build.
+        Also, set the output directories to be consistent between the old and new build systems (and ninja).
+
+2015-08-17  Alex Christensen  <achristensen@webkit.org>
+
         Build Debug Suffix on Windows with CMake
         https://bugs.webkit.org/show_bug.cgi?id=148083
 
index d2478b4..7d61515 100644 (file)
@@ -1,3 +1,14 @@
+2015-08-17  Alex Christensen  <achristensen@webkit.org>
+
+        [Win CMake] Allow WebKitLibraries directory to be set from the command line
+        https://bugs.webkit.org/show_bug.cgi?id=148112
+
+        Reviewed by Brent Fulgham.
+
+        * PlatformAppleWin.cmake:
+        * PlatformWinCairo.cmake:
+        Don't use an environment variable for WEBKIT_LIBRARIES_DIR.  
+
 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [OS X] Migrate off of CTFontSetRenderingParameters()
index bc95820..85aabb7 100644 (file)
@@ -1,6 +1,6 @@
 list(APPEND WebCore_INCLUDE_DIRECTORIES
-    "$ENV{WEBKIT_LIBRARIES}/include"
-    "$ENV{WEBKIT_LIBRARIES}/include/zlib"
+    "${WEBKIT_LIBRARIES_DIR}/include"
+    "${WEBKIT_LIBRARIES_DIR}/include/zlib"
     "${WEBCORE_DIR}/loader/archive/cf"
     "${WEBCORE_DIR}/platform/graphics/ca"
     "${WEBCORE_DIR}/platform/graphics/ca/win"
index a3aafb0..15bbf3f 100644 (file)
@@ -1,10 +1,10 @@
 list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore"
     "${DirectX_INCLUDE_DIRS}"
-    "$ENV{WEBKIT_LIBRARIES}/include"
-    "$ENV{WEBKIT_LIBRARIES}/include/cairo"
-    "$ENV{WEBKIT_LIBRARIES}/include/SQLite"
-    "$ENV{WEBKIT_LIBRARIES}/include/zlib"
+    "${WEBKIT_LIBRARIES_DIR}/include"
+    "${WEBKIT_LIBRARIES_DIR}/include/cairo"
+    "${WEBKIT_LIBRARIES_DIR}/include/SQLite"
+    "${WEBKIT_LIBRARIES_DIR}/include/zlib"
     "${JAVASCRIPTCORE_DIR}/wtf/text"
     "${WEBCORE_DIR}/loader/archive/cf"
     "${WEBCORE_DIR}/platform/cf"
index cf2f6d6..359b60a 100644 (file)
@@ -1,5 +1,15 @@
 2015-08-17  Alex Christensen  <achristensen@webkit.org>
 
+        [Win CMake] Allow WebKitLibraries directory to be set from the command line
+        https://bugs.webkit.org/show_bug.cgi?id=148112
+
+        Reviewed by Brent Fulgham.
+
+        * PlatformWin.cmake:
+        Don't use an environment variable for WEBKIT_LIBRARIES_DIR.  
+
+2015-08-17  Alex Christensen  <achristensen@webkit.org>
+
         Build Debug Suffix on Windows with CMake
         https://bugs.webkit.org/show_bug.cgi?id=148083
 
index 950840b..a3aa34f 100644 (file)
@@ -1,9 +1,9 @@
 if (${WTF_PLATFORM_WIN_CAIRO})
     add_definitions(-DUSE_CAIRO=1 -DUSE_CURL=1 -DWEBKIT_EXPORTS=1)
     list(APPEND WebKit_INCLUDE_DIRECTORIES
-        "$ENV{WEBKIT_LIBRARIES}/include"
-        "$ENV{WEBKIT_LIBRARIES}/include/cairo"
-        "$ENV{WEBKIT_LIBRARIES}/include/sqlite"
+        "${WEBKIT_LIBRARIES_DIR}/include"
+        "${WEBKIT_LIBRARIES_DIR}/include/cairo"
+        "${WEBKIT_LIBRARIES_DIR}/include/sqlite"
         "${WEBCORE_DIR}/platform/graphics/cairo"
     )
     list(APPEND WebKit_SOURCES_Classes
index aeabcf1..d76da01 100644 (file)
@@ -107,18 +107,28 @@ endif ()
 
 WEBKIT_OPTION_END()
 
-include_directories("$ENV{WEBKIT_LIBRARIES}/include")
+if (NOT WEBKIT_LIBRARIES_DIR)
+    set(WEBKIT_LIBRARIES_DIR "${CMAKE_SOURCE_DIR}/WebKitLibraries/win")
+endif ()
+
+include_directories("${WEBKIT_LIBRARIES_DIR}/include")
 if (${MSVC_CXX_ARCHITECTURE_ID} STREQUAL "X86")
-    link_directories("$ENV{WEBKIT_LIBRARIES}/lib32")
+    link_directories("${WEBKIT_LIBRARIES_DIR}/lib32")
     set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib32)
     set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib32)
     set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin32)
 else ()
-    link_directories("$ENV{WEBKIT_LIBRARIES}/lib64")
+    link_directories("${WEBKIT_LIBRARIES_DIR}/lib64")
     set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib64)
     set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib64)
     set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin64)
 endif ()
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
 
 if (MSVC)
     add_definitions(