Skip to content

Commit

Permalink
fix cmake build
Browse files Browse the repository at this point in the history
  • Loading branch information
joske committed Dec 20, 2023
1 parent a75bc25 commit 8046872
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cmake-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- name: Configure
run: |
export LLVM_PREFIX="$(brew --prefix llvm)"
export CC="$LLVM_PREFIX/bin/clang"
export CXX="$LLVM_PREFIX/bin/clang++"
export CPPFLAGS="-I$LLVM_PREFIX/include"
export LDFLAGS="-L$LLVM_PREFIX/lib -L$LLVM_PREFIX/lib/c++ -Wl,-rpath,$LLVM_PREFIX/lib/c++ -fuse-ld=$LLVM_PREFIX/bin/ld64.lld"
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ project("btop"
VERSION 1.2.13
DESCRIPTION "A monitor of resources"
HOMEPAGE_URL "https://github.com/aristocratos/btop"
LANGUAGES CXX
LANGUAGES C CXX
)

include(CheckCXXCompilerFlag)
Expand Down Expand Up @@ -61,7 +61,7 @@ add_executable(btop
)

if(APPLE)
target_sources(btop PRIVATE src/osx/btop_collect.cpp src/osx/sensors.cpp src/osx/smc.cpp)
target_sources(btop PRIVATE src/osx/btop_collect.cpp src/osx/sensors.cpp src/osx/smc.cpp src/osx/CpuFreq.c)
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_sources(btop PRIVATE src/freebsd/btop_collect.cpp)
elseif(LINUX)
Expand Down Expand Up @@ -165,6 +165,7 @@ endif()
if(APPLE)
target_link_libraries(btop
$<LINK_LIBRARY:FRAMEWORK,CoreFoundation> $<LINK_LIBRARY:FRAMEWORK,IOKit>
IOReport
)
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
# Avoid version mismatch for libstdc++ when a specific version of GCC is installed and not the
Expand Down

0 comments on commit 8046872

Please sign in to comment.