Skip to content

Commit 2e608b1

Browse files
authored
Merge pull request opencv#9306 from alalek:cmake_fix_macro
cmake: fix __STDC macros for opencv_world build
2 parents dcc63d7 + 5e32de8 commit 2e608b1

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)