From 4da7be39827ea5888ef9c97b1aadf61b0d76347c Mon Sep 17 00:00:00 2001 From: Silas Bartha Date: Fri, 7 Feb 2025 11:27:18 -0500 Subject: initial commit (lol) --- mons_exe/CMakeLists.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 mons_exe/CMakeLists.txt (limited to 'mons_exe/CMakeLists.txt') diff --git a/mons_exe/CMakeLists.txt b/mons_exe/CMakeLists.txt new file mode 100644 index 0000000..103d1d4 --- /dev/null +++ b/mons_exe/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.14) +project(mons_exe LANGUAGES C) +set(CMAKE_C_STANDARD 99) +set(CMAKE_EXPORT_COMPILE_COMMANDS true) +set(CMAKE_BUILD_TYPE "Debug") + +add_custom_target(hexdump_embeds + ./embed_headers.sh + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" +) + +add_executable(mons_exe + ./src/main.c + ./src/input.c +) + +target_include_directories(mons_exe PUBLIC + "$/include" + "$" +) +target_compile_options(mons_exe PRIVATE -coverage) +target_link_options(mons_exe PRIVATE -coverage) +target_link_libraries(mons_exe PUBLIC mons_3d mons_gltf X11) +add_dependencies(mons_exe hexdump_embeds) + +include(CTest) + +function(TESTCASE NAME) + add_executable(test_${NAME} ./tests/${NAME}.c) + target_link_libraries(test_${NAME} PUBLIC mons_exe) + add_test( + NAME ${NAME} + COMMAND $ + ) +endfunction() + -- cgit v1.2.3