2021-01-12 18:05:25 +01:00
|
|
|
#
|
2021-12-20 15:03:42 +01:00
|
|
|
# 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
|
|
|
# running old operating systems and software designed for IBM
|
|
|
|
|
# PC systems and compatibles from 1981 through fairly recent
|
|
|
|
|
# system designs based on the PCI bus.
|
2021-01-12 18:05:25 +01:00
|
|
|
#
|
2021-12-20 15:03:42 +01:00
|
|
|
# This file is part of the 86Box distribution.
|
2021-01-12 18:05:25 +01:00
|
|
|
#
|
2021-12-20 15:03:42 +01:00
|
|
|
# CMake build script.
|
2021-01-12 18:05:25 +01:00
|
|
|
#
|
2021-12-20 15:03:42 +01:00
|
|
|
# Authors: David Hrdlička, <hrdlickadavid@outlook.com>
|
2021-01-12 18:05:25 +01:00
|
|
|
#
|
2021-12-20 15:03:42 +01:00
|
|
|
# Copyright 2020,2021 David Hrdlička.
|
2021-01-12 18:05:25 +01:00
|
|
|
#
|
|
|
|
|
|
2021-01-12 18:22:40 +01:00
|
|
|
add_library(net OBJECT network.c net_pcap.c net_slirp.c net_dp8390.c net_3c503.c
|
2021-12-20 15:03:42 +01:00
|
|
|
net_ne2000.c net_pcnet.c net_wd8003.c net_plip.c)
|
2021-01-12 18:22:40 +01:00
|
|
|
|
2022-02-09 21:49:11 +06:00
|
|
|
if(NOT WIN32 AND NOT APPLE)
|
|
|
|
|
set(SLIRP_EXTERNAL 1)
|
|
|
|
|
else()
|
|
|
|
|
option(SLIRP_EXTERNAL "Link against the system-provided libslirp library" OFF)
|
|
|
|
|
mark_as_advanced(SLIRP_EXTERNAL)
|
|
|
|
|
endif()
|
2022-01-13 03:01:15 +01:00
|
|
|
|
|
|
|
|
if(SLIRP_EXTERNAL)
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
|
pkg_check_modules(SLIRP REQUIRED IMPORTED_TARGET slirp)
|
|
|
|
|
target_link_libraries(86Box PkgConfig::SLIRP)
|
|
|
|
|
else()
|
|
|
|
|
add_subdirectory(slirp)
|
|
|
|
|
target_link_libraries(86Box slirp)
|
2022-02-09 21:49:11 +06:00
|
|
|
endif()
|