Warning, /plasma/kinfocenter/Modules/pci/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-License-Identifier: BSD-3-Clause 0002 # SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org> 0003 0004 # Linux has lcpci; effectively it's always there, but it's a runtime 0005 # dependency anyway so we don't need to fail on it. `lspci -v` shows 0006 # a verbose PCI tree. 0007 # 0008 # FreeBSD has pciconf in base; that means that it will always 0009 # be there, so the `find_package()` is there mostly to demonstrate that 0010 # we're looking for it (and not for lspci). `pciconf -lv` shows a verbose 0011 # PCI tree. 0012 if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") 0013 find_package(pciconf) 0014 set_package_properties(pciconf PROPERTIES TYPE RUNTIME) 0015 0016 set(PCI_BACKEND pciconf) 0017 set(PCI_BACKEND_ARGUMENTS "-lv") 0018 else() 0019 find_package(lspci) 0020 set_package_properties(lspci PROPERTIES TYPE RUNTIME) 0021 0022 set(PCI_BACKEND lspci) 0023 set(PCI_BACKEND_ARGUMENTS "-v") 0024 endif() 0025 0026 configure_file(kcm_pci.json.cmake kcm_pci.json) 0027 configure_file(backend.h.cmake backend.h) 0028 0029 add_definitions(-DTRANSLATION_DOMAIN=\"kcm_pci\") 0030 0031 kinfocenter_add_kcm(kcm_pci main.cpp) 0032 target_link_libraries(kcm_pci PRIVATE KF6::CoreAddons KF6::KCMUtilsQuick KF6::I18n KInfoCenterInternal)