removed OPENCV_BUILD_SHARED_LIB in favor of BUILD_SHARED_LIBS

This commit is contained in:
Alexander Shishkov 2011-05-31 13:17:59 +00:00
parent 926a6bba00
commit 6aabf72bc5
7 changed files with 7 additions and 14 deletions

View File

@ -99,13 +99,6 @@ endif()
# ----------------------------------------------------------------------------
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)")
if(BUILD_SHARED_LIBS)
set(OPENCV_BUILD_SHARED_LIB 1) # For cvconfig.h, etc.
else(BUILD_SHARED_LIBS)
set(OPENCV_BUILD_SHARED_LIB 0)
endif(BUILD_SHARED_LIBS)
# ----------------------------------------------------------------------------
# Variables for cvconfig.h.cmake
# ----------------------------------------------------------------------------

View File

@ -86,7 +86,7 @@ endif(NOT @CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE@ STREQUAL "")
# For OpenCV built as static libs, we need the user to link against
# many more dependencies:
IF (NOT @OPENCV_BUILD_SHARED_LIB@)
IF (NOT @BUILD_SHARED_LIBS@)
# Under static libs, the user of OpenCV needs access to the 3rdparty libs as well:
LINK_DIRECTORIES(@CMAKE_LIB_DIRS_CONFIGCMAKE@/../3rdparty/lib)
if(WIN32)
@ -112,7 +112,7 @@ IF (NOT @OPENCV_BUILD_SHARED_LIB@)
set(OpenCV_LIBS ${OpenCV_LIBS} ${OPENCV_EXTRA_COMPONENTS})
endif(CMAKE_MAJOR_VERSION GREATER 2 OR CMAKE_MINOR_VERSION GREATER 4)
ENDIF(NOT @OPENCV_BUILD_SHARED_LIB@)
ENDIF(NOT @BUILD_SHARED_LIBS@)
# ======================================================

View File

@ -41,7 +41,7 @@ macro(define_opencv_module name)
set_target_properties(${the_target} PROPERTIES FOLDER "modules")
endif()
if (OPENCV_BUILD_SHARED_LIB)
if (BUILD_SHARED_LIBS)
if(MSVC)
set_target_properties(${the_target} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
else()

View File

@ -122,7 +122,7 @@
#cmakedefine HAVE_IPP
/* OpenCV compiled as static or dynamic libs */
#cmakedefine OPENCV_BUILD_SHARED_LIB
#cmakedefine BUILD_SHARED_LIBS
/* Name of package */
#define PACKAGE "${PACKAGE}"

View File

@ -748,7 +748,7 @@ cvGetModuleInfo( const char* name, const char **version, const char **plugin_lis
*plugin_list = plugin_list_buf;
}
#if defined OPENCV_BUILD_SHARED_LIB && defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE
#if defined BUILD_SHARED_LIBS && defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID )
{
if( fdwReason == DLL_THREAD_DETACH || fdwReason == DLL_PROCESS_DETACH )

View File

@ -68,7 +68,7 @@ if (HAVE_CUDA)
string(REPLACE "/EHsc-" "/EHs" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
endif()
if (OPENCV_BUILD_SHARED_LIB)
if (BUILD_SHARED_LIBS)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;-DCVAPI_EXPORTS")
endif()

View File

@ -244,7 +244,7 @@ set(lib_srcs ${highgui_srcs} ${grfmt_srcs})
# ----------------------------------------------------------------------------------
set(the_target "opencv_highgui")
if (OPENCV_BUILD_SHARED_LIB)
if (BUILD_SHARED_LIBS)
add_definitions(-DHIGHGUI_EXPORTS -DCVAPI_EXPORTS)
endif()