Skip to content

Commit 77fd5c5

Browse files
committed
Fix RPATH of the binary module on macos
1 parent a2e5b73 commit 77fd5c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set(CORE_WIDGETS_ADDON "nodegui_core")
1111

1212
project(${CORE_WIDGETS_ADDON})
1313

14+
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
1415

1516
# Note: CMake+moc also use this list when finding files which `moc` applied.
1617

@@ -265,6 +266,7 @@ if (UNIX AND NOT APPLE)
265266
endif()
266267

267268
if (APPLE)
269+
set(CMAKE_MACOSX_RPATH ON)
268270
file(RELATIVE_PATH QT_LIBRARY_REL_PATH "${CMAKE_BINARY_DIR}/Release" "${QT_CMAKE_HOME_DIR}/../..")
269271
set_target_properties(${CORE_WIDGETS_ADDON} PROPERTIES INSTALL_RPATH "@loader_path/${QT_LIBRARY_REL_PATH}")
270272
endif()

0 commit comments

Comments
 (0)