Title: [204581] trunk
Revision
204581
Author
[email protected]
Date
2016-08-17 16:29:50 -0700 (Wed, 17 Aug 2016)

Log Message

Use find_library within Windows build
https://bugs.webkit.org/show_bug.cgi?id=160904

Patch by Don Olmstead <[email protected]> on 2016-08-17
Reviewed by Brent Fulgham.

.:

* Source/cmake/FindICU.cmake:
* Source/cmake/OptionsWin.cmake:

Source/WTF:

* wtf/CMakeLists.txt:

Modified Paths

Diff

Modified: trunk/ChangeLog (204580 => 204581)


--- trunk/ChangeLog	2016-08-17 23:08:26 UTC (rev 204580)
+++ trunk/ChangeLog	2016-08-17 23:29:50 UTC (rev 204581)
@@ -1,3 +1,13 @@
+2016-08-17  Don Olmstead  <[email protected]>
+
+        Use find_library within Windows build
+        https://bugs.webkit.org/show_bug.cgi?id=160904
+
+        Reviewed by Brent Fulgham.
+
+        * Source/cmake/FindICU.cmake:
+        * Source/cmake/OptionsWin.cmake:
+
 2016-08-17  Gyuyoung Kim  <[email protected]>
 
         [EFL] Bump efl version from 1.17 to 1.18

Modified: trunk/Source/WTF/ChangeLog (204580 => 204581)


--- trunk/Source/WTF/ChangeLog	2016-08-17 23:08:26 UTC (rev 204580)
+++ trunk/Source/WTF/ChangeLog	2016-08-17 23:29:50 UTC (rev 204581)
@@ -1,3 +1,12 @@
+2016-08-17  Don Olmstead  <[email protected]>
+
+        Use find_library within Windows build
+        https://bugs.webkit.org/show_bug.cgi?id=160904
+
+        Reviewed by Brent Fulgham.
+
+        * wtf/CMakeLists.txt:
+
 2016-08-17  Anders Carlsson  <[email protected]>
 
         Move WKSignedPublicKeyAndChallengeString into WebCore and make it proper C++

Modified: trunk/Source/WTF/wtf/CMakeLists.txt (204580 => 204581)


--- trunk/Source/WTF/wtf/CMakeLists.txt	2016-08-17 23:08:26 UTC (rev 204580)
+++ trunk/Source/WTF/wtf/CMakeLists.txt	2016-08-17 23:29:50 UTC (rev 204581)
@@ -279,6 +279,7 @@
     ${ICU_INCLUDE_DIRS}
 )
 list(APPEND WTF_LIBRARIES
+    ${ICU_DATA_LIBRARIES}
     ${ICU_I18N_LIBRARIES}
     ${ICU_LIBRARIES}
 )

Modified: trunk/Source/cmake/FindICU.cmake (204580 => 204581)


--- trunk/Source/cmake/FindICU.cmake	2016-08-17 23:08:26 UTC (rev 204580)
+++ trunk/Source/cmake/FindICU.cmake	2016-08-17 23:29:50 UTC (rev 204581)
@@ -18,6 +18,7 @@
     NAMES unicode/utypes.h
     HINTS ${PC_ICU_INCLUDE_DIRS}
           ${PC_ICU_INCLUDEDIR}
+          ${WEBKIT_LIBRARIES_INCLUDE_DIR}
     DOC "Include directory for the ICU library")
 mark_as_advanced(ICU_INCLUDE_DIR)
 
@@ -24,9 +25,10 @@
 # Look for the library.
 find_library(
     ICU_LIBRARY
-    NAMES icuuc cygicuuc cygicuuc32
+    NAMES icuuc libicuuc cygicuuc cygicuuc32
     HINTS ${PC_ICU_LIBRARY_DIRS}
           ${PC_ICU_LIBDIR}
+          ${WEBKIT_LIBRARIES_LINK_DIR}
     DOC "Libraries to link against for the common parts of ICU")
 mark_as_advanced(ICU_LIBRARY)
 
@@ -49,9 +51,10 @@
     pkg_check_modules(PC_ICU_I18N icu-i18n)
     find_library(
         ICU_I18N_LIBRARY
-        NAMES icui18n icuin cygicuin cygicuin32
+        NAMES icui18n icuin libicui18n libicuin cygicuin cygicuin32
         HINTS ${PC_ICU_I18N_LIBRARY_DIRS}
               ${PC_ICU_I18N_LIBDIR}
+              ${WEBKIT_LIBRARIES_LINK_DIR}
         DOC "Libraries to link against for ICU internationalization")
     mark_as_advanced(ICU_I18N_LIBRARY)
     if (ICU_I18N_LIBRARY)
@@ -61,11 +64,30 @@
         set(ICU_I18N_FOUND 0)
         set(ICU_I18N_LIBRARIES)
     endif ()
+
+    # Look for the ICU data libraries
+    find_library(
+        ICU_DATA_LIBRARY
+        NAMES icudata libicudata cygicudata cygicudata32
+        HINTS ${PC_ICU_I18N_LIBRARY_DIRS}
+              ${PC_ICU_I18N_LIBDIR}
+              ${WEBKIT_LIBRARIES_LINK_DIR}
+        DOC "Libraries to link against for ICU data")
+    mark_as_advanced(ICU_DATA_LIBRARY)
+    if (ICU_DATA_LIBRARY)
+        set(ICU_DATA_FOUND 1)
+        set(ICU_DATA_LIBRARIES ${ICU_DATA_LIBRARY})
+    else ()
+        set(ICU_DATA_FOUND 0)
+        set(ICU_DATA_LIBRARIES)
+    endif ()
 else ()
     set(ICU_FOUND 0)
     set(ICU_I18N_FOUND 0)
+    set(ICU_DATA_FOUND 0)
     set(ICU_LIBRARIES)
     set(ICU_I18N_LIBRARIES)
+    set(ICU_DATA_LIBRARIES)
     set(ICU_INCLUDE_DIRS)
     set(ICU_VERSION)
     set(ICU_MAJOR_VERSION)
@@ -76,6 +98,8 @@
     if (NOT ICU_FIND_QUIETLY)
         message(STATUS "Found ICU header files in ${ICU_INCLUDE_DIRS}")
         message(STATUS "Found ICU libraries: ${ICU_LIBRARIES}")
+        message(STATUS "Found ICU internationaliation libraries: ${ICU_I18N_LIBRARIES}")
+        message(STATUS "Found ICU data libraries: ${ICU_DATA_LIBRARIES}")
     endif ()
 else ()
     if (ICU_FIND_REQUIRED)

Modified: trunk/Source/cmake/OptionsWin.cmake (204580 => 204581)


--- trunk/Source/cmake/OptionsWin.cmake	2016-08-17 23:08:26 UTC (rev 204580)
+++ trunk/Source/cmake/OptionsWin.cmake	2016-08-17 23:29:50 UTC (rev 204581)
@@ -93,18 +93,25 @@
     endif ()
 endif ()
 
-include_directories("${CMAKE_BINARY_DIR}/DerivedSources/ForwardingHeaders" "${CMAKE_BINARY_DIR}/DerivedSources" "${WEBKIT_LIBRARIES_DIR}/include")
+set(WEBKIT_LIBRARIES_INCLUDE_DIR "${WEBKIT_LIBRARIES_DIR}/include")
+
+include_directories("${CMAKE_BINARY_DIR}/DerivedSources/ForwardingHeaders" "${CMAKE_BINARY_DIR}/DerivedSources" "${WEBKIT_LIBRARIES_INCLUDE_DIR}")
 if (${MSVC_CXX_ARCHITECTURE_ID} STREQUAL "X86")
-    link_directories("${CMAKE_BINARY_DIR}/lib32" "${WEBKIT_LIBRARIES_DIR}/lib32")
+    set(WEBKIT_LIBRARIES_LINK_DIR "${WEBKIT_LIBRARIES_DIR}/lib32")
+    # FIXME: Remove ${WEBKIT_LIBRARIES_LINK_DIR} when find_library is used for everything
+    link_directories("${CMAKE_BINARY_DIR}/lib32" "${WEBKIT_LIBRARIES_LINK_DIR}")
     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("${CMAKE_BINARY_DIR}/lib64" "${WEBKIT_LIBRARIES_DIR}/lib64")
+    set(WEBKIT_LIBRARIES_LINK_DIR "${WEBKIT_LIBRARIES_DIR}/lib64")
+    # FIXME: Remove ${WEBKIT_LIBRARIES_LINK_DIR} when find_library is used for everything
+    link_directories("${CMAKE_BINARY_DIR}/lib64" "${WEBKIT_LIBRARIES_LINK_DIR}")
     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}")
@@ -181,4 +188,5 @@
 set(PORT Win)
 set(_javascript_Core_LIBRARY_TYPE SHARED)
 set(WTF_LIBRARY_TYPE SHARED)
-set(ICU_LIBRARIES libicuuc${DEBUG_SUFFIX} libicuin${DEBUG_SUFFIX})
+
+find_package(ICU REQUIRED)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to