|
|
|
@ -120,6 +120,14 @@ endif() |
|
|
|
# uTun core library (C, built from ../src/ and ../lib/) |
|
|
|
# uTun core library (C, built from ../src/ and ../lib/) |
|
|
|
add_subdirectory(libutun) |
|
|
|
add_subdirectory(libutun) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_library(chatgui_notifications STATIC src/message_notification.cpp src/user_activity_monitor.cpp) |
|
|
|
|
|
|
|
target_link_libraries(chatgui_notifications PUBLIC ${QT_PACKAGE}::Widgets PRIVATE utun) |
|
|
|
|
|
|
|
if(WIN32) |
|
|
|
|
|
|
|
target_link_libraries(chatgui_notifications PRIVATE user32) |
|
|
|
|
|
|
|
elseif(APPLE) |
|
|
|
|
|
|
|
target_link_libraries(chatgui_notifications PRIVATE "-framework ApplicationServices") |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
# Голосовой стек звонка (SoundTouch + voice_jitter + call_audio + call_tones), |
|
|
|
# Голосовой стек звонка (SoundTouch + voice_jitter + call_audio + call_tones), |
|
|
|
# C++ внутри, C-интерфейс наружу (call_audio.h). |
|
|
|
# C++ внутри, C-интерфейс наружу (call_audio.h). |
|
|
|
set(LIB_DIR "${CMAKE_SOURCE_DIR}/../../lib") |
|
|
|
set(LIB_DIR "${CMAKE_SOURCE_DIR}/../../lib") |
|
|
|
@ -239,8 +247,33 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
|
|
|
target_compile_definitions(vibechat PRIVATE UTUN_PTT_PORTAL) |
|
|
|
target_compile_definitions(vibechat PRIVATE UTUN_PTT_PORTAL) |
|
|
|
target_link_libraries(vibechat PRIVATE ${QT_DBUS}) |
|
|
|
target_link_libraries(vibechat PRIVATE ${QT_DBUS}) |
|
|
|
target_include_directories(vibechat PRIVATE ${X11_INCLUDE_DIR}) |
|
|
|
target_include_directories(vibechat PRIVATE ${X11_INCLUDE_DIR}) |
|
|
|
|
|
|
|
target_compile_definitions(chatgui_notifications PRIVATE UTUN_ACTIVITY_DBUS) |
|
|
|
|
|
|
|
target_link_libraries(chatgui_notifications PRIVATE ${QT_DBUS}) |
|
|
|
|
|
|
|
if(Qt6_FOUND) |
|
|
|
|
|
|
|
find_package(KF6IdleTime QUIET) |
|
|
|
|
|
|
|
set(ACTIVITY_KIDLETIME_TARGET KF6::IdleTime) |
|
|
|
|
|
|
|
else() |
|
|
|
|
|
|
|
find_package(KF5IdleTime QUIET) |
|
|
|
|
|
|
|
set(ACTIVITY_KIDLETIME_TARGET KF5::IdleTime) |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
if(TARGET ${ACTIVITY_KIDLETIME_TARGET}) |
|
|
|
|
|
|
|
target_compile_definitions(chatgui_notifications PRIVATE UTUN_ACTIVITY_KIDLETIME) |
|
|
|
|
|
|
|
target_link_libraries(chatgui_notifications PRIVATE ${ACTIVITY_KIDLETIME_TARGET}) |
|
|
|
|
|
|
|
else() |
|
|
|
|
|
|
|
message(STATUS "KIdleTime not found: Wayland activity uses GNOME IdleMonitor or ChatGUI input") |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
elseif(UNIX AND NOT APPLE) |
|
|
|
|
|
|
|
find_package(X11 QUIET) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(TARGET X11::Xss) |
|
|
|
|
|
|
|
target_compile_definitions(chatgui_notifications PRIVATE UTUN_ACTIVITY_X11) |
|
|
|
|
|
|
|
target_link_libraries(chatgui_notifications PRIVATE X11::Xss) |
|
|
|
|
|
|
|
elseif(UNIX AND NOT APPLE) |
|
|
|
|
|
|
|
message(STATUS "X11 screen saver library not found: X11 activity uses ChatGUI input") |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
target_link_libraries(vibechat PRIVATE chatgui_notifications) |
|
|
|
|
|
|
|
|
|
|
|
if(WIN32) |
|
|
|
if(WIN32) |
|
|
|
target_link_libraries(vibechat PRIVATE ${QT_LIBS} rlottie::rlottie ZLIB::ZLIB OpenSSL::Crypto ZXing::ZXing utun utun_voice pthread user32 ${FFMPEG_TARGET} ${FFMPEG_LIBRARIES}) |
|
|
|
target_link_libraries(vibechat PRIVATE ${QT_LIBS} rlottie::rlottie ZLIB::ZLIB OpenSSL::Crypto ZXing::ZXing utun utun_voice pthread user32 ${FFMPEG_TARGET} ${FFMPEG_LIBRARIES}) |
|
|
|
else() |
|
|
|
else() |
|
|
|
@ -273,6 +306,11 @@ endif() |
|
|
|
|
|
|
|
|
|
|
|
enable_testing() |
|
|
|
enable_testing() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_executable(test_message_notification tests/test_message_notification.cpp) |
|
|
|
|
|
|
|
target_link_libraries(test_message_notification PRIVATE chatgui_notifications ${QT_TEST_LIB} pthread ${CMAKE_DL_LIBS}) |
|
|
|
|
|
|
|
add_test(NAME test_message_notification COMMAND test_message_notification) |
|
|
|
|
|
|
|
set_tests_properties(test_message_notification PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" TIMEOUT 60) |
|
|
|
|
|
|
|
|
|
|
|
add_executable(test_file_drop tests/test_file_drop.cpp src/inputbar.cpp src/audiorecorder.cpp src/audio_device.cpp src/sound_manager.cpp |
|
|
|
add_executable(test_file_drop tests/test_file_drop.cpp src/inputbar.cpp src/audiorecorder.cpp src/audio_device.cpp src/sound_manager.cpp |
|
|
|
src/voicemessageencoder.cpp src/emojipanel.cpp src/emojitabbar.cpp src/emoji.cpp src/animtimer.cpp src/lottieicon.cpp |
|
|
|
src/voicemessageencoder.cpp src/emojipanel.cpp src/emojitabbar.cpp src/emoji.cpp src/animtimer.cpp src/lottieicon.cpp |
|
|
|
src/voice_audio_io.cpp transport/miniaudio_impl.c transport/audio_diagnostics.cpp) |
|
|
|
src/voice_audio_io.cpp transport/miniaudio_impl.c transport/audio_diagnostics.cpp) |
|
|
|
|