Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Protobuf_USE_STATIC_LIBS must be set on Apple too #18851

Merged
merged 1 commit into from
Aug 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down