Сборка OpenCV как статических библиотек
Может быть, я что-то упускаю, но я не могу собрать статические библиотеки opencv.
Настроить:
Kubuntu 12.04
gcc 4.6.3
сделать 3,81
cmake 2.8.7
opencv 2.4.6.1 (последняя доступная на сайте)
Я делаю всю работу вручную. Я попробовал с cmake-gui безуспешно.
Я делаю то, что написано.
$ cmake -D CMAKE_BUILD_TYPE = RELEASE -D CMAKE_INSTALL_PREFIX = / usr / local -D BUILD_PYTHON_SUPPORT = ON -D WITH_QT = ON -D BUILD_SHARED_LIBRARIES = OFF ..
(Я также пытался с BUILD_SHARED_LIBRARIES = НЕТ)
Что я получаю (для ядра, например):
libopencv_core.solibopencv_core.so.2.4libopencv_core.so.2.4.6libopencv_core_pch_dephelp.aЧестно говоря, я ожидалlibopencv_core.a.
Я новичок в сборке пакетов / библиотек на Linux. Я уверен, что что-то сделал не так, но я не знаю что. Также я не хочу использовать динамические библиотеки ...
Спасибо за вашу помощь!
РЕДАКТИРОВАТЬ Удалено пустое пространство между -D ... в командной строке cmake
Result:
-- General configuration for OpenCV 2.4.6.1 =====================================
-- Version control: unknown
--
-- Platform:
-- Host: Linux 3.2.0-51-generic x86_64
-- CMake: 2.8.7
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: RELEASE
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 4.6)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG -ggdb3
-- C Compiler: /usr/bin/gcc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG -ggdb3
-- Linker flags (Release):
-- Linker flags (Debug):
-- Precompiled headers: YES
--
-- OpenCV modules:
-- To be built: core imgproc flann highgui features2d calib3d ml video objdetect contrib photo legacy gpu nonfree java python stitching superres ts videostab
...
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_PYTHON_SUPPORT
BUILD_SHARED_LIBRARIES
Я все еще вижуСоздан как динамический libs ?: ДА и это говорит мне, что это не заботится оBUILD_SHARED_LIBRARIES переменная!