2017-12-01 21:26:06 -08:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
2017-11-30 17:52:59 -08:00
|
|
|
project(nothing)
|
|
|
|
|
2017-12-09 21:02:44 -08:00
|
|
|
if(WIN32)
|
|
|
|
# Conan integration
|
|
|
|
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
|
|
|
conan_basic_setup()
|
|
|
|
endif()
|
|
|
|
|
2017-12-02 06:30:26 -08:00
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
2017-12-01 22:21:15 -08:00
|
|
|
|
2017-11-30 17:52:59 -08:00
|
|
|
find_package(SDL2 REQUIRED)
|
2018-03-01 13:03:56 -08:00
|
|
|
find_package(SDL2_mixer REQUIRED)
|
|
|
|
|
2019-02-02 10:26:03 -08:00
|
|
|
include_directories(${CMAKE_BINARY_DIR})
|
2018-04-29 05:45:50 -07:00
|
|
|
include_directories(src/)
|
2018-12-17 07:27:15 -08:00
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
include_directories(${SDL2_INCLUDE_DIR}/..)
|
|
|
|
else()
|
|
|
|
include_directories(${SDL2_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
2018-03-01 13:03:56 -08:00
|
|
|
include_directories(${SDL2_MIXER_INCLUDE_DIR})
|
2017-11-30 17:52:59 -08:00
|
|
|
|
2019-02-02 12:13:39 -08:00
|
|
|
add_library(system STATIC
|
|
|
|
src/system/line_stream.c
|
|
|
|
src/system/line_stream.h
|
|
|
|
src/system/log.c
|
|
|
|
src/system/log.h
|
|
|
|
src/system/log_script.c
|
|
|
|
src/system/log_script.h
|
|
|
|
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/nth_alloc.c
|
|
|
|
src/system/nth_alloc.h
|
|
|
|
src/system/stacktrace.c
|
|
|
|
src/system/stacktrace.h
|
|
|
|
src/system/str.c
|
|
|
|
src/system/str.h
|
2019-02-24 11:11:11 -08:00
|
|
|
src/dynarray.h
|
|
|
|
src/dynarray.c
|
2019-03-02 08:30:55 -08:00
|
|
|
src/linked_list.h
|
|
|
|
src/linked_list.c
|
2019-02-02 12:13:39 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
add_library(ebisp STATIC
|
|
|
|
src/ebisp/builtins.c
|
|
|
|
src/ebisp/builtins.h
|
2018-10-26 09:19:42 -07:00
|
|
|
src/ebisp/expr.c
|
2019-02-02 12:13:39 -08:00
|
|
|
src/ebisp/expr.h
|
|
|
|
src/ebisp/gc.c
|
|
|
|
src/ebisp/gc.h
|
2018-10-26 09:19:42 -07:00
|
|
|
src/ebisp/interpreter.c
|
2019-02-02 12:13:39 -08:00
|
|
|
src/ebisp/interpreter.h
|
2018-10-26 09:19:42 -07:00
|
|
|
src/ebisp/parser.c
|
2019-02-02 12:13:39 -08:00
|
|
|
src/ebisp/parser.h
|
2018-10-26 09:19:42 -07:00
|
|
|
src/ebisp/scope.c
|
2019-02-02 12:13:39 -08:00
|
|
|
src/ebisp/scope.h
|
|
|
|
src/ebisp/std.c
|
|
|
|
src/ebisp/std.h
|
|
|
|
src/ebisp/tokenizer.c
|
|
|
|
src/ebisp/tokenizer.h
|
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(nothing
|
|
|
|
broadcast_lisp.h
|
|
|
|
src/broadcast.c
|
|
|
|
src/broadcast.h
|
|
|
|
src/color.c
|
2018-04-29 06:59:56 -07:00
|
|
|
src/color.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game.c
|
2017-12-16 09:41:14 -08:00
|
|
|
src/game.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/camera.c
|
2018-05-02 21:43:54 -07:00
|
|
|
src/game/camera.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/level.c
|
2018-04-29 05:48:11 -07:00
|
|
|
src/game/level.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/level/background.c
|
2018-04-29 12:15:15 -07:00
|
|
|
src/game/level/background.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/level/boxes.c
|
2018-07-01 09:29:07 -07:00
|
|
|
src/game/level/boxes.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/level/goals.c
|
2018-04-29 05:59:16 -07:00
|
|
|
src/game/level/goals.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/level/labels.c
|
2018-07-22 12:09:40 -07:00
|
|
|
src/game/level/labels.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/level/lava.c
|
2018-04-29 06:01:01 -07:00
|
|
|
src/game/level/lava.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/level/lava/wavy_rect.c
|
2018-04-29 06:03:56 -07:00
|
|
|
src/game/level/lava/wavy_rect.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/level/platforms.c
|
2018-04-29 06:59:56 -07:00
|
|
|
src/game/level/platforms.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/level/player.c
|
2018-04-29 06:59:56 -07:00
|
|
|
src/game/level/player.h
|
2019-02-16 12:48:36 -08:00
|
|
|
src/game/level/explosion.c
|
|
|
|
src/game/level/explosion.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/level/regions.c
|
|
|
|
src/game/level/regions.h
|
|
|
|
src/game/level/rigid_bodies.c
|
|
|
|
src/game/level/rigid_bodies.h
|
|
|
|
src/game/level/script.c
|
|
|
|
src/game/level/script.h
|
|
|
|
src/game/level_picker.c
|
|
|
|
src/game/level_picker.h
|
|
|
|
src/game/sound_samples.c
|
2018-05-03 05:53:21 -07:00
|
|
|
src/game/sound_samples.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/game/sprite_font.c
|
2018-07-14 11:22:38 -07:00
|
|
|
src/game/sprite_font.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/main.c
|
|
|
|
src/math/extrema.c
|
|
|
|
src/math/extrema.h
|
|
|
|
src/math/mat3x3.c
|
2018-04-29 06:14:14 -07:00
|
|
|
src/math/mat3x3.h
|
2018-04-29 06:59:56 -07:00
|
|
|
src/math/pi.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/math/point.c
|
2018-04-29 06:59:56 -07:00
|
|
|
src/math/point.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/math/rand.c
|
2018-04-29 06:12:50 -07:00
|
|
|
src/math/rand.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/math/rect.c
|
2018-04-29 06:59:56 -07:00
|
|
|
src/math/rect.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/math/triangle.c
|
2018-04-29 06:59:56 -07:00
|
|
|
src/math/triangle.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/sdl/renderer.c
|
2018-04-29 06:59:56 -07:00
|
|
|
src/sdl/renderer.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/ui/console.c
|
2018-09-30 09:39:40 -07:00
|
|
|
src/ui/console.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/ui/console_log.c
|
2018-11-05 05:27:31 -08:00
|
|
|
src/ui/console_log.h
|
2019-02-02 12:13:39 -08:00
|
|
|
src/ui/edit_field.c
|
|
|
|
src/ui/edit_field.h
|
|
|
|
src/ui/history.c
|
2018-10-07 10:55:16 -07:00
|
|
|
src/ui/history.h
|
2017-11-30 17:52:59 -08:00
|
|
|
)
|
|
|
|
|
2019-02-02 10:26:03 -08:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT broadcast_lisp.h
|
|
|
|
COMMAND ${CMAKE_BINARY_DIR}/baker ${CMAKE_SOURCE_DIR}/src/broadcast.lisp broadcast_lisp.h broadcast_lisp_library
|
|
|
|
DEPENDS baker src/broadcast.lisp)
|
|
|
|
|
2018-09-02 11:28:34 -07:00
|
|
|
add_executable(repl
|
2018-10-26 09:19:42 -07:00
|
|
|
src/ebisp/repl.c
|
2018-11-25 10:01:48 -08:00
|
|
|
src/ebisp/repl_runtime.c
|
2018-09-02 11:28:34 -07:00
|
|
|
)
|
2019-02-02 12:13:39 -08:00
|
|
|
|
2019-02-02 08:35:27 -08:00
|
|
|
add_executable(baker
|
|
|
|
src/ebisp/baker.c
|
|
|
|
)
|
|
|
|
|
2018-08-27 04:52:11 -07:00
|
|
|
add_executable(nothing_test
|
|
|
|
test/main.c
|
2018-08-28 05:55:01 -07:00
|
|
|
test/test.h
|
|
|
|
test/tokenizer_suite.h
|
2018-08-27 04:52:11 -07:00
|
|
|
)
|
2019-02-02 12:13:39 -08:00
|
|
|
|
|
|
|
target_link_libraries(nothing ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY} m system ebisp)
|
|
|
|
target_link_libraries(nothing_test ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY} m system ebisp)
|
|
|
|
target_link_libraries(repl ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY} m system ebisp)
|
|
|
|
target_link_libraries(ebisp system)
|
|
|
|
target_link_libraries(baker m system ebisp)
|
2017-12-09 21:02:44 -08:00
|
|
|
|
|
|
|
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "CLANG"))
|
2017-12-14 05:40:04 -08:00
|
|
|
set(CMAKE_C_FLAGS
|
|
|
|
"${CMAKE_C_FLAGS} \
|
|
|
|
-Wall \
|
|
|
|
-Werror \
|
|
|
|
-Wextra \
|
|
|
|
-Wconversion \
|
|
|
|
-Wunused \
|
|
|
|
-Wunused-function \
|
|
|
|
-Wunused-label \
|
|
|
|
-Wunused-macros \
|
|
|
|
-Wunused-parameter \
|
|
|
|
-Wunused-value \
|
|
|
|
-Wunused-variable \
|
|
|
|
-Wcast-align \
|
|
|
|
-Wcast-qual \
|
|
|
|
-Wmissing-declarations \
|
|
|
|
-Wredundant-decls \
|
|
|
|
-Wmissing-prototypes \
|
|
|
|
-Wnested-externs \
|
|
|
|
-Wpointer-arith \
|
|
|
|
-Wshadow \
|
|
|
|
-Wstrict-prototypes \
|
|
|
|
-Wwrite-strings \
|
2018-06-02 09:36:23 -07:00
|
|
|
-Wswitch \
|
2018-08-25 10:59:29 -07:00
|
|
|
-Wmissing-field-initializers \
|
2017-12-14 05:40:04 -08:00
|
|
|
-fno-common \
|
|
|
|
-pedantic \
|
|
|
|
-std=c11 \
|
|
|
|
-O3")
|
2017-12-09 21:02:44 -08:00
|
|
|
target_link_libraries(nothing m)
|
|
|
|
endif()
|
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(nothing Imm32 Version winmm)
|
|
|
|
endif()
|
2018-03-16 03:09:39 -07:00
|
|
|
|
2018-03-22 12:38:49 -07:00
|
|
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/sounds DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
2018-07-08 10:25:33 -07:00
|
|
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/fonts DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
2018-08-28 05:55:01 -07:00
|
|
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test-data DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|