• 6430阅读
  • 0回复

[讨论]如何编译.cmake文件 [复制链接]

上一主题 下一主题
离线xiumingjun
 

只看楼主 倒序阅读 楼主  发表于: 2012-05-06

如图所示,我在网上下载了一个库的源代码,想把它编译成库,调用的时候直接调用库就行了。
但是下载的压缩包中没有需要编译所需要的Cmakelists.txt,只有一个rivlib-config.cmake文件,请教各位高手应该如何编译成库。
它给的帮助文档里说是要知道 PATH之类的,也每看明白。不知到该怎么弄……
它的帮助文档如下:
The library should be copied to a convenient place on the harddrive, where it can be found by the compiler. Whether you make the
library part of your project or use it as a system wide library is up to you.
After unpacking the downloaded files you should have a directory structure similar to:
/rivlib_rootdir/
.....................
doc/
.............................
html/
........................
index.html
...............
rivlib.pdf
...................
miniboost-1_35/.....................
redist/.............................
'processor'-'platform'-'compiler'/..
bin/
.........................
include/
.....................
lib/
.........................
examples/
........................
The RiVLib root directory.
The documentation directory.
HTML documentation.
Start file for documentation.
Documentation in PDF format.
Root of the miniboost files.
Redistribuables for runtime support.
Compiler / platform specific parts.
The directory for executable programs.
The directory for compiler includes.
The library subdirectory.
Example files.
The name /rivlib_rootdir/ is of course only an example. You may choose any directory name your compiler is able to use.
The binary subdirectory contains a couple of utility programs that may be useful during development but also as part of the final
application software.
For using RiVLib with C++ you will need to configure your compile environment to
• find the include/ directory and
3
Installation
• the 'processor'-'platform'-'compiler'/lib subdirectory.
• Optionally you may need to specify the include directory for std::tr1.
If your compiler does not have built in support for std::tr1 support and you decide to use either miniboost or boost, the include
directories you need to specify are the boost_root/ directory and the boost_root/boost/tr1 subdirectory.
Since C++ requires libraries that are matching the compiler, RiVLib provides a set of variants for various compilers. If your compiler
cannot be found in the list, please contact <support@riegl.com> to find out if we can add support for your compiler.
For using RiVLib as a DLL (or shared object) at minimum you will need the respective DLL. An import library and a corresponding
C include header are provided in the set of files.


快速回复
限100 字节
 
上一个 下一个