build: add Open Watcom support for DOS utilities
This commit is contained in:
@@ -65,6 +65,8 @@ option(ENABLE_DEBUG_DOSUTILS "Should we build with Mars Nwe Dosutils Debugging?"
|
||||
option(ENABLE_INTERNAL_RIP_SAP "Should we build Mars Nwe with Internal Router?" ON)
|
||||
option(ENABLE_SHADOW_PWD "Should we build Mars Nwe with Shadow Password Support?" ON)
|
||||
option(ENABLE_QUOTA_SUPPORT "Should we build Mars Nwe with Quota Support?" OFF)
|
||||
option(MARS_NWE_INSTALL_DOSUTILS "Install prebuilt DOS client utilities" ON)
|
||||
option(MARS_NWE_BUILD_DOSUTILS "Build DOS client utilities with Open Watcom" OFF)
|
||||
|
||||
set(MARS_NWE_SMART_ADMIN_GROUP "root" CACHE STRING "Unix group allowed to log in to the SMArT/nwwebui admin interface")
|
||||
|
||||
|
||||
86
cmake/modules/FindOpenWatcom.cmake
Normal file
86
cmake/modules/FindOpenWatcom.cmake
Normal file
@@ -0,0 +1,86 @@
|
||||
# FindOpenWatcom.cmake
|
||||
#
|
||||
# Locate an Open Watcom v2 toolchain usable for building the 16-bit DOS
|
||||
# mars-nwe DOS utilities on a Linux host.
|
||||
#
|
||||
# Result variables:
|
||||
# OpenWatcom_FOUND
|
||||
# OPENWATCOM_WCL
|
||||
# OPENWATCOM_WCC
|
||||
# OPENWATCOM_WASM
|
||||
# OPENWATCOM_WLINK
|
||||
# OPENWATCOM_BIN_DIR
|
||||
# OPENWATCOM_ROOT
|
||||
# OPENWATCOM_ENV
|
||||
#
|
||||
# This module intentionally does not enable a CMake language/toolchain. The
|
||||
# DOS utilities are built via custom commands. OPENWATCOM_ENV is provided so
|
||||
# wcl can find its helper programs such as wcc, wlink and include files.
|
||||
|
||||
set(_OPENWATCOM_HINTS)
|
||||
|
||||
if(DEFINED ENV{WATCOM})
|
||||
list(APPEND _OPENWATCOM_HINTS "$ENV{WATCOM}")
|
||||
endif()
|
||||
|
||||
list(APPEND _OPENWATCOM_HINTS
|
||||
/opt/watcom
|
||||
/usr/local/watcom
|
||||
/usr/local/open-watcom-v2
|
||||
/opt/open-watcom-v2
|
||||
)
|
||||
|
||||
find_program(OPENWATCOM_WCL
|
||||
NAMES wcl owcc
|
||||
HINTS ${_OPENWATCOM_HINTS}
|
||||
PATH_SUFFIXES binl binnt binw bin
|
||||
)
|
||||
|
||||
find_program(OPENWATCOM_WCC
|
||||
NAMES wcc
|
||||
HINTS ${_OPENWATCOM_HINTS}
|
||||
PATH_SUFFIXES binl binnt binw bin
|
||||
)
|
||||
|
||||
find_program(OPENWATCOM_WASM
|
||||
NAMES wasm
|
||||
HINTS ${_OPENWATCOM_HINTS}
|
||||
PATH_SUFFIXES binl binnt binw bin
|
||||
)
|
||||
|
||||
find_program(OPENWATCOM_WLINK
|
||||
NAMES wlink
|
||||
HINTS ${_OPENWATCOM_HINTS}
|
||||
PATH_SUFFIXES binl binnt binw bin
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenWatcom
|
||||
REQUIRED_VARS
|
||||
OPENWATCOM_WCL
|
||||
OPENWATCOM_WCC
|
||||
OPENWATCOM_WASM
|
||||
OPENWATCOM_WLINK
|
||||
)
|
||||
|
||||
if(OpenWatcom_FOUND)
|
||||
get_filename_component(OPENWATCOM_BIN_DIR "${OPENWATCOM_WCL}" DIRECTORY)
|
||||
get_filename_component(OPENWATCOM_ROOT "${OPENWATCOM_BIN_DIR}" DIRECTORY)
|
||||
|
||||
# wcl starts helper tools such as wcc/wlink by name. Therefore finding the
|
||||
# absolute wcl path is not enough; the Watcom bin directory must be in PATH
|
||||
# at build time. WATCOM and INCLUDE are also expected by many installations.
|
||||
set(OPENWATCOM_ENV
|
||||
"WATCOM=${OPENWATCOM_ROOT}"
|
||||
"INCLUDE=${OPENWATCOM_ROOT}/h:${OPENWATCOM_ROOT}/h/nt:${OPENWATCOM_ROOT}/h/os2"
|
||||
"EDPATH=${OPENWATCOM_ROOT}/eddat"
|
||||
"PATH=${OPENWATCOM_BIN_DIR}:$ENV{PATH}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
OPENWATCOM_WCL
|
||||
OPENWATCOM_WCC
|
||||
OPENWATCOM_WASM
|
||||
OPENWATCOM_WLINK
|
||||
)
|
||||
2
dosutils
2
dosutils
Submodule dosutils updated: 0e42d3a85b...c64a20acac
2
smart
2
smart
Submodule smart updated: 46a3d9f653...d967947ece
Reference in New Issue
Block a user