@ -89,16 +89,16 @@ if(WIN32 AND BUILD_SHARED_LIBS AND MSVC)
add_definitions ( -DLIBPROTOBUF_EXPORTS )
add_definitions ( -DLIBPROTOBUF_EXPORTS )
endif ( )
endif ( )
add_definitions ( -D_GNU_SOURCE=1 )
# add_definitions ( -DGOOGLE_PROTOBUF_NO_THREAD_SAFETY ) # w e d o n ' t n e e d t h r e a d s a f e t y
add_definitions ( -DHAVE_CONFIG_H )
add_definitions ( -D_GNU_SOURCE=1 ) # i t ' s m a y b e u s e f u l
add_definitions ( -DHAVE_CONFIG_H ) # w e w i l l u s e c o n f i g . h
configure_file ( "cmake/config.h.in" "config.h" )
configure_file ( "cmake/config.h.in" "config.h" )
if ( MSVC )
if ( MSVC )
add_definitions ( -D_CRT_SECURE_NO_WARNINGS=1 )
add_definitions ( -D_CRT_SECURE_NO_WARNINGS=1 )
ocv_warnings_disable ( CMAKE_CXX_FLAGS /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /w4398 /w4510 /w4610 /w4244 /w4702 /w4389 )
ocv_warnings_disable ( CMAKE_CXX_FLAGS /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 /wd4702 )
else ( )
else ( )
ocv_warnings_disable ( CMAKE_CXX_FLAGS -Wno-deprecated -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wunused-parameter -Wunused-local-typedefs -Wsign-compare -Wsign-promo -Wundef )
ocv_warnings_disable ( CMAKE_CXX_FLAGS -Wno-deprecated -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wunused-parameter -Wunused-local-typedefs -Wsign-compare -Wsign-promo -Wundef )
ocv_warnings_disable ( CMAKE_C_FLAGS -Wunused-parameter ) # c l a n g
endif ( )
endif ( )
# E a s i e r t o s u p p o r t d i f f e r e n t v e r s i o n s o f p r o t o b u f s
# E a s i e r t o s u p p o r t d i f f e r e n t v e r s i o n s o f p r o t o b u f s
@ -116,6 +116,12 @@ endfunction()
set ( PROTOBUF_ROOT ${ CMAKE_CURRENT_SOURCE_DIR } )
set ( PROTOBUF_ROOT ${ CMAKE_CURRENT_SOURCE_DIR } )
if ( MSVC )
set ( ATOMICOPS_INTERNALS ${ PROTOBUF_ROOT } /src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc )
else ( )
set ( ATOMICOPS_INTERNALS ${ PROTOBUF_ROOT } /src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc )
endif ( )
append_if_exist ( PROTOBUF_SRCS
append_if_exist ( PROTOBUF_SRCS
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / c o m p i l e r / i m p o r t e r . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / c o m p i l e r / i m p o r t e r . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / c o m p i l e r / p a r s e r . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / c o m p i l e r / p a r s e r . c c
@ -139,8 +145,7 @@ append_if_exist(PROTOBUF_SRCS
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / r e f l e c t i o n _ o p s . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / r e f l e c t i o n _ o p s . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / r e p e a t e d _ f i e l d . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / r e p e a t e d _ f i e l d . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s e r v i c e . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s e r v i c e . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s t u b s / a t o m i c o p s _ i n t e r n a l s _ x 8 6 _ g c c . c c
$ { A T O M I C O P S _ I N T E R N A L S }
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s t u b s / a t o m i c o p s _ i n t e r n a l s _ x 8 6 _ m s v c . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s t u b s / c o m m o n . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s t u b s / c o m m o n . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s t u b s / o n c e . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s t u b s / o n c e . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s t u b s / s t r i n g p r i n t f . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s t u b s / s t r i n g p r i n t f . c c
@ -151,7 +156,7 @@ append_if_exist(PROTOBUF_SRCS
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / u n k n o w n _ f i e l d _ s e t . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / u n k n o w n _ f i e l d _ s e t . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / w i r e _ f o r m a t . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / w i r e _ f o r m a t . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / w i r e _ f o r m a t _ l i t e . c c
$ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / w i r e _ f o r m a t _ l i t e . c c
# $ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s t u b s / h a s h . c c
# $ { P R O T O B U F _ R O O T } / s r c / g o o g l e / p r o t o b u f / s t u b s / h a s h . c c
)
)
if ( UNIX AND ( CMAKE_COMPILER_IS_GNUCXX OR CV_ICC ) )
if ( UNIX AND ( CMAKE_COMPILER_IS_GNUCXX OR CV_ICC ) )