Skip to content

Commit

Permalink
update to javascriptcoregtk-4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SusanDoggie committed Apr 5, 2020
1 parent 84d2315 commit df42474
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis/before-install-swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -e

apt-get -y install libjavascriptcoregtk-1.0-dev
apt-get -y install libjavascriptcoregtk-4.0-dev
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ targets.append(
"CJSCore",
],
cSettings: [
.unsafeFlags(["-I/usr/include/webkitgtk-1.0"]),
.unsafeFlags(["-I/usr/include/webkitgtk-4.0"]),
]
)
)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ A cross platform Javascript engine for Swift.

For Ubuntu, you need to install JavaScriptCore

apt-get -y install libjavascriptcoregtk-1.0-dev
apt-get -y install libjavascriptcoregtk-4.0-dev

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions Sources/CJSCore/include/module.modulemap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module CJSCore [system] [extern_c] {
umbrella header "/usr/include/webkitgtk-1.0/JavaScriptCore/JavaScript.h"
link "javascriptcoregtk-1.0"
umbrella header "/usr/include/webkitgtk-4.0/JavaScriptCore/JavaScript.h"
link "javascriptcoregtk-4.0"
export *
}
8 changes: 6 additions & 2 deletions Sources/SwiftJS/JSArrayBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@

import JavaScriptCore

#else

import CJSCore

#endif

extension JSObject {

/// Creates a JavaScript `ArrayBuffer` object.
Expand Down Expand Up @@ -91,5 +97,3 @@ extension JSObject {
}

}

#endif

0 comments on commit df42474

Please sign in to comment.