Skip to content

CMake: Add CMakeLists.txt#45

Open
1480c1 wants to merge 1 commit into
jabcode:masterfrom
1480c1:cmake
Open

CMake: Add CMakeLists.txt#45
1480c1 wants to merge 1 commit into
jabcode:masterfrom
1480c1:cmake

Conversation

@1480c1

@1480c1 1480c1 commented Aug 7, 2020

Copy link
Copy Markdown

Allows for easy building using cmake and a generator of the builder's choosing

Can generate Unix Makefiles or Visual Studio sln through the -G parameter
(-G"Unix Makefiles" or -G"Visual Studio 16 2019" -A x64)

example using Ninja (Another Makefile like system)

cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
cmake --build build --target install

CMake 3.5(.1) was chosen due it being available by default on Ubuntu 16.04

An alternative CMake version that can be targeted is 2.8.12(.2) since that is what is available on Centos 6.10 and Ubuntu 14.04 by default.
Although this is not recommended due to how old that is and also the lack of features it will have.
Plus the docs for cmake < 3.0 are hard to get to in general

I haven't added certain parts from the Makefiles like the zlib since it wasn't needed at all it seems and also adding in the prebuilt external libraries since it's not really something you would normally need, it can be added if necessary

Allows for easy building using cmake and a generator of the builder's choosing

Can generate Unix Makefiles or Visual Studio sln through the -G parameter
(`-G"Unix Makefiles"` or `-G"Visual Studio 16 2019" -A x64`)

example using Ninja (Another Makefile like system)

```bash
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
cmake --build build --target install
```

CMake 3.5(.1) was chosen due it being available by default on Ubuntu 16.04

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant