changeset 10651:acd30e210f23

8186061: libjfxwebkit.dylib ld warning libicudata.a was built for newer OSX version Reviewed-by: arajkumar, mbilla
author ghb
date Tue, 03 Oct 2017 12:59:24 +0530
parents cfa038af148b
children 5531fbd393a6
files modules/javafx.web/src/main/native/Source/ThirdParty/icu/java/data/CMakeLists.txt modules/javafx.web/src/main/native/Source/ThirdParty/icu/java/data/icudata_wrapper.sh
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/javafx.web/src/main/native/Source/ThirdParty/icu/java/data/CMakeLists.txt	Fri Sep 29 12:00:27 2017 +0530
+++ b/modules/javafx.web/src/main/native/Source/ThirdParty/icu/java/data/CMakeLists.txt	Tue Oct 03 12:59:24 2017 +0530
@@ -1,6 +1,16 @@
 include(ExternalProject)
 
-set (ICU_DATA_BUILD_COMMAND bash icudata_wrapper.sh ${CMAKE_BINARY_DIR} ${CMAKE_BUILD_TYPE} ${ICU_JAVA_DATA_LIB} ${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS})
+set (ICU_DATA_BUILD_COMMAND bash icudata_wrapper.sh ${CMAKE_BINARY_DIR} ${CMAKE_BUILD_TYPE} ${ICU_JAVA_DATA_LIB} ${CMAKE_C_FLAGS})
+
+if (APPLE)
+    # Fixed in ICU 59.1 http://bugs.icu-project.org/trac/ticket/12643
+    string (REPLACE "-std=c++1y" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+    # Fixed in ICU 56.1 http://bugs.icu-project.org/trac/ticket/11435
+    string (REPLACE "-fno-rtti" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+    list(APPEND ICU_DATA_BUILD_COMMAND ${CMAKE_CXX_FLAGS} ${CMAKE_OSX_DEPLOYMENT_TARGET})
+else ()
+    list(APPEND ICU_DATA_BUILD_COMMAND ${CMAKE_CXX_FLAGS})
+endif ()
 
 add_custom_target(icudatagen ALL
                   COMMAND ${ICU_DATA_BUILD_COMMAND}
--- a/modules/javafx.web/src/main/native/Source/ThirdParty/icu/java/data/icudata_wrapper.sh	Fri Sep 29 12:00:27 2017 +0530
+++ b/modules/javafx.web/src/main/native/Source/ThirdParty/icu/java/data/icudata_wrapper.sh	Tue Oct 03 12:59:24 2017 +0530
@@ -5,6 +5,7 @@
 # $3 : icu Data library location
 # $4 : CFLAGS used by cmake
 # $5 : CPPFLAGS used by cmake
+# $6 : Mac OSX min version
 
 JAVA_DATA_LIBRARY=$3
 
@@ -12,6 +13,9 @@
    Darwin)
      JAVA_LIBDIR=$1
      PLATFORM=MacOSX
+     export CFLAGS=$4
+     export CPPFLAGS="$5 -mmacosx-version-min=$6"
+     export LDFLAGS=-mmacosx-version-min=$6
      ;;
 
    Linux)