Files
sortui/CMakeLists.txt
T
lyrgb 6f7bd9d964 switched from raw lambda to stepable
couldn't figure out how to handle sortstate, eventually put it into
bsort class. should be split into timeraction and steppable. and there
shouldn't be a random steppedbsort in App
2026-08-05 00:00:26 +02:00

43 lines
1.0 KiB
CMake

cmake_minimum_required(VERSION 4.0)
project(cppout LANGUAGES CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
file(GLOB SOURCE_FILES "src/*.cpp")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include(FetchContent)
FetchContent_Declare(SFML
GIT_REPOSITORY https://github.com/SFML/SFML.git
GIT_TAG 3.1.0
GIT_SHALLOW ON
EXCLUDE_FROM_ALL
SYSTEM)
FetchContent_MakeAvailable(SFML)
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/assets"
"$<TARGET_FILE_DIR:${PROJECT_NAME}>/assets"
COMMENT "copying assets to build dir"
)
if(MSVC)
target_compile_option(${PROJECT_NAME} PRIVATE /W4)
else()
target_compile_options(${PROJECT_NAME} PRIVATE
-Wall
-Wextra
-Wpedantic
)
endif()
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
target_link_libraries(${PROJECT_NAME} PRIVATE SFML::Graphics)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})