Add options to discover munt and slirp locally

This commit is contained in:
David Hrdlička
2022-01-13 03:01:15 +01:00
parent 7d7826d7a5
commit 3305063f55
3 changed files with 23 additions and 5 deletions

View File

@@ -16,5 +16,14 @@
add_library(net OBJECT network.c net_pcap.c net_slirp.c net_dp8390.c net_3c503.c
net_ne2000.c net_pcnet.c net_wd8003.c net_plip.c)
add_subdirectory(slirp)
target_link_libraries(86Box slirp)
option(SLIRP_EXTERNAL "Link against the system-provided libslirp library" OFF)
mark_as_advanced(SLIRP_EXTERNAL)
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)
endif()