summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-08 11:38:49 -0500
committerpommicket <pommicket@gmail.com>2023-01-09 13:23:40 -0500
commitff6abceefdcf3bd1521d88173323c93abf71eb6b (patch)
tree65238c1dad19a06042cc354aa9d1b3c6fefc7fa1
parentbb6d6850bd7d1e7fb65bae6f4d1bae32534f3455 (diff)
cmake?
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt10
-rw-r--r--os.c7
3 files changed, 19 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index b3123f1..bda84df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,8 @@ ted
!windows_installer/ted/ted
Debug
Release
+debug
+release
scratch
obj
*~
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..0315b11
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.0)
+project(ted)
+set(SOURCES buffer.c build.c colors.c command.c config.c find.c gl.c ide-autocomplete.c
+ ide-definitions.c ide-highlights.c ide-hover.c ide-signature-help.c ide-usages.c
+ lsp.c lsp-json.c lsp-parse.c lsp-write.c main.c menu.c node.c os.c session.c
+ stb_image.c stb_truetype.c syntax.c tags.c ted.c text.c ui.c util.c)
+add_executable(ted ${SOURCES})
+target_compile_definitions(ted PUBLIC DEBUG=1)
+target_link_libraries(ted m SDL2)
+target_link_libraries(ted ${CMAKE_SOURCE_DIR}/libpcre2-32.a)
diff --git a/os.c b/os.c
new file mode 100644
index 0000000..17897d6
--- /dev/null
+++ b/os.c
@@ -0,0 +1,7 @@
+#if _WIN32
+#include "os-win.c"
+#elif __unix__
+#include "os-posix.c"
+#else
+#error "Unrecognized operating system"
+#endif