summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSteph Enders <smenders@gmail.com>2022-06-15 23:36:43 -0400
committerSteph Enders <smenders@gmail.com>2022-06-15 23:36:43 -0400
commiteaaf57114cfb74c29f1b0c4e9786bed6d225225c (patch)
tree8f4946942a9f93f2bba8b1c4c39045e8ee02811d /CMakeLists.txt
Initial setup commit
This setups up the project for messing around with C++ and Lua bindings. So far this project just prints the defined dng map and lets you move the character around. What this fails to do is actually provide any reason to use Lua at the moment. So I need to figure out some way of enabling logic on the processing side of things.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..3dcce6a
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,21 @@
+cmake_minimum_required(VERSION 3.23)
+project(dng)
+
+set(CMAKE_CXX_STANDARD 23)
+
+find_package(Lua REQUIRED)
+
+# check what features I use and assert minimum
+if (LUA_VERSION_STRING VERSION_LESS "5.4")
+ message(FATAL_ERROR "Invalid Lau version: ${LUA_VERSION_STRING} - must be >= 5.4")
+endif()
+
+set(SFML_LIBRARIES sfml-system sfml-window sfml-graphics)
+find_package(SFML 2.5 REQUIRED COMPONENTS system window graphics)
+
+#file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/res DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+#file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/maps DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+#file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/include DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+
+add_executable(${PROJECT_NAME} src/main.cpp src/Level.cpp src/Level.h src/Api.h)
+target_link_libraries(${PROJECT_NAME} ${LUA_LIBRARIES} ${SFML_LIBRARIES})