Skip to content

Commit dc1502a

Browse files
committed
Merge pull request opencv#8001 from alalek:c_defines
2 parents bb5c40d + b7630a0 commit dc1502a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/OpenCVModule.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ macro(ocv_add_module _name)
224224
endif()
225225
if((NOT OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD AND NOT ${the_module} STREQUAL opencv_world) OR NOT ${BUILD_opencv_world})
226226
project(${the_module})
227+
add_definitions(
228+
-D_USE_MATH_DEFINES # M_PI constant in MSVS
229+
-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS # to use C libraries from C++ code (ffmpeg)
230+
)
227231
endif()
228232
endif()
229233
endmacro()

0 commit comments

Comments
 (0)