From d8aaa00f1ae39108696d336a5deb4533746bfe59 Mon Sep 17 00:00:00 2001 From: fintmc Date: Sun, 6 Oct 2024 14:04:55 +0300 Subject: [PATCH] fix cmake support --- ScuffedMinecraft/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ScuffedMinecraft/CMakeLists.txt b/ScuffedMinecraft/CMakeLists.txt index efba575..716b07e 100644 --- a/ScuffedMinecraft/CMakeLists.txt +++ b/ScuffedMinecraft/CMakeLists.txt @@ -3,6 +3,19 @@ set(CMAKE_CXX_STANDARD 20) project(ScuffedMinecraft) +# output directories +set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) + +# copy assets +add_custom_target(copy_assets ALL + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_SOURCE_DIR}/assets + ${CMAKE_BINARY_DIR}/assets + COMMENT "Copying assets") + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) add_subdirectory(vendor/imgui)