多读多写多思考 2016-08-05 11:31 采纳率: 0%
浏览 3140

江湖救急,cmake 怎样生成vs2010项目

有c++源文件 cmake list(好几个) 和cmake文件,如何生成vc2010项目,下面这个是一个说明吧,我怎么完全看不懂

Dependencies

  • Boost
  • OpenCV (only if you want to compile the example programs)

Compilation

The compilation process has been tested on Linux Mint 17.3 and OS X El Capitan.

To compile the program, go into the 'build' directory and enter the following
commands:

$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make

By default, the example programs are compiled. If you want to disable the
compilation of these programs, you must set to 'OFF' the
'libvibe++_COMPILE_EXAMPLES' variable in the cache of CMake. As an alternative,
you can use the following commands instead of the previous ones:

$ cmake -DCMAKE_BUILD_TYPE=Release -Dlibvibe++_COMPILE_EXAMPLES:BOOL=OFF ..
$ make

Note that on OS X, the program will not compile with clang++ (the default
compiler used by CMake). You can for instance use GCC as following (considering
that you installed, for example, GCC 5 with MacPorts):

$ cmake -DCMAKE_CXX_COMPILER=g++-mp-5 -DCMAKE_BUILD_TYPE=Release ..
$ make

or the Intel compiler:

$ cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_BUILD_TYPE=Release ..
$ make

Installation

To install the libvibe++ onto your system after the compilation step, you can
enter the following command (in superuser mode):

make install

or

$ sudo make install

The files will be installed into '/usr/local'.

Compilation of a program using the libvibe++

To compile a program using the libvibe++, you must use the '-lvibe++' linkage
flag.

Execution of a program using the libvibe++

If you encounter the following error:

'error while loading shared libraries: libvibe++.so: cannot open shared object
file: No such file or directory'

check that '/usr/local/lib' is in your library path. If it is not, you can add
it temporarily by entering the following command:

$ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"

  • 写回答

2条回答 默认 最新

  • threenewbee 2016-08-05 11:43
    关注

    安装cmake,然后在命令行中执行就可以了,不需要看懂cmake文件(如果你只是编译,并且cmake文件没有错误的话)。
    参考:http://blog.csdn.net/alex_my/article/details/18982363

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器