From eaaf57114cfb74c29f1b0c4e9786bed6d225225c Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Wed, 15 Jun 2022 23:36:43 -0400 Subject: 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. --- CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') 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}) -- cgit v1.2.3-54-g00ecf