Fixes to build JSCOnly on macOS
[WebKit.git] / Source / cmake / OptionsJSCOnly.cmake
index de649c4..53b4ee0 100644 (file)
@@ -1,6 +1,7 @@
-find_package(ICU REQUIRED)
 find_package(Threads REQUIRED)
 
+add_definitions(-DBUILDING_JSCONLY__)
+
 set(PROJECT_VERSION_MAJOR 1)
 set(PROJECT_VERSION_MINOR 0)
 set(PROJECT_VERSION_MICRO 0)
@@ -44,6 +45,17 @@ else ()
     SET_AND_EXPOSE_TO_BUILD(WTF_DEFAULT_EVENT_LOOP 0)
 endif ()
 
+if (NOT APPLE)
+    find_package(ICU REQUIRED)
+else ()
+    set(ICU_INCLUDE_DIRS
+        "${WEBCORE_DIR}/icu"
+        "${JAVASCRIPTCORE_DIR}/icu"
+        "${WTF_DIR}/icu"
+    )
+    set(ICU_LIBRARIES libicucore.dylib)
+endif ()
+
 # From OptionsGTK.cmake
 if (CMAKE_MAJOR_VERSION LESS 3)
     # Before CMake 3 it was necessary to use a build script instead of using cmake --build directly