mirror of
https://github.com/D-Modem/gui.git
synced 2026-11-28 14:19:58 -08:00
Remove the SwiftUI app for macOS (macos/, cmake/MacosEmbed.cmake, cmake/macos-embed/) and the GTK 4 app for Linux (linux/). The Win32 app (windows/) is now the canonical GUI on Windows, and on Linux and macOS over the portable Win32 layer of clang-retro MFC (winport/). - CMake: remove DMODEM_GUI_LINUX and the Xcode support. With no DMODEM_GUI_WINPORT, Linux and macOS build only the libraries and their tests. The built-in modem is on by default for Windows and winport. - winport: install the app, its desktop entry, AppStream data, icon and the MT9234MU firmware on Linux (firmware/ moves to the top). - CI: the "core" job keeps the library, sanitizer and sshd tests on Linux. The macOS library tests move to the winport-macos job. The linux and macos jobs and their nightly files are removed. - Docs, site and comments: describe one Win32 app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRUx6MjNXmAFKULZu3U Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
53 lines
2.0 KiB
CMake
53 lines
2.0 KiB
CMake
# libdmodemssh: D-Modem's SSH client (dmodemssh.h), on libssh 0.11.
|
|
# The system's libssh when it is 0.11 or later (and
|
|
# -DDMODEM_SSH_BUNDLED=OFF), else libssh and mbedTLS built here from
|
|
# their release tarballs: always for the app on Windows and macOS, which
|
|
# ships no libraries of the system's.
|
|
if(WIN32 OR APPLE)
|
|
set(_bundled ON)
|
|
else()
|
|
set(_bundled AUTO)
|
|
endif()
|
|
set(DMODEM_SSH_BUNDLED ${_bundled} CACHE STRING "Build libssh and mbedTLS from source (ON, OFF, AUTO: when the system's is older than 0.11)")
|
|
|
|
if(NOT DMODEM_SSH_BUNDLED STREQUAL "ON")
|
|
find_package(PkgConfig)
|
|
if(PkgConfig_FOUND)
|
|
pkg_check_modules(LIBSSH IMPORTED_TARGET libssh>=0.11)
|
|
endif()
|
|
endif()
|
|
if(LIBSSH_FOUND)
|
|
add_library(dmodem_libssh INTERFACE)
|
|
target_link_libraries(dmodem_libssh INTERFACE PkgConfig::LIBSSH)
|
|
elseif(DMODEM_SSH_BUNDLED STREQUAL "OFF")
|
|
message(FATAL_ERROR "libssh 0.11 or later not found (or -DDMODEM_SSH_BUNDLED=AUTO)")
|
|
else()
|
|
include(${CMAKE_CURRENT_LIST_DIR}/cmake/BundledLibssh.cmake)
|
|
endif()
|
|
|
|
add_library(dmodemssh STATIC src/dmodemssh.c src/ppk.c src/agent.c)
|
|
# (the Windows 95 build, and the Windows 98 SE and ME builds of the app
|
|
# with the modem built in: a gai_strerrorA with no Unicode call)
|
|
if(CLANG_RETRO_CONFIG MATCHES "picolibc|^win98|^winme")
|
|
target_sources(dmodemssh PRIVATE src/gai_strerror.c)
|
|
endif()
|
|
target_include_directories(dmodemssh PUBLIC include)
|
|
target_link_libraries(dmodemssh PUBLIC dmodem_libssh)
|
|
if(WIN32)
|
|
target_link_libraries(dmodemssh PUBLIC ws2_32 user32 advapi32)
|
|
elseif(UNIX)
|
|
find_package(Threads REQUIRED)
|
|
target_link_libraries(dmodemssh PUBLIC Threads::Threads)
|
|
endif()
|
|
if(MSVC)
|
|
target_compile_options(dmodemssh PRIVATE /W4 /wd4996)
|
|
else()
|
|
target_compile_options(dmodemssh PRIVATE -Wall -Wextra -Wshadow)
|
|
endif()
|
|
|
|
add_executable(dmodemssh_test test/dmodemssh_test.c)
|
|
target_link_libraries(dmodemssh_test PRIVATE dmodemssh)
|
|
# (Argon2 is tested too: ppk.h)
|
|
target_include_directories(dmodemssh_test PRIVATE src)
|
|
add_test(NAME dmodemssh COMMAND dmodemssh_test)
|