Switch to CMake

This commit is contained in:
Mike Nolan 2023-05-10 06:20:56 -05:00
parent 1f673f8620
commit 0b16bf3215
4 changed files with 11 additions and 2 deletions

View File

@ -9,6 +9,7 @@
"dirent.h": "c",
"stdlib.h": "c",
"poll.h": "c",
"sdl.h": "c"
"sdl.h": "c",
"myfeatures.h": "c"
}
}

View File

@ -1,6 +1,6 @@
project(tlanginterp)
add_library(tlanginterp STATIC src/addnode.c src/bit.c src/bitwiseand.c src/bitwiseor.c src/breaknode.c src/bwnot.c src/closurenode.c src/constnode.c src/curl.c src/dict.c src/dirittr.c src/dividenode.c src/eachnode.c src/eq.c src/forloop.c src/fs.c src/functioncallnode.c src/getarraynode.c src/getmembernode.c src/getvariablenode.c src/getvariablenode.c src/greaterthan.c src/greaterthanequal.c src/if.c src/ittr.c src/json.c src/leftshift.c src/lessthan.c src/lessthanequal.c src/lexer.c src/lextokenlist.c src/listittr.c src/logicaland.c src/logicalor.c src/mbed.c src/methodcallnode.c src/modulonode.c src/multiplynode.c src/neg.c src/neq.c src/net.c src/nodetwo.c src/not.c src/parser.c src/postfixdecrementnode.c src/postfixincrementnode.c src/rand.c src/returnnode.c src/rightshift.c src/runtime.c src/scope.c src/scopenode.c src/sdl2.c src/setvariablenode.c src/stream.c src/string.c src/stringittr.c src/subnode.c src/switch.c src/threading.c src/tobject.c src/whileloop.c src/wpad-wii.c src/xor.c include/FreeMonoBold.h include/myfeatures.h include/tlang_version.h include/tlang.h)
add_definitions(-DCMAKE_TLANG_BUILD)
option(USE_SDL "Enable SDL2" ON)
option(USE_NETWORK "Enable Networking" ON)
option(USE_CURL "Enable curl" ON)

View File

@ -1,6 +1,8 @@
#pragma once
#include "tlang_version.h"
#ifndef CMAKE_TLANG_BUILD
#include "myfeatures.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

View File

@ -0,0 +1,6 @@
#pragma once
#define TLANG_MAJOR 0
#define TLANG_MINOR 0
#define TLANG_PATCH 0
#define TLANG_BUILD 1