]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - PlatformWin.cmake
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / PlatformWin.cmake
diff --git a/PlatformWin.cmake b/PlatformWin.cmake
new file mode 100644 (file)
index 0000000..9575a16
--- /dev/null
@@ -0,0 +1,29 @@
+list(APPEND JavaScriptCore_SOURCES
+    API/JSStringRefBSTR.cpp
+    API/JSStringRefCF.cpp
+)
+
+if (WTF_PLATFORM_WIN_CAIRO)
+    list(APPEND JavaScriptCore_LIBRARIES
+        CFLite
+    )
+else ()
+    list(APPEND JavaScriptCore_LIBRARIES
+        CoreFoundation
+    )
+endif ()
+
+if (MSVC AND "${JavaScriptCore_LIBRARY_TYPE}" MATCHES "SHARED")
+    get_property(WTF_LIBRARY_LOCATION TARGET WTF PROPERTY LOCATION)
+
+    add_custom_command(
+        OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/forwarded-exports.cpp
+        DEPENDS WTF
+        COMMAND ${PYTHON_EXECUTABLE} ${TOOLS_DIR}/Scripts/generate-win32-export-forwards ${WTF_LIBRARY_LOCATION} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/forwarded-exports.cpp
+        VERBATIM)
+    list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/forwarded-exports.cpp)
+endif ()
+
+list(REMOVE_ITEM JavaScriptCore_SOURCES
+    inspector/JSGlobalObjectInspectorController.cpp
+)