多读多写多思考 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

    评论

报告相同问题?

悬赏问题

  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条