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") execute_process( COMMAND pkg-config --cflags libpipewire-0.3 OUTPUT_VARIABLE LIBPIPEWIRE_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ) execute_process( COMMAND pkg-config --libs libpipewire-0.3 OUTPUT_VARIABLE LIBPIPEWIRE_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE ) #add_compile_options("-I/nix/store/2hm4rjvywd00p417y43i9rzx8v793qi0-pipewire-1.4.5-dev/include/pipewire-0.3 -I/nix/store/2hm4rjvywd00p417y43i9rzx8v793qi0-pipewire-1.4.5-dev/include/spa-0.2") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \ -I /nix/store/2hm4rjvywd00p417y43i9rzx8v793qi0-pipewire-1.4.5-dev/include/pipewire-0.3 \ -I /nix/store/2hm4rjvywd00p417y43i9rzx8v793qi0-pipewire-1.4.5-dev/include/spa-0.2 ") add_compile_definitions(_POSIX_C_SOURCE=200112L) add_compile_definitions(_GNU_SOURCE) add_compile_options(-fno-trapping-math) #add_executable(codegen_l1 src/l1/codegen/codegen.c) #target_compile_definitions(codegen_l1 # PRIVATE PROTOTYPE1_L1_CODEGEN_BOOTSTRAP_USE_CHICKEN_VECU8) 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/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(1_render_test src/l2/tests/r1/r1.c gen/l_wl_protocols/xdg-shell-private.c) target_link_libraries(1_render_test -lwayland-client -lrt -lm -lxkbcommon) add_executable(2a_render_test src/l2/tests/r2/r2a.c gen/l_wl_protocols/xdg-shell-private.c) target_link_libraries(2a_render_test ${LIBPIPEWIRE_LIBS} -lwayland-client -lrt -lm -lxkbcommon) add_executable(2b_render_test src/l2/tests/r2/r2b.c) target_link_libraries(2b_render_test ${LIBPIPEWIRE_LIBS} -lm) add_executable(3_render_test src/l2/tests/r3/r3.c gen/l_wl_protocols/xdg-shell-private.c) target_link_libraries(3_render_test -lwayland-client -lm -lvulkan -lxkbcommon) #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})