cmake ccmake

Posted live for life ! live for exist

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cmake ccmake相关的知识,希望对你有一定的参考价值。

下载libqrencode源码编译过程
 git clone https://github.com/fukuchi/libqrencode.git

 2001  mkdir build
 2002  cd build/
 2004  cmake ..
 2009  make
 2027  sudo make install
 
 2029  cd ~
 2030  qrencode -o test.png nihao

 2037  sudo apt-get install ccmake
 2038  sudo apt-get install cmake-curses-gui

 2043  cd build/
 2045  ccmake ..
 2046  make
 2047  sudo make install


-------------------------------------------------------------------------------
[email protected]:~/libqrencode/build$ make
Scanning dependencies of target qrencode
[ 10%] Building C object CMakeFiles/qrencode.dir/qrencode.c.o
[ 20%] Building C object CMakeFiles/qrencode.dir/qrinput.c.o
[ 30%] Building C object CMakeFiles/qrencode.dir/bitstream.c.o
[ 40%] Building C object CMakeFiles/qrencode.dir/qrspec.c.o
[ 50%] Building C object CMakeFiles/qrencode.dir/rsecc.c.o
[ 60%] Building C object CMakeFiles/qrencode.dir/split.c.o
[ 70%] Building C object CMakeFiles/qrencode.dir/mask.c.o
[ 80%] Building C object CMakeFiles/qrencode.dir/mqrspec.c.o
[ 90%] Building C object CMakeFiles/qrencode.dir/mmask.c.o
Linking C static library libqrencode.a
[ 90%] Built target qrencode
Scanning dependencies of target qrenc
[100%] Building C object CMakeFiles/qrenc.dir/qrenc.c.o
Linking C executable qrencode
[100%] Built target qrenc
-------
[email protected]:~/libqrencode/build$ make
[ 10%] Building C object CMakeFiles/qrencode.dir/qrencode.c.o
[ 20%] Building C object CMakeFiles/qrencode.dir/qrinput.c.o
[ 30%] Building C object CMakeFiles/qrencode.dir/bitstream.c.o
[ 40%] Building C object CMakeFiles/qrencode.dir/qrspec.c.o
[ 50%] Building C object CMakeFiles/qrencode.dir/rsecc.c.o
[ 60%] Building C object CMakeFiles/qrencode.dir/split.c.o
[ 70%] Building C object CMakeFiles/qrencode.dir/mask.c.o
[ 80%] Building C object CMakeFiles/qrencode.dir/mqrspec.c.o
[ 90%] Building C object CMakeFiles/qrencode.dir/mmask.c.o
Linking C shared library libqrencode.so
[ 90%] Built target qrencode
Linking C executable qrencode
[100%] Built target qrenc
----------------------------------------------------------------------------


[email protected]:~/libqrencode/build$ make
[ 90%] Built target qrencode
[100%] Built target qrenc


-----------------------------------------------------------------------------
[email protected]:~/libqrencode/build$ sudo make install
[sudo] password for wang:
[ 90%] Built target qrencode
[100%] Built target qrenc
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/qrencode
-- Installing: /usr/local/share/man/man1/qrencode.1
-----------------
[email protected]:~/libqrencode/build$ sudo make install
[ 90%] Built target qrencode
[100%] Built target qrenc
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/qrencode
-- Removed runtime path from "/usr/local/bin/qrencode"
-- Up-to-date: /usr/local/share/man/man1/qrencode.1
-- Installing: /usr/local/lib/pkgconfig/libqrencode.pc
-- Installing: /usr/local/lib/libqrencode.so
-- Installing: /usr/local/include/qrencode.h
-------------------------------------------------------------------------

 

This compiles and installs the library and header file to the appropriate directories. By default, /usr/local/lib and /usr/local/include.

You can change the destination directory by passing some options to the configure script. Run "./configure --help" to see the list of options.

It also installs a binary "qrencode" to /usr/local/bin. If you want not to install it, give "--without-tools" option to the configure script.

库:/usr/local/lib

头文件:/usr/local/include

二进制可执行文件:/usr/local/bin

以上是关于cmake ccmake的主要内容,如果未能解决你的问题,请参考以下文章

cmake和makefile区别和cmake指定编译器(cmake -G)

cmake:从内部 .cmake 打印消息

cmake基础教程(13)cmake安装位置前缀CMAKE_INSTALL_PREFIX

make如何指定cmake路径

cmake --- cmake基础

cmake