[GTK] [CMake] Ensure that the autotools build and the CMake install the same files
[WebKit-https.git] / Source / JavaScriptCore / PlatformGTK.cmake
1 configure_file(javascriptcoregtk.pc.in ${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-3.0.pc @ONLY)
2 configure_file(JavaScriptCore.gir.in ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir @ONLY)
3
4 add_custom_command(
5     OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib
6     DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir
7     COMMAND ${INTROSPECTION_COMPILER} ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir -o ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib
8 )
9
10 ADD_TYPELIB(${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib)
11
12 install(FILES "${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-3.0.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 install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir
27         DESTINATION ${INTROSPECTION_INSTALL_GIRDIR}
28 )
29 install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib
30         DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
31 )