summary refs log tree commit diff stats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-05-10 19:27:59 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-05-17 15:39:39 -0400
commit4bbfeae42a1245b1b84e8847787d7643e6a6f2cf (patch)
tree8dd65d9ab0cfffd0e79f670c94b035c5eebfa934 /CMakeLists.txt
parent67b24a8ddd89371cfb944c5b441c852f0edc23b1 (diff)
downloadtherapy-4bbfeae42a1245b1b84e8847787d7643e6a6f2cf.tar.gz
therapy-4bbfeae42a1245b1b84e8847787d7643e6a6f2cf.tar.bz2
therapy-4bbfeae42a1245b1b84e8847787d7643e6a6f2cf.zip
Started integrating Lua as a scripting engine
Currently moving platforms are able to have their movement controlled by a script rather than by XML, which is probably a better implementation and scales better to other things. The scripts, instead of using the components as state, use the stack as state. In this way, they pretend to be multithreaded. For instance, the moving platform calls moveRight and then moveLeft. Both of those functions internally make calls that say to wait until the next tick. When the AutomatingSystem ticks, it continues execution of all scripts (sequentially, of course) until they ask for the next tick again. This is implemented using coroutines.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 04ca668..fbc843c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -16,6 +16,7 @@ find_package(GLEW REQUIRED)
16find_package(portaudio REQUIRED) 16find_package(portaudio REQUIRED)
17find_package(libsndfile REQUIRED) 17find_package(libsndfile REQUIRED)
18find_package(libxml2 REQUIRED) 18find_package(libxml2 REQUIRED)
19find_package(lua REQUIRED)
19 20
20IF(APPLE) 21IF(APPLE)
21 FIND_LIBRARY(COCOA_LIBRARY Cocoa) 22 FIND_LIBRARY(COCOA_LIBRARY Cocoa)
@@ -32,6 +33,7 @@ set(ALL_LIBS
32 ${PORTAUDIO_LIBRARIES} 33 ${PORTAUDIO_LIBRARIES}
33 ${LIBSNDFILE_LIBRARY} 34 ${LIBSNDFILE_LIBRARY}
34 ${LIBXML2_LIBRARIES} 35 ${LIBXML2_LIBRARIES}
36 ${LUA_LIBRARIES}
35 ${EXTRA_LIBS} 37 ${EXTRA_LIBS}
36) 38)
37 39
@@ -40,6 +42,7 @@ include_directories(
40 ${GLFW_INCLUDE_DIRS} 42 ${GLFW_INCLUDE_DIRS}
41 ${OPENGL_INCLUDE_DIRS} 43 ${OPENGL_INCLUDE_DIRS}
42 ${GLEW_INCLUDE_DIRS} 44 ${GLEW_INCLUDE_DIRS}
45 ${LUA_INCLUDE_DIRS}
43 src 46 src
44 vendor 47 vendor
45) 48)
@@ -71,6 +74,6 @@ add_executable(Aromatherapy
71 vendor/stb_image.cpp 74 vendor/stb_image.cpp
72) 75)
73 76
74set_property(TARGET Aromatherapy PROPERTY CXX_STANDARD 11) 77set_property(TARGET Aromatherapy PROPERTY CXX_STANDARD 17)
75set_property(TARGET Aromatherapy PROPERTY CXX_STANDARD_REQUIRED ON) 78set_property(TARGET Aromatherapy PROPERTY CXX_STANDARD_REQUIRED ON)
76target_link_libraries(Aromatherapy ${ALL_LIBS}) 79target_link_libraries(Aromatherapy ${ALL_LIBS})