blob: 35f9563a43fcfc4390faf02843a47d7d07154deb (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
--- CMakeLists.txt.orig 2021-09-07 15:26:53 UTC
+++ CMakeLists.txt
@@ -6,8 +6,6 @@ include(GNUInstallDirs)
if(MSVC)
set(COMPILE_DEFINITIONS /O2 /fp:fast)
set(COMPILE_OPTIONS )
-else()
- set(COMPILE_OPTIONS -Ofast)
endif()
#####################
@@ -59,7 +57,7 @@ else()
target_compile_definitions(SoundTouch PRIVATE SOUNDTOUCH_FLOAT_SAMPLES)
endif()
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7.*|armv8.*)$")
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7.*|armv8.*|aarch64.*)$")
set(NEON_CPU ON)
else()
set(NEON_CPU OFF)
@@ -68,9 +66,14 @@ endif()
option(NEON "Use ARM Neon SIMD instructions if in ARM CPU" ON)
if(${NEON} AND ${NEON_CPU})
target_compile_definitions(SoundTouch PRIVATE SOUNDTOUCH_USE_NEON)
- target_compile_options(SoundTouch PRIVATE -mfpu=neon)
endif()
+find_package(OpenMP)
+option(OPENMP "Use parallel multicore calculation through OpenMP" ON)
+if(OPENMP AND OPENMP_FOUND)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+endif()
+
install(
FILES
include/BPMDetect.h
@@ -105,6 +108,9 @@ if(SOUNDSTRETCH)
target_compile_definitions(soundstretch PRIVATE ${COMPILE_DEFINITIONS})
target_compile_options(soundstretch PRIVATE ${COMPILE_OPTIONS})
target_link_libraries(soundstretch PRIVATE SoundTouch)
+ if(INTEGER_SAMPLES)
+ target_compile_definitions(soundstretch PRIVATE SOUNDTOUCH_INTEGER_SAMPLES)
+ endif()
install(TARGETS soundstretch
DESTINATION bin
|