mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-15 18:03:06 +12:00
Move calls to find_package to where they're required
This commit is contained in:
parent
ed0fa34a9d
commit
ebbb769a6a
|
@ -43,14 +43,6 @@ if(BTOP_STATIC)
|
|||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
find_package(devstat REQUIRED)
|
||||
find_package(kvm REQUIRED)
|
||||
if(BTOP_STATIC)
|
||||
find_package(elf REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(CheckIPOSupported)
|
||||
|
||||
|
@ -153,8 +145,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|||
target_link_libraries(btop PRIVATE $<LINK_LIBRARY:FRAMEWORK,CoreFoundation)
|
||||
target_link_libraries(btop PRIVATE $<LINK_LIBRARY:FRAMEWORK,IOKit)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
find_package(devstat REQUIRED)
|
||||
find_package(kvm REQUIRED)
|
||||
target_link_libraries(btop PRIVATE devstat::devstat kvm::kvm)
|
||||
if(BTOP_STATIC)
|
||||
find_package(elf REQUIRED)
|
||||
target_link_libraries(btop PRIVATE elf::elf)
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue