-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtestCMakeLists.txt
32 lines (28 loc) · 1.08 KB
/
testCMakeLists.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
# since on some platforms (windows) automake is not easy to use, this is an
# experimental file to use cmake as build system
#
# - this just builds the shared library (no jack client, no lv2 plugin)
# - shared library version is probably not compatible with automake
#
# do not use this on Linux/macOS/*BSD
cmake_minimum_required (VERSION 3.9)
project (liquidsfz VERSION 0.2.2 DESCRIPTION "sfz sampler")
# need libsndfile
IF (WIN32)
find_package (SndFile REQUIRED)
ELSE()
find_package (PkgConfig REQUIRED)
pkg_search_module (SNDFILE REQUIRED sndfile>=1.0.0)
ENDIF()
link_directories (${SNDFILE_LIBRARY_DIRS})
# shared library
file (GLOB SOURCES lib/*.cc)
add_library (liquidsfz SHARED ${SOURCES})
target_compile_features (liquidsfz PUBLIC cxx_std_17)
target_link_libraries (liquidsfz ${SNDFILE_LIBRARIES})
target_include_directories (liquidsfz PRIVATE ${SNDFILE_INCLUDE_DIRS})
set_target_properties (liquidsfz PROPERTIES
PUBLIC_HEADER lib/liquidsfz.hh)
install (TARGETS liquidsfz
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})