X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=CMakeLists.txt;h=9aeb187ace521dfe01e14da02654bb2208d46336;hb=ac89c8a2ec6d63688bd1437964eaab697e59c147;hp=c04c55c79412d9b6b3fcac3c6b83138b190288e9;hpb=a6e64f416aea759b8f5e5aebf6b12f57e3d51e82;p=nothing.git diff --git a/CMakeLists.txt b/CMakeLists.txt index c04c55c7..9aeb187a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,13 @@ 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}) add_executable(nothing @@ -42,22 +48,21 @@ add_executable(nothing src/math/rand.c src/math/rect.c src/math/triangle.c - src/script/expr.c - src/script/interpreter.c - src/script/parser.c - src/script/tokenizer.c - src/script/gc.c - src/script/scope.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 src/ui/console.c - src/ui/log.c + src/ui/console_log.c src/str.c src/ui/history.c - src/game/level/region.c + src/game/level/regions.c src/color.h src/game.h src/game/camera.h @@ -83,70 +88,91 @@ add_executable(nothing src/math/rand.h src/math/rect.h src/math/triangle.h - src/script/builtins.c - src/script/builtins.h - src/script/expr.h - src/script/gc.h - src/script/scope.h - src/script/interpreter.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/log.h + src/ui/console_log.h src/str.h src/ui/history.h - src/game/level/region.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/game/level_script.c + src/game/level_script.h + src/ebisp/std.h + src/ebisp/std.c + src/system/stacktrace.h + src/system/stacktrace.c ) add_executable(repl - src/script/builtins.c - src/script/builtins.h - src/script/expr.c - src/script/expr.h - src/script/interpreter.c - src/script/interpreter.h - src/script/parser.c - src/script/parser.h - src/script/scope.c - src/script/scope.h - src/script/tokenizer.c - src/script/tokenizer.h - src/script/repl.c + 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/system/error.c - src/system/error.h - src/script/gc.h - src/script/gc.c + 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/builtins.c - src/script/builtins.h - src/script/expr.c - src/script/expr.h - src/script/interpreter.c - src/script/interpreter.h - src/script/parser.c - src/script/parser.h - src/script/scope.c - src/script/scope.h - src/script/tokenizer.c - src/script/tokenizer.h - src/script/gc.h - src/script/gc.c - src/system/error.c - src/system/error.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 @@ -158,10 +184,16 @@ add_executable(nothing_test 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_test ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY}) -target_link_libraries(repl ${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