Skip to content

Commit 5e32de8

Browse files
committed
cmake: fix __STDC macros for opencv_world build
1 parent 2f4a3e4 commit 5e32de8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmake/OpenCVModule.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ macro(ocv_add_module _name)
223223
if(NOT BUILD_${the_module})
224224
return() # extra protection from redefinition
225225
endif()
226-
if((NOT OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD AND NOT ${the_module} STREQUAL opencv_world) OR NOT ${BUILD_opencv_world})
227-
project(${the_module})
226+
if(NOT OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD OR NOT ${BUILD_opencv_world})
227+
if (NOT ${the_module} STREQUAL opencv_world)
228+
project(${the_module})
229+
endif()
228230
add_definitions(
229231
-D_USE_MATH_DEFINES # M_PI constant in MSVS
230232
-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS # to use C libraries from C++ code (ffmpeg)

0 commit comments

Comments
 (0)