mirror of
https://github.com/D-Modem/gui.git
synced 2026-11-28 14:19:58 -08:00
First pass: TCP and SSH. With -DDMODEM_GUI_WINPORT=ON and CLANG_RETRO_MFC set to a clang-retro MFC checkout, winport/ builds libwinport.a with the MFC Makefile, converts app.rc with res2cpp.py, and links the same Win32 sources (now listed once, in windows/sources.cmake) as dmodem-win32. The layer does not have serial ports, pipes or audio yet: winport/include and winport/src/stubs.cpp supply stand-ins that fail, to remove when the layer gets these functions. DMODEM_WINPORT blocks in the app: the settings in ~/.config/D-Modem, TCP as the default line, ~/.ssh and '/' for SSH, Unicode marks in the path view (no Wingdings), and group boxes put under the other controls (the layer's hit test stops at HTTRANSPARENT). CI builds it on Linux and macOS, and on Linux starts it in Xvfb against a test modem on the TCP port (winport/test/smoke.sh). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRRhKGCaYUyYtH7Boap
42 lines
1.4 KiB
CMake
42 lines
1.4 KiB
CMake
# D-Modem's desktop apps: the shared C core (libdmodemctl), and the
|
|
# Linux app (GTK 4 and libadwaita) when its libraries are there, or the
|
|
# Windows app with clang-retro (cmake/clang-retro.cmake), MinGW or MSVC.
|
|
# The macOS app (macos/) builds with Xcode and takes the core from here.
|
|
# With DMODEM_GUI_WINPORT, the Windows app also builds for Linux and
|
|
# macOS, over clang-retro MFC's portable Win32 layer (winport/).
|
|
cmake_minimum_required(VERSION 3.16)
|
|
project(dmodem-gui VERSION 1.0.0 LANGUAGES C)
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
|
|
|
option(DMODEM_GUI_LINUX "Build the GTK 4 app (linux/)" ON)
|
|
option(DMODEM_GUI_SSH "Build libdmodemssh (libssh) for the Remote page" ON)
|
|
option(DMODEM_GUI_WINPORT "Build the Windows app for Linux or macOS (winport/)" OFF)
|
|
set(CLANG_RETRO_MFC "" CACHE PATH "A clang-retro MFC checkout, for DMODEM_GUI_WINPORT")
|
|
|
|
add_subdirectory(core)
|
|
enable_testing()
|
|
add_subdirectory(core/test)
|
|
if(DMODEM_GUI_SSH)
|
|
add_subdirectory(ssh)
|
|
endif()
|
|
|
|
if(WIN32)
|
|
add_subdirectory(windows)
|
|
elseif(DMODEM_GUI_WINPORT)
|
|
add_subdirectory(winport)
|
|
endif()
|
|
|
|
if(DMODEM_GUI_LINUX AND UNIX AND NOT APPLE)
|
|
find_package(PkgConfig)
|
|
if(PkgConfig_FOUND)
|
|
pkg_check_modules(GTK IMPORTED_TARGET gtk4>=4.10 libadwaita-1>=1.5)
|
|
endif()
|
|
if(GTK_FOUND)
|
|
add_subdirectory(linux)
|
|
else()
|
|
message(STATUS "gtk4 or libadwaita-1 not found: the Linux app is not built")
|
|
endif()
|
|
endif()
|