do not define CVAPI_EXPORTS when OpenCV is built statically (thanks to Mika Fischer for the patch)
This commit is contained in:
parent
caa943c85f
commit
35af5dacde
@ -2,7 +2,9 @@
|
||||
macro(define_opencv_module name)
|
||||
|
||||
project(opencv_${name})
|
||||
add_definitions(-DCVAPI_EXPORTS)
|
||||
if (OPENCV_BUILD_SHARED_LIB)
|
||||
add_definitions(-DCVAPI_EXPORTS)
|
||||
endif()
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
||||
|
@ -224,7 +224,9 @@ set(lib_srcs ${highgui_srcs} ${grfmt_srcs})
|
||||
# ----------------------------------------------------------------------------------
|
||||
set(the_target "opencv_highgui")
|
||||
|
||||
add_definitions(-DHIGHGUI_EXPORTS -DCVAPI_EXPORTS)
|
||||
if (OPENCV_BUILD_SHARED_LIB)
|
||||
add_definitions(-DHIGHGUI_EXPORTS -DCVAPI_EXPORTS)
|
||||
endif()
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../core/include"
|
||||
|
Loading…
x
Reference in New Issue
Block a user