darling-JavaScriptCore/PlatformGTK.cmake
2018-01-02 21:17:19 -08:00

65 lines
2.3 KiB
CMake

set(JavaScriptCore_OUTPUT_NAME javascriptcoregtk-${WEBKITGTK_API_VERSION})
list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
"${JAVASCRIPTCORE_DIR}/inspector/remote/glib"
)
configure_file(javascriptcoregtk.pc.in ${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc @ONLY)
configure_file(JavaScriptCore.gir.in ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir @ONLY)
list(APPEND JavaScriptCore_SOURCES
API/JSRemoteInspector.cpp
inspector/remote/RemoteAutomationTarget.cpp
inspector/remote/RemoteControllableTarget.cpp
inspector/remote/RemoteInspectionTarget.cpp
inspector/remote/RemoteInspector.cpp
inspector/remote/glib/RemoteConnectionToTargetGlib.cpp
inspector/remote/glib/RemoteInspectorGlib.cpp
inspector/remote/glib/RemoteInspectorServer.cpp
inspector/remote/glib/RemoteInspectorUtils.cpp
)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib
DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
COMMAND ${INTROSPECTION_COMPILER} ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib
)
ADD_TYPELIB(${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib)
install(FILES "${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc"
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
)
install(FILES API/JavaScript.h
API/JSBase.h
API/JSContextRef.h
API/JSObjectRef.h
API/JSStringRef.h
API/JSTypedArray.h
API/JSValueRef.h
API/WebKitAvailability.h
DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/JavaScriptCore"
)
if (ENABLE_INTROSPECTION)
install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
DESTINATION ${INTROSPECTION_INSTALL_GIRDIR}
)
install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib
DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
)
endif ()
add_definitions(-DSTATICALLY_LINKED_WITH_WTF)
add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}")
list(APPEND JavaScriptCore_LIBRARIES
${GLIB_LIBRARIES}
)
list(APPEND JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
${GLIB_INCLUDE_DIRS}
)