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-11-29 10:51:29 +01:00
|
|
|
add_library(slirp STATIC arp_table.c bootp.c cksum.c dnssearch.c if.c ip_icmp.c
|
|
|
|
|
ip_input.c ip_output.c mbuf.c misc.c sbuf.c slirp.c socket.c tcp_input.c
|
|
|
|
|
tcp_output.c tcp_subr.c tcp_timer.c udp.c util.c version.c)
|
2021-01-12 18:22:40 +01:00
|
|
|
|
2021-08-22 16:32:52 +06:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
2021-11-29 10:51:29 +01:00
|
|
|
target_link_libraries(slirp wsock32 iphlpapi)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(QT)
|
|
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
|
pkg_check_modules(GLIB_PKG glib-2.0)
|
|
|
|
|
if (GLIB_PKG_FOUND)
|
|
|
|
|
include_directories(${GLIB_PKG_INCLUDE_DIRS})
|
|
|
|
|
target_link_libraries(slirp glib-2.0)
|
|
|
|
|
target_compile_definitions(slirp PRIVATE TINYGLIB_USE_GLIB)
|
|
|
|
|
else()
|
|
|
|
|
message(ERROR "GLib development headers are required when compiling with Qt on Unix")
|
|
|
|
|
endif()
|
|
|
|
|
else()
|
|
|
|
|
target_sources(slirp PRIVATE tinyglib.c)
|
|
|
|
|
endif()
|
|
|
|
|
else()
|
|
|
|
|
target_sources(slirp PRIVATE tinyglib.c)
|
2021-08-22 16:32:52 +06:00
|
|
|
endif()
|