opencv - specify libstd in cmake generated project -
i have opencv project generates makefiles cmake.
if cmake . && make
, keeps study linking error. figure due selection of libstd
. (i have done experiment writing helloworld opencv project , turns out -libstd=libstdc++
key compiling success).
how can add together switch -libstd=libstdc++
in cmake prject?
in case helpful, scheme osx 10.9
, compiler clang-503.0.40
.
for cmake versions >= 2.8.12, can utilize target_compile_options
along generator expression.
say target called myexe
, can do:
target_compile_options(myexe public $<$<bool:${apple}>:-stdlib=libstdc++>)
opencv cmake libstdc++
No comments:
Post a Comment