设置 CMAKE_PREFIX_PATH 时出现 qt5 错误

设置 CMAKE_PREFIX_PATH 时出现 qt5 错误

为什么我会收到此错误

-bash: syntax error near unexpected token `CMAKE_PREFIX_PATH'

运行此命令时

kv@kv:~/catkin_ws$ set(CMAKE_PREFIX_PATH $ENV{HOME}/Qt/5.5/gcc_64)

答案1

可能是

cmake -DCMAKE_PREFIX_PATH="$HOME/Qt/5.5/gcc_64" my-src-dir/

相关内容