Install cmake with SSL

I was working with CMake and found that pre-built setup was not working with secure websites. After looking into issue, I concluded that I have to build it from source with SSL option.

Here it goes instructions of how to build & install cmake after enabling SSL option. These instructions are tested on Ubuntu (14.04.5 LTS) based Linux machine.


Make sure that following packages are installed:

sudo apt-get install openssl libssl-dev qt5-default

Download CMake

wget -O cmake-3.8.2.tar.gz
tar zxvf cmake-3.8.2.tar.gz


issue following command to enable OpenSSL

cd cmake-3.8.2
sed -i '/cmake_options="-DCMAKE_BOOTSTRAP=1"/c\cmake_options="-DCMAKE_BOOTSTRAP=1 -DCMAKE_USE_OPENSSL=ON"' bootstrap


./configure --qt-gui
make -j6
sudo make install

Installation verification

cmake --version

It should print

cmake version 3.8.2

Tip: cmake-gui should open CMake Qt based Configuration dialog.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s