summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2020-11-29 02:08:19 +0100
committerUwe Klotz <uklotz@mixxx.org>2020-11-29 10:33:44 +0100
commit2bde5088a448ddd3000c268db6f160d8cfe5d318 (patch)
tree9b2d8492100c485619fe38102b642a80c7e87b84 /CMakeLists.txt
parent449d994ce58b1b6b78cd6f474f3762fb3e4cacf3 (diff)
MSVC: Define _USE_MATH_DEFINES in CMakeLists.txt
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 52de57bf3d..b4aea98ebc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1004,6 +1004,11 @@ if(APPLE)
endif()
endif()
+# Windows-specific options
+if(MSVC)
+ target_compile_definitions(mixxx-lib PUBLIC _USE_MATH_DEFINES)
+endif()
+
#
# Installation directories
#
@@ -1949,6 +1954,9 @@ target_link_libraries(mixxx-lib PRIVATE ReplayGain)
# Reverb
add_library(Reverb STATIC EXCLUDE_FROM_ALL lib/reverb/Reverb.cc)
+if(MSVC)
+ target_compile_definitions(Reverb PUBLIC _USE_MATH_DEFINES)
+endif()
target_include_directories(Reverb PRIVATE src)
target_link_libraries(Reverb PUBLIC Qt5::Core)
target_include_directories(mixxx-lib SYSTEM PRIVATE lib/reverb)
@@ -1994,6 +2002,9 @@ if(SoundTouch_STATIC)
lib/soundtouch/sse_optimized.cpp
)
target_include_directories(SoundTouch SYSTEM PUBLIC lib)
+ if(MSVC)
+ target_compile_definitions(SoundTouch PUBLIC _USE_MATH_DEFINES)
+ endif()
target_link_libraries(mixxx-lib PUBLIC SoundTouch)
else()
message(STATUS "Linking libSoundTouch dynamically")