You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sz...@apache.org on 2023/05/15 20:34:26 UTC
[nifi-minifi-cpp] 02/02: MINIFICPP-2107 fix macOS make package
This is an automated email from the ASF dual-hosted git repository.
szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 6a4d199394a9efe822bf9e86f2f49526de191dfc
Author: Martin Zink <ma...@apache.org>
AuthorDate: Mon May 15 19:23:47 2023 +0200
MINIFICPP-2107 fix macOS make package
Closes #1570
Signed-off-by: Marton Szasz <sz...@apache.org>
---
cmake/Extensions.cmake | 6 +++++-
controller/CMakeLists.txt | 6 +++++-
encrypt-config/CMakeLists.txt | 6 +++++-
minifi_main/CMakeLists.txt | 6 +++++-
4 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/cmake/Extensions.cmake b/cmake/Extensions.cmake
index da8a17916..d02f2883a 100644
--- a/cmake/Extensions.cmake
+++ b/cmake/Extensions.cmake
@@ -68,7 +68,11 @@ macro(register_extension extension-name extension-display-name extension-guard d
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_link_options(${extension-name} PRIVATE "-Wl,--disable-new-dtags")
endif()
- set_target_properties(${extension-name} PROPERTIES INSTALL_RPATH "$ORIGIN")
+ if (APPLE)
+ set_target_properties(${extension-name} PROPERTIES INSTALL_RPATH "@loader_path")
+ else()
+ set_target_properties(${extension-name} PROPERTIES INSTALL_RPATH "$ORIGIN")
+ endif()
install(TARGETS ${extension-name} LIBRARY DESTINATION extensions COMPONENT ${component-name})
endif()
diff --git a/controller/CMakeLists.txt b/controller/CMakeLists.txt
index fa67d0397..dd3161198 100644
--- a/controller/CMakeLists.txt
+++ b/controller/CMakeLists.txt
@@ -49,7 +49,11 @@ if (NOT WIN32)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_link_options(minificontroller PRIVATE "-Wl,--disable-new-dtags")
endif()
- set_target_properties(minificontroller PROPERTIES INSTALL_RPATH "$ORIGIN")
+ if (APPLE)
+ set_target_properties(minificontroller PROPERTIES INSTALL_RPATH "@loader_path")
+ else()
+ set_target_properties(minificontroller PROPERTIES INSTALL_RPATH "$ORIGIN")
+ endif()
endif()
install(TARGETS minificontroller RUNTIME DESTINATION bin COMPONENT bin)
diff --git a/encrypt-config/CMakeLists.txt b/encrypt-config/CMakeLists.txt
index 5c4005b3a..d54b4f06a 100644
--- a/encrypt-config/CMakeLists.txt
+++ b/encrypt-config/CMakeLists.txt
@@ -33,6 +33,10 @@ if (NOT WIN32)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_link_options(encrypt-config PRIVATE "-Wl,--disable-new-dtags")
endif()
- set_target_properties(encrypt-config PROPERTIES INSTALL_RPATH "$ORIGIN")
+ if (APPLE)
+ set_target_properties(encrypt-config PROPERTIES INSTALL_RPATH "@loader_path")
+ else()
+ set_target_properties(encrypt-config PROPERTIES INSTALL_RPATH "$ORIGIN")
+ endif()
endif()
install(TARGETS encrypt-config RUNTIME DESTINATION bin COMPONENT bin)
diff --git a/minifi_main/CMakeLists.txt b/minifi_main/CMakeLists.txt
index b2fd36a46..c1e5e80d2 100644
--- a/minifi_main/CMakeLists.txt
+++ b/minifi_main/CMakeLists.txt
@@ -84,6 +84,10 @@ if (NOT WIN32)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_link_options(minifiexe PRIVATE "-Wl,--disable-new-dtags")
endif()
- set_target_properties(minifiexe PROPERTIES INSTALL_RPATH "$ORIGIN")
+ if (APPLE)
+ set_target_properties(minifiexe PROPERTIES INSTALL_RPATH "@loader_path")
+ else()
+ set_target_properties(minifiexe PROPERTIES INSTALL_RPATH "$ORIGIN")
+ endif()
install(TARGETS minifiexe RUNTIME DESTINATION bin COMPONENT bin)
endif()