Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以从命令行获取目标安装目录?我希望能够执行这样的安装命令:
安装 {一些目的地}
您可以在 CMake 运行时通过设置变量来影响这一点CMAKE_INSTALL_PREFIX。例如
CMAKE_INSTALL_PREFIX
cmake . -DCMAKE_INSTALL_PREFIX=/usr make sudo make install