From 43dd4ac48d728768a61bd6ab0567fa4ac559b9e6 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Tue, 12 Oct 2021 14:45:46 +0100 Subject: [PATCH] Add the RPATH posix fix support to libserene target --- LICENSE | 2 +- src/libserene/CMakeLists.txt | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index 8831117..c23d6b7 100755 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ - Copyright (c) 2020 Sameer Rahmani + Copyright (c) 2019-2021 Sameer Rahmani Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/libserene/CMakeLists.txt b/src/libserene/CMakeLists.txt index 7ff7dcb..2a7977e 100644 --- a/src/libserene/CMakeLists.txt +++ b/src/libserene/CMakeLists.txt @@ -24,12 +24,16 @@ # https://cmake.org/cmake/help/latest/prop_tgt/PUBLIC_HEADER.html # Hide all the symbols by default -if (NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET AND +if(NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET AND NOT DEFINED CMAKE_VISIBILITY_INLINES_HIDDEN) set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN YES) -endif () +endif() +# Prevent any future RPATH issue on Posix +if(NOT APPLE) + set(CMAKE_INSTALL_RPATH $ORIGIN) +endif() add_library(serene exprs/symbol.cpp