REGRESSION(CMake): Make it possible to build without introspection
[WebKit-https.git] / Source / JavaScriptCore / PlatformGTK.cmake
1 configure_file(javascriptcoregtk.pc.in ${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc @ONLY)
2 configure_file(JavaScriptCore.gir.in ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir @ONLY)
3
4 add_custom_command(
5     OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib
6     DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
7     COMMAND ${INTROSPECTION_COMPILER} ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib
8 )
9
10 ADD_TYPELIB(${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib)
11
12 install(FILES "${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc"
13         DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
14 )
15
16 install(FILES API/JavaScript.h
17               API/JSBase.h
18               API/JSContextRef.h
19               API/JSObjectRef.h
20               API/JSStringRef.h
21               API/JSValueRef.h
22               API/WebKitAvailability.h
23         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/JavaScriptCore"
24 )
25
26 if (ENABLE_INTROSPECTION)
27     install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
28             DESTINATION ${INTROSPECTION_INSTALL_GIRDIR}
29     )
30     install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib
31             DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
32     )
33 endif ()
34
35 add_definitions(-DSTATICALLY_LINKED_WITH_WTF)
36
37 list(APPEND JavaScriptCore_LIBRARIES
38     ${GLIB_LIBRARIES}
39 )
40 list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
41     ${GLIB_INCLUDE_DIRS}
42 )