Skip to content

Commit be2db41

Browse files
committed
fix macos build (hope)
1 parent 19d8cd3 commit be2db41

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/workflows/cmake.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
sudo apt-get purge firefox # Slows down the installation alot, fuck snap
2121
sudo apt-get update && sudo apt upgrade -y
2222
sudo apt-get install neofetch tree build-essential cmake g++-11 libwayland-dev gettext libdconf-dev libglib2.0-dev libarchive-tools -y
23-
23+
2424
- name: Clean
2525
run: make distclean
2626

@@ -43,7 +43,7 @@ jobs:
4343
tree /sys/devices/system/cpu/cpu0/
4444
printf "/etc/os-release\n" && cat /etc/os-release
4545
printf "getting 0x5353 hexcode\n" && grep -nri "5353" /sys/class/ || true
46-
46+
4747
- name: Test customfetch
4848
run: customfetch --wrap-lines
4949

@@ -81,7 +81,7 @@ jobs:
8181
8282
- name: Test neofetch
8383
run: neofetch
84-
84+
8585
- name: Test customfetch
8686
run: customfetch-gui --version
8787

@@ -104,7 +104,7 @@ jobs:
104104

105105
- name: Install the packages
106106
run: pacman -Syyu git sudo binutils cmake gdb base-devel fakeroot pkgconf tree fastfetch --noconfirm --needed
107-
107+
108108
- name: get /etc/sudoers
109109
run: |
110110
sed -i "s#root ALL=(ALL:ALL) ALL#root ALL=(ALL:ALL) NOPASSWD: ALL\nnobody ALL=(ALL:ALL) NOPASSWD: ALL#g" /etc/sudoers
@@ -190,14 +190,16 @@ jobs:
190190
run: brew install --overwrite fastfetch neofetch tree llvm gtkmm3
191191

192192
- name: uname -a && clang++ --version
193-
run: uname -a && echo "\n" && $(brew --prefix llvm)/bin/clang++ --version
193+
run: |
194+
printf 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"\nexport LDFLAGS="-L/opt/homebrew/opt/llvm/lib"\nexport CXXFLAGS="-isystem/opt/homebrew/opt/llvm/include"' >> /Users/runner/.bash_profile
195+
uname -a && clang++ --version
194196
195197
- name: Clean
196198
run: make distclean
197199

198200
- name: Compile and install
199201
run: |
200-
export CXX=$(brew --prefix llvm)/bin/clang++
202+
export CXX=clang++
201203
mkdir build && cd build
202204
cmake .. -DCMAKE_BUILD_TYPE=Debug -DGUI_APP=1
203205
make

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ endif()
6060
add_executable(${TARGET_NAME} ${SRC})
6161
enable_lto(${TARGET_NAME})
6262

63+
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
64+
set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS "-Wl,-rpath,${ORIGIN}/")
65+
endif()
66+
6367
# Get git info hash and branch
6468
execute_process(COMMAND ./scripts/generateVersion.sh
6569
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})

0 commit comments

Comments
 (0)