linux cmake gui使用教程,ubuntu - Linux的CMake GUI在哪里? - Ubuntu问答

First of all download the source from here: https://cmake.org/download/

More specificly for Ubuntu 14.04 or higher, 64 bit: https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz

Download it to the following directory (or any directory you like!) /opt/dev-tools-sources

Unzip it there, using gui or command line $tar -zxvf cmake-3.5.2.tar.gz 1 $tar -zxvf cmake-3.5.2.tar.gz

You should have now a folder like this /opt/dev-tools-sources/cmake-3.5.2 1

/opt/dev-tools-sources/cmake-3.5.2

Go to this folder $cd /opt/dev-tools-sources/cmake-3.5.2 1 $cd /opt/dev-tools-sources/cmake-3.5.2

Install openssl to allow CMAKE have access to ssl protected websites if it needs to download extra files $sudo apt install openssl libssl-dev 1 $sudo apt install openssl libssl-dev

Edit the bootstrap file and change the line: cmake_options=”-DCMAKE_BOOTSTRAP=1″ 1

cmake_options=”-DCMAKE_BOOTSTRAP=1″

To this cmake_options=”-DCMAKE_BOOTSTRAP=1 -DCMAKE_USE_OPENSSL=ON” 1

cmake_options=”-DCMAKE_BOOTSTRAP=1 -DCMAKE_USE_OPENSSL=ON”

If you want cmake-gui, you will need qt4 libs an ncurses $sudo apt install libqt4-dev qt4-dev-tools libncurses5-dev 1 $sudo apt install libqt4-dev qt4-dev-tools libncurses5-dev

Run the configuration (you need to have gcc and g++ 4.7 or higher installed. I recommend 4.8.4 or higher actually!) $./configure –qt-gui 1 $./configure –qt-gui

Make sure in the generated CMakeCache.txt, GUI is set to TRUE, open CMakeCache.txt with any editor and check the following line: BUILD_QtDialog:BOOL=ON 1 BUILD_QtDialog:BOOL=ON

If it was OFF or 0, make it ON or 1

It is time to build executables and libraries from source: $make -j2 1 $make -j2

Now, install: $sudo make install 1 $sudo make install

Confirm you got gui version also $cmake-gui 1 $cmake-gui

ENJOY!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值