| 1 |
option(WITH_ADVSYS "Enable the advsys interpreter" ON) |
| 2 |
option(WITH_AGILITY "Enable the agility interpreter" ON) |
| 3 |
option(WITH_ALAN2 "Enable the alan2 interpreter" ON) |
| 4 |
option(WITH_ALAN3 "Enable the alan3 interpreter" ON) |
| 5 |
option(WITH_BOCFEL "Enable the bocfel interpreter" ON) |
| 6 |
option(WITH_GIT "Enable the git interpreter" ON) |
| 7 |
option(WITH_GLULXE "Enable the glulxe interpreter" ON) |
| 8 |
option(WITH_HUGO "Enable the hugo interpreter" ON) |
| 9 |
option(WITH_JACL "Enable the jacl interpreter" ON) |
| 10 |
option(WITH_LEVEL9 "Enable the level9 interpreter" ON) |
| 11 |
option(WITH_MAGNETIC "Enable the magnetic interpreter" ON) |
| 12 |
option(WITH_PLUS "Enable the plus interpreter" ON) |
| 13 |
option(WITH_SCARE "Enable the scare interpreter" ON) |
| 14 |
option(WITH_SCOTT "Enable the scott interpreter" ON) |
| 15 |
option(WITH_TADS "Enable the tads interpreter" ON) |
| 16 |
option(WITH_TAYLOR "Enable the taylor interpreter" ON) |
| 17 |
|
| 18 |
function(terp target) |
| 19 |
set(options POSIX LTO MATH WARNINGS GPL2) |
| 20 |
set(oneval CXXSTD) |
| 21 |
set(multival SRCS INCLUDE_DIRS MACROS LIBS) |
| 22 |
cmake_parse_arguments(TERP "${options}" "${oneval}" "${multival}" ${ARGN}) |
| 23 |
|
| 24 |
add_executable(${target} WIN32 ${TERP_SRCS}) |
| 25 |
set_target_properties(${target} PROPERTIES OUTPUT_NAME "${GARGLKPRE}${target}") |
| 26 |
target_compile_definitions(${target} PRIVATE GARGLK ${TERP_MACROS}) |
| 27 |
target_include_directories(${target} PRIVATE ${TERP_INCLUDE_DIRS}) |
| 28 |
target_link_libraries(${target} PRIVATE garglkmain ${TERP_LIBS}) |
| 29 |
|
| 30 |
if(TERP_GPL2) |
| 31 |
target_link_libraries(${target} PRIVATE garglk-gpl2) |
| 32 |
else() |
| 33 |
target_link_libraries(${target} PRIVATE garglk) |
| 34 |
endif() |
| 35 |
|
| 36 |
if(WIN32) |
| 37 |
target_sources(${target} PRIVATE "${PROJECT_SOURCE_DIR}/garglk/icons.rc" "${PROJECT_SOURCE_DIR}/terps/garglk.manifest") |
| 38 |
endif() |
| 39 |
|
| 40 |
if(NOT TERP_CXXSTD) |
| 41 |
set(TERP_CXXSTD 98) |
| 42 |
endif() |
| 43 |
|
| 44 |
c_standard(${target} 11) |
| 45 |
cxx_standard(${target} ${TERP_CXXSTD}) |
| 46 |
|
| 47 |
if(TERP_POSIX) |
| 48 |
target_compile_definitions(${target} PRIVATE $<$<COMPILE_LANGUAGE:C>:_XOPEN_SOURCE=600>) |
| 49 |
endif() |
| 50 |
if(TERP_LTO) |
| 51 |
lto(${target}) |
| 52 |
endif() |
| 53 |
if(TERP_MATH AND NOT MSVC) |
| 54 |
target_link_libraries(${target} PRIVATE m) |
| 55 |
endif() |
| 56 |
if(TERP_WARNINGS) |
| 57 |
warnings(${target}) |
| 58 |
endif() |
| 59 |
if(DIST_INSTALL) |
| 60 |
install(TARGETS ${target} DESTINATION "${PROJECT_SOURCE_DIR}/build/dist") |
| 61 |
elseif(UNIX) |
| 62 |
install(TARGETS ${target} DESTINATION "${INTERPRETER_INSTALL_DIR}") |
| 63 |
endif() |
| 64 |
endfunction() |
| 65 |
|
| 66 |
# Ideally CMake would allow multiple identical calls to add_subdirectory, but it |
| 67 |
# doesn't, so ensure they're called only once, if needed. |
| 68 |
if(WITH_PLUS OR WITH_SCOTT OR WITH_TAYLOR) |
| 69 |
add_subdirectory(c64diskimage) |
| 70 |
endif() |
| 71 |
|
| 72 |
if(WITH_SCOTT OR WITH_TAYLOR) |
| 73 |
add_subdirectory(unp64) |
| 74 |
endif() |
| 75 |
|
| 76 |
if(CMAKE_VERSION VERSION_LESS "3.20") |
| 77 |
include(TestBigEndian) |
| 78 |
test_big_endian(GARGLK_BIG_ENDIAN) |
| 79 |
else() |
| 80 |
if(CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN") |
| 81 |
set(GARGLK_BIG_ENDIAN ON) |
| 82 |
endif() |
| 83 |
endif() |
| 84 |
|
| 85 |
# ------------------------------------------------------------------------------ |
| 86 |
# |
| 87 |
# AdvSys 1.2 + ANSI + NewParser + parts of glkize |
| 88 |
# |
| 89 |
if(WITH_ADVSYS) |
| 90 |
terp(advsys |
| 91 |
SRCS advsys/advmsg.c advsys/advtrm.c advsys/advprs.c |
| 92 |
advsys/advdbs.c advsys/advint.c advsys/advjunk.c advsys/advexe.c |
| 93 |
advsys/glkstart.c) |
| 94 |
|
| 95 |
if(CMAKE_C_COMPILER_ID MATCHES "Clang$") |
| 96 |
# This is a style choice in the code. |
| 97 |
target_compile_options(advsys PRIVATE "-Wno-parentheses") |
| 98 |
endif() |
| 99 |
endif() |
| 100 |
|
| 101 |
# ------------------------------------------------------------------------------ |
| 102 |
# |
| 103 |
# Agility 1.1.2 with Glk |
| 104 |
# |
| 105 |
# Agility uses some bad voodoo to get filenames back from glk filerefs. |
| 106 |
# We have three options: |
| 107 |
# 1) use the bad voodoo (only works on unixes) |
| 108 |
# 2) don't use glk file prompts (GLK_ANSI_ONLY) |
| 109 |
# 3) use garglk extension garglk_fileref_get_name (GARGLK) |
| 110 |
# |
| 111 |
if(WITH_AGILITY) |
| 112 |
terp(agility |
| 113 |
SRCS agility/agtread.c agility/gamedata.c agility/util.c |
| 114 |
agility/agxfile.c agility/auxfile.c agility/filename.c agility/parser.c |
| 115 |
agility/exec.c agility/runverb.c agility/metacommand.c agility/savegame.c |
| 116 |
agility/debugcmd.c agility/agil.c agility/token.c agility/disassemble.c |
| 117 |
agility/object.c agility/interface.c agility/os_glk.c |
| 118 |
MACROS GLK POSIX |
| 119 |
GPL2) |
| 120 |
endif() |
| 121 |
|
| 122 |
# ------------------------------------------------------------------------------ |
| 123 |
# |
| 124 |
# Alan interpreter 2.8.6 |
| 125 |
# |
| 126 |
# Fixed a couple of bugs (needsp needs resetting in a few places). |
| 127 |
# Added glk file prompts for gargoyle using garglk_fileref_get_name. |
| 128 |
# |
| 129 |
if(WITH_ALAN2) |
| 130 |
set(ALAN2_MACROS GLK) |
| 131 |
|
| 132 |
if(NOT GARGLK_BIG_ENDIAN) |
| 133 |
list(APPEND ALAN2_MACROS REVERSED) |
| 134 |
endif() |
| 135 |
|
| 136 |
terp(alan2 |
| 137 |
SRCS alan2/arun.c alan2/main.c alan2/debug.c alan2/args.c alan2/exe.c |
| 138 |
alan2/inter.c alan2/parse.c alan2/rules.c alan2/stack.c alan2/decode.c |
| 139 |
alan2/term.c alan2/reverse.c alan2/readline.c alan2/params.c |
| 140 |
alan2/sysdep.c alan2/glkstart.c alan2/glkio.c alan2/alan.version.c |
| 141 |
MACROS ${ALAN2_MACROS} |
| 142 |
POSIX) |
| 143 |
|
| 144 |
if(CMAKE_C_COMPILER_ID MATCHES "Clang$") |
| 145 |
# This is a style choice in the code. |
| 146 |
target_compile_options(alan2 PRIVATE "-Wno-dangling-else") |
| 147 |
endif() |
| 148 |
endif() |
| 149 |
|
| 150 |
# ------------------------------------------------------------------------------ |
| 151 |
# |
| 152 |
# Alan interpreter 3.0beta8 |
| 153 |
# |
| 154 |
if(WITH_ALAN3) |
| 155 |
terp(alan3 |
| 156 |
SRCS alan3/alan.version.c alan3/act.c alan3/actor.c alan3/args.c |
| 157 |
alan3/arun.c alan3/attribute.c alan3/checkentry.c alan3/class.c |
| 158 |
alan3/converter.c alan3/current.c alan3/debug.c alan3/decode.c |
| 159 |
alan3/dictionary.c alan3/event.c alan3/exe.c alan3/fnmatch.c |
| 160 |
alan3/glkio.c alan3/glkstart.c alan3/instance.c alan3/inter.c |
| 161 |
alan3/lists.c alan3/literal.c alan3/main.c alan3/memory.c alan3/msg.c |
| 162 |
alan3/options.c alan3/output.c alan3/params.c alan3/parse.c |
| 163 |
alan3/readline.c alan3/reverse.c alan3/rules.c alan3/save.c alan3/scan.c |
| 164 |
alan3/score.c alan3/set.c alan3/stack.c alan3/state.c alan3/syntax.c |
| 165 |
alan3/sysdep.c alan3/syserr.c alan3/term.c alan3/types.c alan3/utils.c |
| 166 |
alan3/word.c alan3/compatibility.c alan3/AltInfo.c alan3/Container.c |
| 167 |
alan3/Location.c alan3/ParameterPosition.c alan3/StateStack.c |
| 168 |
MACROS GLK HAVE_GARGLK BUILD=0 |
| 169 |
POSIX) |
| 170 |
endif() |
| 171 |
|
| 172 |
# ------------------------------------------------------------------------------ |
| 173 |
# |
| 174 |
# Bocfel 2.5 |
| 175 |
# |
| 176 |
if(WITH_BOCFEL) |
| 177 |
set(BOCFEL_MACROS ZTERP_GLK ZTERP_GLK_BLORB ZTERP_GLK_UNIX "ZTERP_STATIC_PATCH_FILE=\"static-patches.h\"") |
| 178 |
if(UNIX) |
| 179 |
list(APPEND BOCFEL_MACROS ZTERP_OS_UNIX) |
| 180 |
elseif(WIN32) |
| 181 |
list(APPEND BOCFEL_MACROS ZTERP_OS_WIN32) |
| 182 |
endif() |
| 183 |
|
| 184 |
if(GARGLK_NEEDS_TICK) |
| 185 |
list(APPEND BOCFEL_MACROS ZTERP_GLK_TICK) |
| 186 |
endif() |
| 187 |
|
| 188 |
terp(bocfel |
| 189 |
SRCS bocfel/blorb.cpp bocfel/branch.cpp bocfel/dict.cpp bocfel/iff.cpp |
| 190 |
bocfel/io.cpp bocfel/mathop.cpp bocfel/meta.cpp bocfel/memory.cpp bocfel/objects.cpp |
| 191 |
bocfel/options.cpp bocfel/osdep.cpp bocfel/patches.cpp bocfel/process.cpp |
| 192 |
bocfel/random.cpp bocfel/screen.cpp bocfel/sound.cpp bocfel/stack.cpp |
| 193 |
bocfel/stash.cpp bocfel/unicode.cpp bocfel/util.cpp bocfel/zterp.cpp |
| 194 |
bocfel/glkstart.cpp bocfel/glkautosave.cpp |
| 195 |
CXXSTD 14 |
| 196 |
MACROS ${BOCFEL_MACROS} |
| 197 |
LTO WARNINGS) |
| 198 |
|
| 199 |
if(CMAKE_C_COMPILER_ID MATCHES "GNU$") |
| 200 |
target_compile_options(bocfel PRIVATE "-Wno-sign-compare") |
| 201 |
endif() |
| 202 |
endif() |
| 203 |
|
| 204 |
# ------------------------------------------------------------------------------ |
| 205 |
# |
| 206 |
# Git 1.3.8 |
| 207 |
# |
| 208 |
# Reworked startup code to redirect errors to Glk windows. |
| 209 |
# |
| 210 |
if(WITH_GIT) |
| 211 |
set(GIT_MACROS USE_INLINE) |
| 212 |
|
| 213 |
if(GARGLK_NEEDS_TICK) |
| 214 |
list(APPEND GIT_MACROS GIT_NEED_TICK) |
| 215 |
endif() |
| 216 |
|
| 217 |
if(GARGLK_BIG_ENDIAN) |
| 218 |
list(APPEND GIT_MACROS USE_BIG_ENDIAN) |
| 219 |
endif() |
| 220 |
|
| 221 |
terp(git |
| 222 |
SRCS git/git.c git/memory.c git/compiler.c git/opcodes.c git/operands.c |
| 223 |
git/peephole.c git/terp.c git/glkop.c git/search.c git/git_unix.c |
| 224 |
git/savefile.c git/saveundo.c git/gestalt.c git/heap.c git/accel.c |
| 225 |
MACROS ${GIT_MACROS} |
| 226 |
MATH) |
| 227 |
endif() |
| 228 |
|
| 229 |
# ------------------------------------------------------------------------------ |
| 230 |
# |
| 231 |
# Glulxe 0.6.1 |
| 232 |
# |
| 233 |
if(WITH_GLULXE) |
| 234 |
set(GLULXE_MACROS FLOAT_COMPILE_SAFER_POWF) |
| 235 |
if(APPLE) |
| 236 |
list(APPEND GLULXE_MACROS OS_MAC) |
| 237 |
# _DARWIN_C_SOURCE for arc4random(). |
| 238 |
set_source_files_properties(glulxe/osdepend.c PROPERTIES COMPILE_DEFINITIONS _DARWIN_C_SOURCE) |
| 239 |
elseif(UNIX) |
| 240 |
list(APPEND GLULXE_MACROS OS_UNIX) |
| 241 |
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 242 |
list(APPEND GLULXE_MACROS UNIX_RAND_GETRANDOM) |
| 243 |
endif() |
| 244 |
elseif(WIN32) |
| 245 |
list(APPEND GLULXE_MACROS OS_WINDOWS) |
| 246 |
endif() |
| 247 |
|
| 248 |
terp(glulxe |
| 249 |
SRCS glulxe/main.c glulxe/files.c glulxe/vm.c glulxe/exec.c |
| 250 |
glulxe/funcs.c glulxe/operand.c glulxe/string.c glulxe/glkop.c |
| 251 |
glulxe/heap.c glulxe/serial.c glulxe/search.c glulxe/gestalt.c |
| 252 |
glulxe/osdepend.c glulxe/unixstrt.c glulxe/accel.c glulxe/profile.c |
| 253 |
glulxe/float.c |
| 254 |
MACROS ${GLULXE_MACROS} |
| 255 |
MATH |
| 256 |
POSIX |
| 257 |
LTO) |
| 258 |
endif() |
| 259 |
|
| 260 |
# ------------------------------------------------------------------------------ |
| 261 |
# |
| 262 |
# Hugo for Unix git-df0ce19 |
| 263 |
# |
| 264 |
if(WITH_HUGO) |
| 265 |
terp(hugo |
| 266 |
SRCS hugo/heglk/heglk.c hugo/heglk/heglkunix.c hugo/source/he.c |
| 267 |
hugo/source/hemisc.c hugo/source/heparse.c hugo/source/herun.c |
| 268 |
hugo/source/heexpr.c hugo/source/heobject.c hugo/source/heres.c |
| 269 |
hugo/source/heset.c hugo/source/stringfn.c |
| 270 |
INCLUDE_DIRS hugo/source |
| 271 |
MACROS GLK HUGO_GLKUNIX COMPILE_V25 NO_KEYPRESS_CURSOR "HUGO_INLINE=static inline") |
| 272 |
endif() |
| 273 |
|
| 274 |
# ------------------------------------------------------------------------------ |
| 275 |
# |
| 276 |
# JACL git-ce6517f |
| 277 |
# |
| 278 |
if(WITH_JACL) |
| 279 |
terp(jacl |
| 280 |
SRCS jacl/jacl.c jacl/glk_startup.c jacl/findroute.c jacl/interpreter.c |
| 281 |
jacl/loader.c jacl/glk_saver.c jacl/logging.c jacl/parser.c |
| 282 |
jacl/display.c jacl/utils.c jacl/jpp.c jacl/resolvers.c jacl/errors.c |
| 283 |
jacl/encapsulate.c jacl/libcsv.c |
| 284 |
MACROS GLK |
| 285 |
MATH |
| 286 |
POSIX |
| 287 |
GPL2) |
| 288 |
|
| 289 |
if(CMAKE_C_COMPILER_ID MATCHES "Clang$") |
| 290 |
# This is a style choice in the code. |
| 291 |
target_compile_options(jacl PRIVATE "-Wno-parentheses-equality") |
| 292 |
|
| 293 |
# Non-prototype (K&R) declarations have been fixed in JACL's Git |
| 294 |
# repository, but there hasn't been a release yet since then, so |
| 295 |
# just ignore the warnings here; remove in the future when a new |
| 296 |
# JACL is upstreamed. |
| 297 |
target_compile_options(jacl PRIVATE "-Wno-deprecated-non-prototype") |
| 298 |
endif() |
| 299 |
endif() |
| 300 |
|
| 301 |
# ------------------------------------------------------------------------------ |
| 302 |
# |
| 303 |
# Level9 5.2 |
| 304 |
# |
| 305 |
# Disabled the status bar that just contained a static version string. |
| 306 |
# Added graphics support. |
| 307 |
# |
| 308 |
if(WITH_LEVEL9) |
| 309 |
terp(level9 |
| 310 |
SRCS level9/Glk/glk.c level9/bitmap.c level9/level9.c |
| 311 |
INCLUDE_DIRS level9 |
| 312 |
MACROS PRIVATE BITMAP_DECODER NEED_STRICMP_PROTOTYPE |
| 313 |
stricmp=gln_strcasecmp strnicmp=gln_strncasecmp |
| 314 |
MATH) |
| 315 |
|
| 316 |
if(CMAKE_C_COMPILER_ID MATCHES "Clang$") |
| 317 |
# This is a style choice in the code. |
| 318 |
target_compile_options(level9 PRIVATE "-Wno-switch") |
| 319 |
endif() |
| 320 |
endif() |
| 321 |
|
| 322 |
# ------------------------------------------------------------------------------ |
| 323 |
# |
| 324 |
# Magnetic 2.3.1 |
| 325 |
# |
| 326 |
# Disable layered drawing, because that is slower than drawing |
| 327 |
# all the pixels with fill_rect -- the opposite of Xglk. |
| 328 |
# |
| 329 |
# Delay opening the status window, because for games that don't use it |
| 330 |
# magnetic shows a static version string only. I don't like that. |
| 331 |
# |
| 332 |
# Made shaded border around pictures if-defable. |
| 333 |
# |
| 334 |
if(WITH_MAGNETIC) |
| 335 |
terp(magnetic |
| 336 |
SRCS magnetic/Generic/emu.c magnetic/Glk/glk.c |
| 337 |
INCLUDE_DIRS magnetic/Generic |
| 338 |
MACROS MAGNETIC_GLKUNIX) |
| 339 |
|
| 340 |
if(CMAKE_C_COMPILER_ID MATCHES "Clang$") |
| 341 |
# The alternative to this is lots of casts; ignore this warning |
| 342 |
# unless it becomes a problem with a more strict compiler. |
| 343 |
target_compile_options(magnetic PRIVATE "-Wno-pointer-sign") |
| 344 |
endif() |
| 345 |
endif() |
| 346 |
|
| 347 |
# ------------------------------------------------------------------------------ |
| 348 |
# |
| 349 |
# Plus 1.0 for Scott Adams Graphic Adventures Plus games |
| 350 |
# |
| 351 |
if(WITH_PLUS) |
| 352 |
set(PLUS_INCLUDE_DIRS plus) |
| 353 |
terp(plus |
| 354 |
SRCS plus/plusmain.c plus/animations.c plus/apple2detect.c plus/apple2draw.c |
| 355 |
plus/atari8c64draw.c plus/atari8detect.c plus/c64detect.c plus/extracommands.c |
| 356 |
plus/companionfile.c plus/gameinfo.c plus/graphics.c plus/layouttext.c plus/loaddatabase.c |
| 357 |
plus/parseinput.c plus/pcdraw.c plus/restorestate.c plus/stdetect.c plus/stdraw.c |
| 358 |
INCLUDE_DIRS ${PLUS_INCLUDE_DIRS} |
| 359 |
LIBS c64diskimage |
| 360 |
GPL2) |
| 361 |
endif() |
| 362 |
|
| 363 |
# ------------------------------------------------------------------------------ |
| 364 |
# |
| 365 |
# SCARE 1.3.10 for Adrift 4 games |
| 366 |
# |
| 367 |
if(WITH_SCARE) |
| 368 |
find_package(ZLIB REQUIRED) |
| 369 |
set(SCARE_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS}) |
| 370 |
set(SCARE_LIBS ${ZLIB_LIBRARIES}) |
| 371 |
|
| 372 |
terp(scare |
| 373 |
SRCS scare/sctafpar.c scare/sctaffil.c scare/scprops.c scare/scvars.c |
| 374 |
scare/scexpr.c scare/scprintf.c scare/scinterf.c scare/scparser.c |
| 375 |
scare/sclibrar.c scare/scrunner.c scare/scevents.c scare/scnpcs.c |
| 376 |
scare/scobjcts.c scare/sctasks.c scare/screstrs.c scare/scgamest.c |
| 377 |
scare/scserial.c scare/scresour.c scare/scutils.c scare/scdebug.c |
| 378 |
scare/sclocale.c scare/scmemos.c scare/os_glk.c |
| 379 |
INCLUDE_DIRS ${SCARE_INCLUDE_DIRS} |
| 380 |
LIBS ${SCARE_LIBS} |
| 381 |
MACROS SCARE_NO_ABBREVIATIONS |
| 382 |
GPL2) |
| 383 |
endif() |
| 384 |
|
| 385 |
# ------------------------------------------------------------------------------ |
| 386 |
# |
| 387 |
# ScottFree 1.14 for Scott Adams games |
| 388 |
# |
| 389 |
|
| 390 |
if(WITH_SCOTT) |
| 391 |
set(SCOTT_INCLUDE_DIRS scott scott/saga scott/ai_uk scott/ti994a) |
| 392 |
terp(scott |
| 393 |
SRCS scott/scott.c scott/bsd.c scott/ai_uk/c64decrunch.c scott/ai_uk/debug.c |
| 394 |
scott/ai_uk/decompresstext.c scott/ai_uk/line_drawing.c |
| 395 |
scott/ai_uk/game_specific.c scott/ai_uk/hulk.c scott/ai_uk/gremlins.c |
| 396 |
scott/ai_uk/decompressz80.c scott/detectgame.c scott/scottgameinfo.c scott/layouttext.c |
| 397 |
scott/ti994a/load_ti99_4a.c scott/parser.c scott/restorestate.c |
| 398 |
scott/ai_uk/ringbuffer.c scott/ai_uk/robinofsherwood.c scott/ai_uk/sagadraw.c |
| 399 |
scott/saga/apple2detect.c scott/saga/apple2draw.c scott/saga/atari8c64draw.c |
| 400 |
scott/saga/atari8detect.c scott/saga/ciderpress.c scott/saga/pcdraw.c scott/saga/saga.c |
| 401 |
scott/saga/sagagraphics.c scott/saga/woz2nib.c scott/titleimage.c |
| 402 |
scott/ai_uk/seasofblood.c scott/ti994a/ti99_4a_terp.c |
| 403 |
INCLUDE_DIRS ${SCOTT_INCLUDE_DIRS} |
| 404 |
LIBS c64diskimage unp64) |
| 405 |
endif() |
| 406 |
|
| 407 |
# ------------------------------------------------------------------------------ |
| 408 |
# |
| 409 |
# TADS |
| 410 |
# |
| 411 |
if(WITH_TADS) |
| 412 |
set(srcs tads/glk/memicmp.c tads/glk/osbuffer.c tads/glk/osextra.c |
| 413 |
tads/glk/osglk.c tads/glk/osglkban.c tads/glk/osmisc.c |
| 414 |
tads/glk/osparse.c tads/glk/osportable.cc tads/glk/t23run.cpp |
| 415 |
tads/glk/t2askf.c tads/glk/t2indlg.c tads/glk/t3askf.cpp |
| 416 |
tads/glk/t3indlg.cpp tads/glk/vmuni_cs.cpp) |
| 417 |
|
| 418 |
list(APPEND srcs tads/tads2/argize.c tads/tads2/bif.c tads/tads2/bifgdum.c |
| 419 |
tads/tads2/cmap.c tads/tads2/cmd.c tads/tads2/dat.c tads/tads2/dbgtr.c |
| 420 |
tads/tads2/errmsg.c tads/tads2/execmd.c tads/tads2/fio.c |
| 421 |
tads/tads2/fioxor.c tads/tads2/getstr.c tads/tads2/ler.c |
| 422 |
tads/tads2/linfdum.c tads/tads2/lst.c tads/tads2/mch.c tads/tads2/mcm.c |
| 423 |
tads/tads2/mcs.c tads/tads2/obj.c tads/tads2/oem.c tads/tads2/os0.c |
| 424 |
tads/tads2/oserr.c tads/tads2/osifc.c tads/tads2/osnoui.c |
| 425 |
tads/tads2/osrestad.c tads/tads2/osstzprs.c tads/tads2/ostzposix.c |
| 426 |
tads/tads2/out.c tads/tads2/output.c tads/tads2/ply.c tads/tads2/qas.c |
| 427 |
tads/tads2/regex.c tads/tads2/run.c tads/tads2/runstat.c |
| 428 |
tads/tads2/suprun.c tads/tads2/trd.c tads/tads2/voc.c |
| 429 |
tads/tads2/vocab.c) |
| 430 |
|
| 431 |
list(APPEND srcs tads/tads3/charmap.cpp tads/tads3/md5.cpp |
| 432 |
tads/tads3/resldexe.cpp tads/tads3/resload.cpp tads/tads3/sha2.cpp |
| 433 |
tads/tads3/std.cpp tads/tads3/tcerr.cpp tads/tads3/tcerrmsg.cpp |
| 434 |
tads/tads3/tcgen.cpp tads/tads3/tcglob.cpp tads/tads3/tcmain.cpp |
| 435 |
tads/tads3/tcprs.cpp tads/tads3/tcprs_rt.cpp tads/tads3/tcprsnf.cpp |
| 436 |
tads/tads3/tcprsnl.cpp tads/tads3/tcprsstm.cpp tads/tads3/tcsrc.cpp |
| 437 |
tads/tads3/tct3.cpp tads/tads3/tct3_d.cpp tads/tads3/tct3nl.cpp |
| 438 |
tads/tads3/tct3stm.cpp tads/tads3/tct3unas.cpp tads/tads3/tctok.cpp |
| 439 |
tads/tads3/utf8.cpp tads/tads3/vmanonfn.cpp tads/tads3/vmbif.cpp |
| 440 |
tads/tads3/vmbifl.cpp tads/tads3/vmbifreg.cpp tads/tads3/vmbift3.cpp |
| 441 |
tads/tads3/vmbiftad.cpp tads/tads3/vmbiftio.cpp tads/tads3/vmbignum.cpp |
| 442 |
tads/tads3/vmbignumlib.cpp tads/tads3/vmbt3_nd.cpp |
| 443 |
tads/tads3/vmbytarr.cpp tads/tads3/vmcfgmem.cpp tads/tads3/vmcoll.cpp |
| 444 |
tads/tads3/vmconhmp.cpp tads/tads3/vmconsol.cpp tads/tads3/vmcrc.cpp |
| 445 |
tads/tads3/vmcset.cpp tads/tads3/vmdate.cpp tads/tads3/vmdict.cpp |
| 446 |
tads/tads3/vmdynfunc.cpp tads/tads3/vmerr.cpp tads/tads3/vmerrmsg.cpp |
| 447 |
tads/tads3/vmfile.cpp tads/tads3/vmfilnam.cpp tads/tads3/vmfilobj.cpp |
| 448 |
tads/tads3/vmfref.cpp tads/tads3/vmfunc.cpp tads/tads3/vmglob.cpp |
| 449 |
tads/tads3/vmgram.cpp tads/tads3/vmhash.cpp tads/tads3/vmhostsi.cpp |
| 450 |
tads/tads3/vmhosttx.cpp tads/tads3/vmimage.cpp tads/tads3/vmimg_nd.cpp |
| 451 |
tads/tads3/vmini_nd.cpp tads/tads3/vminit.cpp tads/tads3/vminitim.cpp |
| 452 |
tads/tads3/vmintcls.cpp tads/tads3/vmisaac.cpp tads/tads3/vmiter.cpp |
| 453 |
tads/tads3/vmlog.cpp tads/tads3/vmlookup.cpp tads/tads3/vmlst.cpp |
| 454 |
tads/tads3/vmmain.cpp tads/tads3/vmmcreg.cpp tads/tads3/vmmeta.cpp |
| 455 |
tads/tads3/vmnetfillcl.cpp tads/tads3/vmobj.cpp tads/tads3/vmop.cpp |
| 456 |
tads/tads3/vmpack.cpp tads/tads3/vmpat.cpp tads/tads3/vmpool.cpp |
| 457 |
tads/tads3/vmpoolim.cpp tads/tads3/vmregex.cpp tads/tads3/vmrun.cpp |
| 458 |
tads/tads3/vmrunsym.cpp tads/tads3/vmsa.cpp tads/tads3/vmsave.cpp |
| 459 |
tads/tads3/vmsort.cpp tads/tads3/vmsortv.cpp tads/tads3/vmsrcf.cpp |
| 460 |
tads/tads3/vmstack.cpp tads/tads3/vmstr.cpp tads/tads3/vmstrbuf.cpp |
| 461 |
tads/tads3/vmstrcmp.cpp tads/tads3/vmtmpfil.cpp tads/tads3/vmtobj.cpp |
| 462 |
tads/tads3/vmtype.cpp tads/tads3/vmtypedh.cpp tads/tads3/vmtz.cpp |
| 463 |
tads/tads3/vmtzobj.cpp tads/tads3/vmundo.cpp tads/tads3/vmvec.cpp) |
| 464 |
|
| 465 |
list(APPEND srcs tads/tads3/vmconnom.cpp) |
| 466 |
|
| 467 |
set(macros GLK VMGLOB_STRUCT GLK_UNICODE GLK_TIMERS TC_TARGET_T3 RUNTIME) |
| 468 |
if(WIN32) |
| 469 |
list(APPEND macros DMSDOS DT_WIN32) |
| 470 |
endif() |
| 471 |
|
| 472 |
terp(tadsr |
| 473 |
SRCS ${srcs} |
| 474 |
MACROS ${macros} |
| 475 |
CXXSTD 11 |
| 476 |
POSIX |
| 477 |
GPL2) |
| 478 |
|
| 479 |
if(CMAKE_C_COMPILER_ID STREQUAL "Clang") |
| 480 |
# This is a style choice in the code. |
| 481 |
target_compile_options(tadsr PRIVATE "-Wno-logical-not-parentheses") |
| 482 |
endif() |
| 483 |
|
| 484 |
target_include_directories(tadsr PRIVATE tads/glk tads/tads2 tads/tads3) |
| 485 |
endif() |
| 486 |
|
| 487 |
# ------------------------------------------------------------------------------ |
| 488 |
# |
| 489 |
# TaylorMade 0.4 for later Adventure Soft UK games |
| 490 |
# |
| 491 |
|
| 492 |
if(WITH_TAYLOR) |
| 493 |
set(TAYLOR_INCLUDE_DIRS taylor) |
| 494 |
terp(taylor |
| 495 |
SRCS taylor/animations.c taylor/c64decrunch.c taylor/decompressz80.c |
| 496 |
taylor/decrypttotloader.c taylor/extracommands.c taylor/extracttape.c taylor/gameinfo.c |
| 497 |
taylor/layouttext.c taylor/loadtotpicture.c taylor/parseinput.c taylor/player.c |
| 498 |
taylor/restorestate.c taylor/sagadraw.c taylor/ui.c taylor/utility.c |
| 499 |
INCLUDE_DIRS ${TAYLOR_INCLUDE_DIRS} |
| 500 |
LIBS c64diskimage unp64 |
| 501 |
GPL2) |
| 502 |
endif() |
| 503 |
|
| 504 |
if(WITH_FRANKENDRIFT) |
| 505 |
add_subdirectory(frankendrift/FrankenDrift.GlkRunner/FrankenDrift.GlkRunner.Gargoyle) |
| 506 |
endif() |