26 lines
722 B
Text
26 lines
722 B
Text
|
cmake_minimum_required(VERSION 3.21)
|
||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||
|
|
||
|
project(lazier-player)
|
||
|
|
||
|
find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
|
||
|
|
||
|
find_package(PkgConfig REQUIRED)
|
||
|
pkg_check_modules(mpv REQUIRED IMPORTED_TARGET mpv)
|
||
|
|
||
|
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||
|
add_compile_options(-fsanitize=address)
|
||
|
add_link_options(-fsanitize=address)
|
||
|
endif()
|
||
|
|
||
|
add_executable(
|
||
|
lazier-player
|
||
|
main.c
|
||
|
)
|
||
|
|
||
|
target_link_libraries(lazier-player PRIVATE SDL3::SDL3 mpv m)
|
||
|
set_property(TARGET lazier-player PROPERTY C_STANDARD 23)
|
||
|
target_compile_options(lazier-player PRIVATE -Wall -Wextra -Wnull-dereference)
|
||
|
target_include_directories(lazier-player PRIVATE include)
|
||
|
install(TARGETS lazier-player DESTINATION bin)
|