From e3047956229d3ed90885801463ef19affeeaa630 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 12 Jan 2017 19:14:51 +0300 Subject: [PATCH] cmake: add defines to enable useful macroses --- cmake/OpenCVModule.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index 925731b7c6..c5a81b2422 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -170,6 +170,10 @@ macro(ocv_add_module _name) return() # extra protection from redefinition endif() project(${the_module}) + add_definitions( + -D_USE_MATH_DEFINES # M_PI constant in MSVS + -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS # to use C libraries from C++ code (ffmpeg) + ) endif(OPENCV_INITIAL_PASS) endmacro()