Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 565c21d

Browse files
committed
Fix the RPATH on macos
1 parent 86e9447 commit 565c21d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎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)