Commit b7630a08 authored by Alexander Alekhin's avatar Alexander Alekhin

cmake: add global defines to enable useful macros

parent f4fdd94c
...@@ -224,6 +224,10 @@ macro(ocv_add_module _name) ...@@ -224,6 +224,10 @@ macro(ocv_add_module _name)
endif() endif()
if((NOT OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD AND NOT ${the_module} STREQUAL opencv_world) OR NOT ${BUILD_opencv_world}) if((NOT OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD AND NOT ${the_module} STREQUAL opencv_world) OR NOT ${BUILD_opencv_world})
project(${the_module}) 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() endif()
endif() endif()
endmacro() endmacro()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment