aboutsummaryrefslogtreecommitdiffstats
path: root/app/unisono/CMakeLists.txt
blob: 8a4435447d8a1f67cc358c587d297a75862a61db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
cmake_minimum_required(VERSION 3.12)

project(unisono)
set (CMAKE_C_STANDARD 99)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fsanitize=address -fno-omit-frame-pointer")

find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
	pkg_check_modules(LIBSNDFILE_PKGCONF sndfile)
endif(PKG_CONFIG_FOUND)

find_path(LIBSNDFILE_INCLUDE_DIR
	NAMES sndfile.h
	PATHS ${LIBSNDFILE_PKGCONF_INCLUDE_DIRS}
)

find_library(LIBSNDFILE_LIBRARY
	NAMES sndfile libsndfile-1
	PATHS ${LIBSNDFILE_PKGCONF_LIBRARY_DIRS}
)

message(STATUS "sndfile include dirs path: ${LIBSNDFILE_INCLUDE_DIR}")
message(STATUS "sndfile libs path: ${LIBSNDFILE_LIBRARY}")

add_executable(unisono "main.c")
include_directories(${LIBSNDFILE_INCLUDE_DIRS})
target_link_libraries(unisono PRIVATE ${LIBSNDFILE_LIBRARY})