]> git.lizzy.rs Git - nothing.git/blobdiff - CMakeLists.txt
(#640) Remove dynarray
[nothing.git] / CMakeLists.txt
index ceb7b6181e8a7db4aa060333d48a9e319514e5f0..b291021f75716ff54f3e2e2b14e10cc36e0ce54a 100644 (file)
@@ -13,15 +13,20 @@ find_package(SDL2 REQUIRED)
 find_package(SDL2_mixer REQUIRED)
 
 include_directories(src/)
-include_directories(${SDL2_INCLUDE_DIR})
+
+if(APPLE)
+  include_directories(${SDL2_INCLUDE_DIR}/..)
+else()
+  include_directories(${SDL2_INCLUDE_DIR})
+endif()
+
 include_directories(${SDL2_MIXER_INCLUDE_DIR})
 
-set(SOURCE_FILES
+add_executable(nothing 
   src/color.c
   src/game.c
   src/game/camera.c
-  src/game/debug_tree.c
-  src/game/edit_field.c
+  src/ui/edit_field.c
   src/game/level.c
   src/game/level/background.c
   src/game/level/boxes.c
@@ -43,23 +48,25 @@ set(SOURCE_FILES
   src/math/rand.c
   src/math/rect.c
   src/math/triangle.c
-  src/script/expr.c
-  src/script/parser.c
-  src/script/tokenizer.c
+  src/ebisp/expr.c
+  src/ebisp/interpreter.c
+  src/ebisp/parser.c
+  src/ebisp/tokenizer.c
+  src/ebisp/gc.c
+  src/ebisp/scope.c
   src/sdl/renderer.c
-  src/system/error.c
   src/system/lt.c
   src/system/lt/lt_adapters.c
   src/system/lt/lt_slot.c
-)
-
-set(HEADER_FILES
+  src/ui/console.c
+  src/ui/console_log.c
+  src/str.c
+  src/ui/history.c
+  src/game/level/regions.c
   src/color.h
   src/game.h
   src/game/camera.h
-  src/game/debug_node.h
-  src/game/debug_tree.h
-  src/game/edit_field.h
+  src/ui/edit_field.h
   src/game/level.h
   src/game/level/background.h
   src/game/level/boxes.h
@@ -81,23 +88,116 @@ set(HEADER_FILES
   src/math/rand.h
   src/math/rect.h
   src/math/triangle.h
-  src/script/expr.h
-  src/script/parser.h
-  src/script/tokenizer.h
+  src/ebisp/builtins.c
+  src/ebisp/builtins.h
+  src/ebisp/expr.h
+  src/ebisp/gc.h
+  src/ebisp/scope.h
+  src/ebisp/interpreter.h
+  src/ebisp/parser.h
+  src/ebisp/tokenizer.h
   src/sdl/renderer.h
-  src/system/error.h
   src/system/lt.h
   src/system/lt/lt_adapters.h
   src/system/lt/lt_slot.h
+  src/ui/console.h
+  src/ui/console_log.h
+  src/str.h
+  src/ui/history.h
+  src/game/level/regions.h
+  src/system/line_stream.h
+  src/system/line_stream.c
+  src/game/level/script.h
+  src/game/level/script.c
+  src/system/log.h
+  src/system/log.c
+  src/system/log_script.h
+  src/system/log_script.c
+  src/system/nth_alloc.h
+  src/system/nth_alloc.c
+  src/ebisp/std.h
+  src/ebisp/std.c
+  src/system/stacktrace.h
+  src/system/stacktrace.c
+  src/game/level_picker.h
+  src/game/level_picker.c
+  src/broadcast.c
+  src/broadcast.h
+  src/game/level/rigid_bodies.h
+  src/game/level/rigid_bodies.c
 )
 
-add_executable(nothing ${SOURCE_FILES} ${HEADER_FILES})
+add_executable(repl
+  src/ebisp/builtins.c
+  src/ebisp/builtins.h
+  src/ebisp/expr.c
+  src/ebisp/expr.h
+  src/ebisp/interpreter.c
+  src/ebisp/interpreter.h
+  src/ebisp/parser.c
+  src/ebisp/parser.h
+  src/ebisp/scope.c
+  src/ebisp/scope.h
+  src/ebisp/tokenizer.c
+  src/ebisp/tokenizer.h
+  src/ebisp/repl.c
+  src/system/lt.c
+  src/system/lt.h
+  src/system/lt/lt_adapters.c
+  src/system/lt/lt_adapters.h
+  src/system/lt/lt_slot.c
+  src/system/lt/lt_slot.h
+  src/ebisp/gc.h
+  src/ebisp/gc.c
+  src/str.h
+  src/str.c
+  src/system/log.h
+  src/system/log.c
+  src/system/nth_alloc.h
+  src/system/nth_alloc.c
+  src/ebisp/repl_runtime.h
+  src/ebisp/repl_runtime.c
+  src/ebisp/std.h
+  src/ebisp/std.c
+  src/system/stacktrace.h
+  src/system/stacktrace.c
+  )
 add_executable(nothing_test
-  src/script/tokenizer.c
-  src/script/tokenizer.h
+  src/ebisp/builtins.c
+  src/ebisp/builtins.h
+  src/ebisp/expr.c
+  src/ebisp/expr.h
+  src/ebisp/interpreter.c
+  src/ebisp/interpreter.h
+  src/ebisp/parser.c
+  src/ebisp/parser.h
+  src/ebisp/scope.c
+  src/ebisp/scope.h
+  src/ebisp/tokenizer.c
+  src/ebisp/tokenizer.h
+  src/ebisp/gc.h
+  src/ebisp/gc.c
+  src/system/lt.c
+  src/system/lt.h
+  src/system/lt/lt_adapters.c
+  src/system/lt/lt_adapters.h
+  src/system/lt/lt_slot.c
+  src/system/lt/lt_slot.h
+  src/str.h
+  src/str.c
   test/main.c
+  test/test.h
+  test/tokenizer_suite.h
+  src/system/log.h
+  src/system/log.c
+  src/system/nth_alloc.h
+  src/system/nth_alloc.c
+  src/system/stacktrace.h
+  src/system/stacktrace.c
   )
-target_link_libraries(nothing ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY})
+target_link_libraries(nothing ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY} m)
+target_link_libraries(nothing_test ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY} m)
+target_link_libraries(repl ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY} m)
 
 if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "CLANG"))
   set(CMAKE_C_FLAGS
@@ -137,3 +237,4 @@ endif()
 
 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/sounds DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/fonts DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test-data DESTINATION ${CMAKE_CURRENT_BINARY_DIR})