3fb2e2f7a7181cecf3613d9b4a5c0721b7ba0607
[flac.git] / src / flac / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.12)
2
3 check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H)
4 check_include_file("termios.h" HAVE_TERMIOS_H)
5
6 add_compile_definitions(
7     $<$<BOOL:${HAVE_SYS_IOCTL_H}>:HAVE_SYS_IOCTL_H>
8     $<$<BOOL:${HAVE_TERMIOS_H}>:HAVE_TERMIOS_H>)
9
10 add_executable(flac
11     analyze.c
12     decode.c
13     encode.c
14     foreign_metadata.c
15     main.c
16     local_string_utils.c
17     utils.c
18     vorbiscomment.c)
19 target_link_libraries(flac
20     FLAC-static
21     getopt
22     grabbag
23     replaygain_synthesis
24     utf8)
25
26 install(TARGETS flac EXPORT targets
27     RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")