forked from adamstark/AudioFile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (34 loc) · 1.58 KB
/
CMakeLists.txt
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#===============================================================================
cmake_minimum_required (VERSION 3.12)
project ("AudioFile" VERSION 1.1.1
DESCRIPTION "A simple C++ library for reading and writing audio files."
HOMEPAGE_URL "https://github.com/adamstark/AudioFile")
#===============================================================================
include (GNUInstallDirs)
#===============================================================================
option (BUILD_TESTS "Build tests" ON)
option (BUILD_EXAMPLES "Build examples" ON)
#===============================================================================
add_library (${PROJECT_NAME} INTERFACE)
#===============================================================================
if(MSVC)
# needed for M_PI macro
add_definitions(-D_USE_MATH_DEFINES)
endif()
#===============================================================================
target_include_directories (
${PROJECT_NAME}
INTERFACE $<BUILD_INTERFACE:${${PROJECT_NAME}_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
#===============================================================================
target_compile_features (${PROJECT_NAME} INTERFACE cxx_std_17)
#===============================================================================
if (BUILD_EXAMPLES)
add_subdirectory (examples)
endif ()
if (BUILD_TESTS)
enable_testing()
add_subdirectory (tests)
endif ()
#===============================================================================
set (CMAKE_SUPPRESS_REGENERATION true)