mirror of
https://github.com/86Box/86Box.git
synced 2025-01-23 17:52:01 -05:00
Disable tinyglib for Qt builds on Linux/BSD
This commit is contained in:
parent
9687d17d6b
commit
47211f43e9
1 changed files with 9 additions and 4 deletions
|
@ -21,14 +21,19 @@ if(WIN32)
|
|||
target_link_libraries(slirp wsock32 iphlpapi)
|
||||
endif()
|
||||
|
||||
option(SLIRP_GLIB "Use GLib proper with SLiRP" OFF)
|
||||
# tinyglib conflicts with the real GLib used by Qt, let's just be safe
|
||||
if(QT AND UNIX AND NOT APPLE)
|
||||
set(SLIRP_TINYGLIB OFF)
|
||||
endif()
|
||||
|
||||
if(SLIRP_GLIB)
|
||||
option(SLIRP_TINYGLIB "Use a minimal GLib stub (`tinyglib`) with SLiRP" ON)
|
||||
|
||||
if(SLIRP_TINYGLIB)
|
||||
target_sources(slirp PRIVATE tinyglib.c)
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
||||
target_link_libraries(slirp PkgConfig::GLIB)
|
||||
|
||||
target_compile_definitions(slirp PRIVATE TINYGLIB_USE_GLIB)
|
||||
else()
|
||||
target_sources(slirp PRIVATE tinyglib.c)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Reference in a new issue