OpenCV compliation on linux: how to feed to it specific zlib lib?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 15:24:39

问题


I want to compile OpenCV with same zlib as I use for compilation of Boost Iostreams (not system default one). I want to compile OpenCV as static lib, having zlib compiled as static lib. Currently I use something like :

 ../$CMAKE_PATH -DCMAKE_INSTALL_PREFIX=./$OPENCV_INSTALL_SUBDIR -DBUILD_WITH_STATIC_CRT=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_PYTHON_SUPPORT=OFF -DOPENCV_EXTRA_C_FLAGS=-fPIC -DOPENCV_BUILD_3RDPARTY_LIBS=TRUE
make
make install
echo Done! 

I wonder: having some $ZLIB_HEADERS and $ZLIB_LIB_FILES_FOLDER path strings how to feed them into cmake to get OpenCV compiled with built by me zlib?


回答1:


Please try cmake-gui or ccmake. Make sure to toggle advanced mode On (press t in ccmake). You will find ZLIB_LIBRARY and ZLIB_INCLUDE_DIR.



来源:https://stackoverflow.com/questions/8236028/opencv-compliation-on-linux-how-to-feed-to-it-specific-zlib-lib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!