Files
gui/cmake/haiku.cmake
T
Neo-DesktopandClaude Opus 5.5 35d66c85e9 Build the app for Haiku (x86_64)
The Windows app now builds for Haiku over the new Haiku backend of
clang-retro MFC (clang-retro/mfc#176), cross-built on Linux with D-Modem's
Haiku toolchain file and sysroot script.

- cmake/haiku.cmake: the toolchain file. It includes D-Modem's and
  keeps the CMAKE_FIND_ROOT_PATH of the command line, so that libssh
  finds the bundled mbedTLS.
- winport/CMakeLists.txt: the Haiku target and its libraries (libbe,
  libdevice, libnetwork, libbsd).
- ssh/: libssh links libnetwork and libbsd on Haiku, has getaddrinfo,
  and skips the termios values that Haiku does not have.
- Look for a modem (windows/src/ports.cpp, ports_haiku.cpp): lists
  /dev/ports, names the usbN ports from the USB Kit, finds the CDC-ACM
  modems, and tells that Haiku has no driver for the MultiTech
  MT9234MU.
- CI: the winport-haiku job builds the app and uploads
  dmodem-win32-haiku-x86_64.tar.gz; the nightly release takes it.
- docs/haiku.md, and short notes in the README, building.md and
  download.md.

Tested on Haiku R1/beta6 in QEMU: the menus, the pages, the dialogs,
modal dialogs, the keyboard, moving the window, and Look for a modem
with the computer's serial port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTJUdomcnCN8okhJSr
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
2026-11-28 20:11:33 +00:00

21 lines
1.1 KiB
CMake

# haiku.cmake - the toolchain file for the app on Haiku (x86_64), built
# on Linux with Clang and lld. It is the toolchain file of D-Modem
# (external/D-Modem/platforms/haiku/haiku.cmake), which the modem in the
# app uses too.
#
# python3 external/D-Modem/platforms/haiku/haiku_sysroot.py haiku-sysroot
# cmake -S . -B build/haiku -G Ninja -DCMAKE_BUILD_TYPE=Release \
# -DCMAKE_TOOLCHAIN_FILE=cmake/haiku.cmake -DHAIKU_SYSROOT=$PWD/haiku-sysroot \
# -DDMODEM_GUI_WINPORT=ON -DCLANG_RETRO_MFC=/path/to/mfc
#
# Refer to docs/haiku.md.
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../external/D-Modem/platforms/haiku/haiku.cmake")
message(FATAL_ERROR "cmake/haiku.cmake: no external/D-Modem (git submodule update --init)")
endif()
# (the roots that a project gives, as libssh's build gets the prefix of
# mbedTLS, stay with the sysroot, which D-Modem's file sets)
set(_dmodem_find_roots ${CMAKE_FIND_ROOT_PATH})
include("${CMAKE_CURRENT_LIST_DIR}/../external/D-Modem/platforms/haiku/haiku.cmake")
list(APPEND CMAKE_FIND_ROOT_PATH ${_dmodem_find_roots})
list(REMOVE_DUPLICATES CMAKE_FIND_ROOT_PATH)