prototype1/CMakeLists.txt

29 lines
1003 B
CMake

cmake_minimum_required(VERSION 3.30)
project(prototype1 C)
#include_directories(${CMAKE_SOURCE_DIR})
set(CMAKE_C_FLAGS "-Wall -Wextra -Werror=implicit-function-declaration -Werror=return-type --std=c99 -g -ggdb -O0")
add_compile_definitions(_POSIX_C_SOURCE=200112L)
add_compile_definitions(_GNU_SOURCE)
add_compile_options(-fno-trapping-math)
add_executable(0_test src/l1/tests/t0.c)
add_executable(1_test src/l1/tests/t1.c)
add_executable(codegen_l2 src/l2/codegen.c)
add_executable(0_render_test src/l2/tests/r0/r0.c)
target_link_libraries(0_render_test -lvulkan -lX11 -lm)
add_executable(0_render_test_tex_init_prep src/l2/tests/r0/r0_tex_init_prep.c)
target_link_libraries(0_render_test_tex_init_prep -lm)
add_executable(0_play_test src/l3/tests/p0.c)
target_link_libraries(0_play_test -lncurses)
# Recursively collect all .h files in the src directory.
file(GLOB_RECURSE HEADER_FILES "${CMAKE_SOURCE_DIR}/src/*.h")
# Do not build utku
add_executable(utka src/l1/tests/t0.c ${HEADER_FILES})