aboutsummaryrefslogtreecommitdiff
path: root/build-instructions.md
blob: 1a8980d4a1e76de3966fb67797f6d70fcc303744 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# How to build / run the project

The project uses the CMake build system generator. there are several stages for
building the project, running the program, and creating an installer.

### Installing dependencies

#### Upgrade GCC (if you don't have version 6)
`sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y`

`sudo apt-get update -qq`

`sudo apt-get install -qq g++-6`

`sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6`

#### Boost

Note: this doesn't have to (and probably shouldn't) be run from within the project, unlike the other commands listed here.

`sudo wget -O boost_1_63_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz/download`

`sudo tar xzvf boost_1_63_0.tar.gz`

`cd boost_1_63_0/`

`sudo ./bootstrap.sh --with-libraries=log`

`sudo ./b2 link=shared threading=multi toolset=gcc optimization=space`

`sudo ./b2 install`

`cd ..`

### Generate Build System

`cmake [-G "CodeBlocks - Unix Makefiles"] -D CMAKE_CXX_COMPILER=g++-6 -DCMAKE_BUILD_TYPE=[DEBUG|RELEASE] -Bcmake-build-[debug|release] -H.`

### Build project

`cmake --build cmake-build-[debug|release]`

### Run executable

`./cmake-build-[debug|release]/bin/solvitaire`

### Create project installer

`cpack --config cmake-build-[debug|release]/CPackConfig.cmake`

## A Note on CLion

If CLion complains that a dependency is missing, you may need to run the conan
install command, and then in Clion run 'File->Reload CMake Project