Please integrate BUILD_WITH_STATIC_CRT option (Patch included) (Feature #973)


Added by Eugene Khvedchenya almost 14 years ago. Updated almost 14 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:- % Done:

0%

Category:build/install
Target version:-
Difficulty: Pull request:

Description

Hi

Please add BUILD_WITH_STATIC_CRT build option to CMake.
By default, msvc compiler use dynamic linked CRT, however OpenCV can be build as static library. This can be necessary if you want to put all dependencies in one binary. So i believe this will be very useful feature.

I use static OpenCV build to deploy application with statically linked OpenCV in the cloud computing environment and inside the java applet, but i have to manually switch /MD to /MT options in every module. BUILD_WITH_STATIC_CRT option will allow me to use automated build script and make my life easier. To make your life easier too I’ve attached a necessary patch for root CMakeLists file.
Also i've added several fixes in sample applications (fixed linker error "Cannot open videoInput.lib").

Tested build on trunk revision using VS 2010


opencv_build_with_static_crt_integration.patch - Integration patch (1.7 kB) Eugene Khvedchenya, 2011-03-30 10:55 pm

CMakeStaticRuntimeOption.2.cmake (1.9 kB) Eugene Khvedchenya, 2011-04-04 10:39 am

CMakeStaticRuntimeOption.cmake - Updated CMake module (1.9 kB) Eugene Khvedchenya, 2011-04-04 10:40 am


Associated revisions

Revision 572cfc99
Added by Roman Donchenko over 11 years ago

Merge pull request #973 from pengx17:2.4_oclclahe

Revision 13cd0a05
Added by Roman Donchenko over 11 years ago

Merge remote-tracking branch 'origin/2.4'

Original pull requests:
#996 from jet47:gpu-nvcuvid-libraries
#995 from jet47:fix-bug-2985
#999 from snosov1:unreliable-results-fix
#1005 from alekcac:doc_fix
#1004 from jet47:fix-bug-3068
#987 from jet47:bug-3085-fix
#969 from pengx17:2.4_binary_cache
#929 from dominikrose:mingw-libdc1394-2-windows
#1000 from ivan-korolev:fix_sift_bug_2892
#1001 from ivan-korolev:fix_stitching_bug_2405
#998 from asmorkalov:android_cmake_mips_fix
#993 from ivan-korolev:fix_videostab_bug_3023
#988 from snosov1:3071-fix
#986 from pengx17:2.4_initiated_context
#982 from pengx17:2.4_fix_two_bugs
#981 from SeninAndrew:ximea_camera_support_fix
#991 from asmorkalov:android_javadoc_fix
#972 from jet47:mog2-params-bug-2168
#980 from SpecLad:include-config
#973 from pengx17:2.4_oclclahe
#903 from aks2:2.4
#968 from asmorkalov:android_na_cproj_fix
#971 from SpecLad:matchers-ctor
#970 from asmorkalov:dshow_valid_check_fix
#965 from apavlenko:fix_java_empty_mats

Conflicts:
cmake/OpenCVModule.cmake
modules/core/src/matmul.cpp
modules/gpu/CMakeLists.txt
modules/ocl/include/opencv2/ocl/ocl.hpp
modules/ocl/perf/perf_imgproc.cpp
modules/ocl/src/imgproc.cpp
modules/ocl/src/initialization.cpp
modules/stitching/src/matchers.cpp
modules/video/src/video_init.cpp
modules/videostab/src/global_motion.cpp

History

Updated by David Ullmann almost 14 years ago

I strongly support this request!

Updated by Eugene Khvedchenya almost 14 years ago

Updated attached CMake module - now INSTALL target succeed for both debug/release configurations for executables as well.

Updated by Alexander Shishkov almost 14 years ago

applied in rev #5358. Thanks for your patch!

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Also available in: Atom PDF