File tree 7 files changed +119
-1
lines changed
7 files changed +119
-1
lines changed Original file line number Diff line number Diff line change @@ -112,3 +112,20 @@ jobs:
112
112
with :
113
113
name : binary-archive
114
114
path : build/package
115
+
116
+ dos :
117
+ timeout-minutes : 10
118
+ runs-on : ubuntu-latest
119
+
120
+ steps :
121
+ - uses : open-watcom/setup-watcom@v0
122
+ with :
123
+ version : " 2.0"
124
+
125
+ - uses : actions/checkout@v2
126
+
127
+ - name : Configure
128
+ run : cmake -Bbuild --toolchain cmake/dos.cmake
129
+
130
+ - name : Build
131
+ run : cmake --build build
Original file line number Diff line number Diff line change @@ -72,6 +72,9 @@ elseif(WIN32)
72
72
target_sources (pdcurses PRIVATE wincon/pdcclip.c wincon/pdcdisp.c wincon/pdcgetsc.c
73
73
wincon/pdckbd.c wincon/pdcscrn.c wincon/pdcsetsc.c wincon/pdcutil.c wincon/pdcwin.h
74
74
)
75
+ elseif (CMAKE_SYSTEM_NAME STREQUAL "DOS" )
76
+ target_sources (pdcurses PRIVATE dos/pdcclip.c dos/pdcdisp.c dos/pdcgetsc.c
77
+ dos/pdckbd.c dos/pdcscrn.c dos/pdcsetsc.c dos/pdcutil.c)
75
78
else ()
76
79
check_include_file("DECkeySym.h" HAVE_DECKEYSYM_H)
77
80
check_include_file("Sunkeysym.h" HAVE_SUNKEYSYM_H)
Original file line number Diff line number Diff line change @@ -9,4 +9,14 @@ $<$<BOOL:${HAVE_VSSCANF}>:HAVE_VSSCANF>
9
9
)
10
10
11
11
# --- compiler options
12
- add_compile_options (-Wall)
12
+
13
+ if (CMAKE_C_COMPILER_ID STREQUAL OpenWatcom)
14
+ message (STATUS "OpenWatcom: $ENV{WATCOM}
15
+ Host: ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_VERSION}
16
+ Target: ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}
17
+ " )
18
+ # https://wiki.archlinux.org/title/Open_Watcom
19
+ add_compile_options (-bt=dos -bcl=dos)
20
+ else ()
21
+ add_compile_options (-Wall)
22
+ endif ()
Original file line number Diff line number Diff line change
1
+ set (CMAKE_SYSTEM_NAME DOS)
2
+ set (CMAKE_GENERATOR "Watcom WMake" )
3
+
4
+ if (NOT DEFINED ENV{WATCOM})
5
+ if (WIN32 )
6
+ set (scr ${CMAKE_CURRENT_LIST_DIR} /dos.ps1)
7
+ else ()
8
+ set (scr ${CMAKE_CURRENT_LIST_DIR} /dos.sh)
9
+ endif ()
10
+ message (FATAL_ERROR "WATCOM environment variable not set. Try running ${scr} first." )
11
+ endif ()
12
+
13
+ file (TO_CMAKE_PATH "$ENV{WATCOM} " watcom_root)
14
+
15
+ set (CMAKE_SYSROOT ${watcom_root} )
16
+
17
+ if (WIN32 )
18
+ set (bin ${watcom_root} /binnt64 ${watcom_root} /binnt)
19
+ else ()
20
+ set (bin ${watcom_root} /binl64 ${watcom_root} /binl)
21
+ endif ()
22
+
23
+ find_program (CMAKE_C_COMPILER
24
+ NAMES wcl386
25
+ HINTS ${bin}
26
+ NO_DEFAULT_PATH
27
+ REQUIRED
28
+ )
Original file line number Diff line number Diff line change
1
+ $watcom = " $Env: SYSTEMDRIVE :\WATCOM"
2
+
3
+ if (! (Test-Path - Path $watcom )) {
4
+ Throw " OpenWatcom not found at $watcom "
5
+ }
6
+
7
+ $env: WATCOM = $watcom
8
+ $env: EDPATH = " $watcom \EDDAT"
9
+ $env: WHTMLHELP = " $watcom \BINNT\HELP"
10
+ $env: WIPFC = " $watcom \WIPFC"
11
+
12
+ $env: LIBPATH = " $watcom \lib386\"
13
+ $env: INCLUDE = " $watcom \H"
14
+
15
+ $env: Path += " ;$watcom \BINNT64;$watcom \BINNT"
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ watcom=" /opt/watcom/"
4
+
5
+ if [ ! -d $watcom ]; then
6
+ echo " OpenWatcom not found at $watcom " >&2
7
+ exit 1
8
+ fi
9
+
10
+ export WATCOM=$watcom
11
+ export EDPATH=" $watcom /eddat"
12
+ export WIPFC=" $watcom /wipfc"
13
+
14
+ export INCLUDE=" $watcom /h"
15
+ export PATH=" $watcom /binl64:$watcom /binl:$PATH "
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ if(PKG_CONFIG_FOUND)
8
8
9
9
pkg_check_modules(_xt xt)
10
10
pkg_check_modules(_x11 x11)
11
+ pkg_check_modules(_xmu xmu)
12
+ pkg_check_modules(_xpm xpm)
13
+ pkg_check_modules(_xaw xaw7)
11
14
12
15
endif ()
13
16
@@ -27,8 +30,35 @@ PATH_SUFFIXES X11
27
30
REQUIRED
28
31
)
29
32
33
+ # macOS may need this
34
+ find_path (_xmu_inc
35
+ NAMES StdSel.h
36
+ HINTS ${_xmu_INCLUDE_DIRS} ${X11_INCLUDE_DIR}
37
+ PATH_SUFFIXES X11/Xmu
38
+ REQUIRED
39
+ )
40
+
41
+ # macOS may need this
42
+ find_path (_xpm_inc
43
+ NAMES xpm.h
44
+ HINTS ${_xpm_INCLUDE_DIRS} ${X11_INCLUDE_DIR}
45
+ PATH_SUFFIXES X11
46
+ REQUIRED
47
+ )
48
+
49
+ # macOS may need this
50
+ find_path (_xaw_inc
51
+ NAMES Box.h
52
+ HINTS ${_xaw_INCLUDE_DIRS} ${X11_INCLUDE_DIR}
53
+ PATH_SUFFIXES X11/Xaw
54
+ REQUIRED
55
+ )
56
+
30
57
list (APPEND X11_INCLUDE_DIR
31
58
${_xt_inc} ${_xatom_inc}
59
+ ${_xmu_inc} ${_xmu_inc} /..
60
+ ${_xpm_inc}
61
+ ${_xaw_inc} ${_xaw_inc} /..
32
62
)
33
63
34
64
message (STATUS "X11_INCLUDE_DIR: ${X11_INCLUDE_DIR}
You can’t perform that action at this time.
0 commit comments