~mmach/netext73/webkit2gtk

« back to all changes in this revision

Viewing changes to Source/cmake/target/TargetJavaScriptCore.cmake

  • Committer: mmach
  • Date: 2023-06-16 17:21:37 UTC
  • Revision ID: netbit73@gmail.com-20230616172137-2rqx6yr96ga9g3kp
1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
if (NOT TARGET WebKit::JavaScriptCore)
 
2
    if (NOT INTERNAL_BUILD)
 
3
        message(FATAL_ERROR "WebKit::JavaScriptCore target not found")
 
4
    endif ()
 
5
 
 
6
    # This should be moved to an if block if the Apple Mac/iOS build moves completely to CMake
 
7
    # Just assuming Windows for the moment
 
8
    add_library(WebKit::JavaScriptCore SHARED IMPORTED)
 
9
    set_target_properties(WebKit::JavaScriptCore PROPERTIES
 
10
        IMPORTED_LOCATION ${WEBKIT_LIBRARIES_RUNTIME_DIR}/JavaScriptCore${DEBUG_SUFFIX}.dll
 
11
        IMPORTED_IMPLIB ${WEBKIT_LIBRARIES_LINK_DIR}/JavaScriptCore${DEBUG_SUFFIX}.lib
 
12
        # Should add Apple::CoreFoundation here when https://bugs.webkit.org/show_bug.cgi?id=205085 lands
 
13
        INTERFACE_LINK_LIBRARIES "WebKit::WTF;ICU::data;ICU::i18n;ICU::uc"
 
14
    )
 
15
    target_include_directories(WebKit::JavaScriptCore INTERFACE
 
16
        ${JavaScriptCore_FRAMEWORK_HEADERS_DIR}
 
17
        ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
 
18
    )
 
19
endif ()