CMake Error: The source directory “opencv安装目录“ does not appear to con
CMake Error: The source directory"opencv安装目录 "does not appear to contain CMakeLists.txt.我居然被这个错误困扰了一下午,emmm,脑壳大。解决办法:源码安装opencv的时候,到cmake那一句的时候,将这一句命令:cmake -DCMAKE_BUILD_TYPE=Release -DWITH_FFMPEG=ON
CMake Error: The source directory "opencv安装目录 "does not appear to contain CMakeLists.txt.
我居然被这个错误困扰了一下午,emmm,脑壳大。
解决办法:
源码安装opencv的时候,到cmake那一句的时候,
将这一句命令:
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_FFMPEG=ON -DCMAKE_INSTALL_PREFIX=/home/你的用户名/software/opencv-3.4.0 -DCMAKE_FLAGS=VALUES -DPYTHON3_EXECUTABLE=
(
w
h
i
c
h
p
y
t
h
o
n
)
−
D
P
Y
T
H
O
N
3
I
N
C
L
U
D
E
D
I
R
=
(which python) -DPYTHON3_INCLUDE_DIR=
(whichpython)−DPYTHON3INCLUDEDIR=(python -c “from distutils.sysconfig import get_python_inc; print(get_python_inc())”)
改为:
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_FFMPEG=ON -DCMAKE_INSTALL_PREFIX=/home/你的用户名/software/opencv-3.4.0 … -DCMAKE_FLAGS=VALUES -DPYTHON3_EXECUTABLE=
(
w
h
i
c
h
p
y
t
h
o
n
)
−
D
P
Y
T
H
O
N
3
I
N
C
L
U
D
E
D
I
R
=
(which python) -DPYTHON3_INCLUDE_DIR=
(whichpython)−DPYTHON3INCLUDEDIR=(python -c “from distutils.sysconfig import get_python_inc; print(get_python_inc())”)
没错就是多了两个 … 因为你是在build目录下cmake的,所以CMAKE_INSTALL_PREFIX这个应该是指向上一级目录啊啊啊啊。
更多推荐
所有评论(0)