Skip to content

Commit

Permalink
Removed sudo ldconfig and added -rpath.
Browse files Browse the repository at this point in the history
There is no `ldconfig` on macOS.
  • Loading branch information
tfpf committed Sep 23, 2023
1 parent f13f6b3 commit 6d34552
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ include(GNUInstallDirs)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED TRUE)
if(UNIX)
list(APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
endif()

file(GLOB sources lib/*.c)
list(FILTER sources EXCLUDE REGEX ".*py.*")
Expand Down
5 changes: 2 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env sh

if [ "$1" = uninstall ]
if [ "$1" = rm ]
then
im=build/install_manifest.txt
if [ ! -f $im ]
Expand All @@ -10,7 +10,7 @@ then
fi
while read fname
do
sudo rm $fname
sudo rm -v $fname
done < $im
exit
fi
Expand All @@ -24,4 +24,3 @@ fi
mkdir -p build && cd build
cmake ..
sudo make --jobs=4 install
sudo ldconfig

0 comments on commit 6d34552

Please sign in to comment.