fix breaking build on macos (#970)

* fix breaking build on macos

* 0.57.1

* fix tests
This commit is contained in:
Atul R 2022-09-04 00:14:10 +02:00 committed by GitHub
parent 95da509b83
commit b7d503fd39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 5 deletions

View File

@ -267,8 +267,6 @@ endif()
if (APPLE)
file(RELATIVE_PATH QT_LIBRARY_REL_PATH "${CMAKE_BINARY_DIR}/Release" "${QT_CMAKE_HOME_DIR}/../..")
set_target_properties(${CORE_WIDGETS_ADDON} PROPERTIES INSTALL_RPATH "@loader_path/${QT_LIBRARY_REL_PATH}")
set_target_properties(${CORE_WIDGETS_ADDON} PROPERTIES SKIP_BUILD_RPATH FALSE)
set_target_properties(${CORE_WIDGETS_ADDON} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
endif()
target_link_libraries(${CORE_WIDGETS_ADDON} PRIVATE

View File

@ -1,6 +1,6 @@
{
"name": "@nodegui/nodegui",
"version": "0.57.0",
"version": "0.57.1",
"description": "A cross-platform library to build native desktop apps.",
"main": "dist/index.js",
"typings": "dist/index.d.ts",

View File

@ -14,6 +14,6 @@ describe('QMainWindow', () => {
const win = new QMainWindow();
const widget = new QWidget();
win.setCentralWidget(widget);
expect(win.centralWidget).toEqual(widget);
expect(win.centralWidget()).toEqual(widget);
});
});

View File

@ -35,7 +35,7 @@ describe('WrapperCache using CacheTestQObject', () => {
const fooId = foo.native.__id__();
a.clearFoo();
expect(foo.native).toBeNull();
console.log(''); // for some reason this fixes the test in macos
const foo2 = a.foo();
expect(foo2).not.toBe(foo);
expect(foo2.native.__id__()).not.toBe(fooId);