How to link opencv static libs via variable ${OpenCV_LIBS} in cmake -
i build both shared , static of opencv (i need static , shared version). sometime want link static opencv libs via ${opencv_libs} in cmake. doesn't work when use ${opencv_libs}. there variable link opencv static version libs
you can directly link static libs want using (assuming have set system variable opencv_dir
, want link opencv_core
lib of opencv-v2.4.8 under vs2013 x86):
target_link_libraries(youproj $env{opencv_dir}/x86/vc12/staticlib/opencv_core248.lib)
Comments
Post a Comment