Skip to content

Commit 54f65a4

Browse files
authored
Merge pull request opencv#8002 from alalek:c_defines_2.4
(2.4) cmake: add defines to enable useful macroses
2 parents d103c11 + e304795 commit 54f65a4

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
@@ -170,6 +170,10 @@ macro(ocv_add_module _name)
170170
return() # extra protection from redefinition
171171
endif()
172172
project(${the_module})
173+
add_definitions(
174+
-D_USE_MATH_DEFINES # M_PI constant in MSVS
175+
-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS # to use C libraries from C++ code (ffmpeg)
176+
)
173177
endif(OPENCV_INITIAL_PASS)
174178
endmacro()
175179

0 commit comments

Comments
 (0)