Skip to content

Commit ff2fe98

Browse files
szafonimateusz-mixiaoxiang781216
authored andcommitted
cmake: add support for PCI
PCI framework can be build with cmake Signed-off-by: p-szafonimateusz <[email protected]>
1 parent 53d0425 commit ff2fe98

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

drivers/pci/CMakeLists.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# ##############################################################################
2+
# drivers/pci/CMakeLists.txt
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
5+
# license agreements. See the NOTICE file distributed with this work for
6+
# additional information regarding copyright ownership. The ASF licenses this
7+
# file to you under the Apache License, Version 2.0 (the "License"); you may not
8+
# use this file except in compliance with the License. You may obtain a copy of
9+
# the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16+
# License for the specific language governing permissions and limitations under
17+
# the License.
18+
#
19+
# ##############################################################################
20+
21+
if(CONFIG_PCI)
22+
23+
set(SRCS pci.c pci_ecam.c pci_drivers.c)
24+
25+
if(CONFIG_PCI_QEMU_TEST)
26+
list(APPEND SRCS pci_qemu_test.c)
27+
endif()
28+
29+
if(CONFIG_PCI_QEMU_EDU)
30+
list(APPEND SRCS pci_qemu_edu.c)
31+
endif()
32+
33+
if(CONFIG_PCI_IVSHMEM)
34+
list(APPEND SRCS pci_ivshmem.c)
35+
endif()
36+
37+
if(CONFIG_PCI_UIO_IVSHMEM)
38+
list(APPEND SRCS pci_uio_ivshmem.c)
39+
endif()
40+
41+
target_sources(drivers PRIVATE ${SRCS})
42+
43+
endif() # CONFIG_PCI

0 commit comments

Comments
 (0)