| 1 |
add_library(uicommon |
| 2 |
AutoUpdate.cpp |
| 3 |
AutoUpdate.h |
| 4 |
CommandLineParse.cpp |
| 5 |
CommandLineParse.h |
| 6 |
DiscordPresence.cpp |
| 7 |
DiscordPresence.h |
| 8 |
GameFile.cpp |
| 9 |
GameFile.h |
| 10 |
GameFileCache.cpp |
| 11 |
GameFileCache.h |
| 12 |
NetPlayIndex.cpp |
| 13 |
NetPlayIndex.h |
| 14 |
ResourcePack/Manager.cpp |
| 15 |
ResourcePack/Manager.h |
| 16 |
ResourcePack/Manifest.cpp |
| 17 |
ResourcePack/Manifest.h |
| 18 |
ResourcePack/ResourcePack.cpp |
| 19 |
ResourcePack/ResourcePack.h |
| 20 |
UICommon.cpp |
| 21 |
UICommon.h |
| 22 |
) |
| 23 |
|
| 24 |
target_link_libraries(uicommon |
| 25 |
PUBLIC |
| 26 |
common |
| 27 |
core |
| 28 |
cpp-optparse |
| 29 |
MINIZIP::minizip-ng |
| 30 |
pugixml |
| 31 |
|
| 32 |
PRIVATE |
| 33 |
fmt::fmt |
| 34 |
$<$<BOOL:APPLE>:${IOK_LIBRARY}> |
| 35 |
) |
| 36 |
|
| 37 |
if ((DEFINED CMAKE_ANDROID_ARCH_ABI AND CMAKE_ANDROID_ARCH_ABI MATCHES "x86|x86_64") OR |
| 38 |
(NOT DEFINED CMAKE_ANDROID_ARCH_ABI AND _M_X86_64)) |
| 39 |
target_link_libraries(uicommon PRIVATE bdisasm) |
| 40 |
endif() |
| 41 |
|
| 42 |
if(UNIX AND NOT APPLE AND NOT ANDROID AND ENABLE_QT) |
| 43 |
find_package(Qt6 REQUIRED COMPONENTS DBus) |
| 44 |
target_sources(uicommon PRIVATE DBusUtils.cpp) |
| 45 |
target_compile_definitions(uicommon PRIVATE -DHAVE_QTDBUS=1) |
| 46 |
target_link_libraries(uicommon PUBLIC Qt6::DBus) |
| 47 |
endif() |
| 48 |
|
| 49 |
if(X11_FOUND) |
| 50 |
target_sources(uicommon PRIVATE X11Utils.cpp) |
| 51 |
target_link_libraries(uicommon PUBLIC PkgConfig::XRANDR PkgConfig::X11) |
| 52 |
endif() |
| 53 |
|
| 54 |
if(TARGET LibUSB::LibUSB) |
| 55 |
target_link_libraries(uicommon PRIVATE LibUSB::LibUSB) |
| 56 |
endif() |
| 57 |
|
| 58 |
if(USE_DISCORD_PRESENCE) |
| 59 |
target_compile_definitions(uicommon PRIVATE -DUSE_DISCORD_PRESENCE) |
| 60 |
target_link_libraries(uicommon PRIVATE discord-rpc) |
| 61 |
endif() |
| 62 |
|
| 63 |
if(MSVC) |
| 64 |
# Add precompiled header |
| 65 |
target_link_libraries(uicommon PRIVATE use_pch) |
| 66 |
endif() |