This is an automated email from the ASF dual-hosted git repository.
haibin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new f872b43 Protobuf_USE_STATIC_LIBS must be set on Apple too (#18851)
f872b43 is described below
commit f872b43407ccfb7d17fe7492c7d869b83194f3a6
Author: Leonard Lausen <[email protected]>
AuthorDate: Mon Aug 3 20:11:06 2020 +0000
Protobuf_USE_STATIC_LIBS must be set on Apple too (#18851)
Fixes https://github.com/apache/incubator-mxnet/issues/18840
---
CMakeLists.txt | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c9e2e18..c6aa06e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,12 +148,14 @@ else()
execute_process(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE
SYSTEM_ARCHITECTURE)
endif()
-if(CMAKE_BUILD_TYPE STREQUAL "Distribution" AND UNIX AND NOT APPLE)
- set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
- set(CMAKE_INSTALL_RPATH $\{ORIGIN\})
- # Enforce DT_PATH instead of DT_RUNPATH
- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--disable-new-dtags")
- set(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags")
+if(CMAKE_BUILD_TYPE STREQUAL "Distribution")
+ if(UNIX AND NOT APPLE)
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
+ set(CMAKE_INSTALL_RPATH $\{ORIGIN\})
+ # Enforce DT_PATH instead of DT_RUNPATH
+ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--disable-new-dtags")
+ set(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags")
+ endif()
set(Protobuf_USE_STATIC_LIBS ON)
endif()