[WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWi...
[WebKit-https.git] / Source / JavaScriptCore / GLib.cmake
1 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib)
2 file(MAKE_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPCORE_GLIB_API_DIR})
3
4 list(APPEND JavaScriptCore_SOURCES
5     API/glib/JSAPIWrapperGlobalObject.cpp
6     API/glib/JSAPIWrapperObjectGLib.cpp
7     API/glib/JSCCallbackFunction.cpp
8     API/glib/JSCClass.cpp
9     API/glib/JSCContext.cpp
10     API/glib/JSCException.cpp
11     API/glib/JSCOptions.cpp
12     API/glib/JSCValue.cpp
13     API/glib/JSCVersion.cpp
14     API/glib/JSCVirtualMachine.cpp
15     API/glib/JSCWeakValue.cpp
16     API/glib/JSCWrapperMap.cpp
17 )
18
19 list(APPEND JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES
20     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib"
21     "${DERIVED_SOURCES_JAVASCRIPCORE_GLIB_API_DIR}"
22     "${JAVASCRIPTCORE_DIR}/API/glib"
23 )
24
25 set(JavaScriptCore_INSTALLED_HEADERS
26     ${DERIVED_SOURCES_JAVASCRIPCORE_GLIB_API_DIR}/JSCVersion.h
27     ${JAVASCRIPTCORE_DIR}/API/glib/JSCAutocleanups.h
28     ${JAVASCRIPTCORE_DIR}/API/glib/JSCClass.h
29     ${JAVASCRIPTCORE_DIR}/API/glib/JSCContext.h
30     ${JAVASCRIPTCORE_DIR}/API/glib/JSCDefines.h
31     ${JAVASCRIPTCORE_DIR}/API/glib/JSCException.h
32     ${JAVASCRIPTCORE_DIR}/API/glib/JSCOptions.h
33     ${JAVASCRIPTCORE_DIR}/API/glib/JSCValue.h
34     ${JAVASCRIPTCORE_DIR}/API/glib/JSCVirtualMachine.h
35     ${JAVASCRIPTCORE_DIR}/API/glib/JSCWeakValue.h
36     ${JAVASCRIPTCORE_DIR}/API/glib/jsc.h
37 )
38
39 configure_file(API/glib/JSCVersion.h.in ${DERIVED_SOURCES_JAVASCRIPCORE_GLIB_API_DIR}/JSCVersion.h)
40
41 # These symbolic link allows includes like #include <jsc/jsc.h> which simulates installed headers.
42 add_custom_command(
43     OUTPUT ${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib/jsc
44     DEPENDS ${JAVASCRIPTCORE_DIR}/API/glib
45     COMMAND ln -n -s -f ${JAVASCRIPTCORE_DIR}/API/glib ${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib/jsc
46     VERBATIM
47 )
48 add_custom_target(JSC-fake-api-headers
49     DEPENDS ${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib/jsc
50 )
51 set(JavaScriptCore_EXTRA_DEPENDENCIES
52     JSC-fake-api-headers
53 )