Skip to content

Commit d46d74c

Browse files
committed
Add CMake build notes
1 parent da13f71 commit d46d74c

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

README.md

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,53 @@ This is the successor to [PushingVoxelsForward](https://github.com/Lin20/Pushing
66

77
## Building and Running
88

9-
Only 64-bit building is supported on Windows using Visual Studio 2017, but with a little extra work it can be used to run on Linux and even 32-bit architectures. It uses the following external libraries:
9+
You can use CMake or the provided 64-bit Visual Studio 2017 solution.
1010

11-
* [glew](http://glew.sourceforge.net/)
12-
* [glfw](http://www.glfw.org/)
11+
### Dependencies
12+
13+
* [GLEW](http://glew.sourceforge.net/)
14+
* [GLFW](http://www.glfw.org/)
1315
* [Vc](https://github.com/VcDevel/Vc) (currently not actually used)
1416
* [FastNoiseSIMD](https://github.com/Auburns/FastNoiseSIMD)
1517

18+
### CMake
19+
20+
So far only 64-bit building is tested on Windows using Visual Studio 2017.
21+
22+
The custom Find\* CMake modules are rather minimal:
23+
24+
* [FindGLM.cmake](cmake/Modules/FindGLM.cmake)
25+
* [FindGLFW.cmake](cmake/Modules/FindGLFW.cmake)
26+
* [FindFastNoiseSIMD.cmake](cmake/Modules/FindFastNoiseSIMD.cmake)
27+
28+
A slightly modified version of [cmake-precompiled-header](https://github.com/larsch/cmake-precompiled-header) is used.
29+
30+
#### [GLFW](http://www.glfw.org/) & [FastNoiseSIMD](https://github.com/Auburns/FastNoiseSIMD)
31+
32+
To support multi-configuration generators (e.g. Visual Studio 2017),
33+
FindGLFW and FindFastNoiseSIMD expect separate "lib/Debug" and "lib/Release" directories
34+
or a "d"-postfix for the debug library.
35+
36+
#### [Vc](https://github.com/VcDevel/Vc)
37+
38+
You may also want to change your
39+
[VcConfig](https://github.com/VcDevel/Vc/blob/eef0f1f0588a06fa28cfd0e8810472db5e610ebe/cmake/VcConfig.cmake.in)
40+
file from
41+
42+
```C++
43+
find_library(Vc_LIBRARIES Vc PATHS "${Vc_LIB_DIR}" NO_DEFAULT_PATH)
44+
```
45+
46+
to something like
47+
48+
```C++
49+
find_library(Vc_LIBRARY_DEBUG Vcd PATHS "${Vc_LIB_DIR}" NO_DEFAULT_PATH)
50+
find_library(Vc_LIBRARY_RELEASE Vc PATHS "${Vc_LIB_DIR}" NO_DEFAULT_PATH)
51+
set(Vc_LIBRARIES debug ${Vc_LIBRARY_DEBUG} optimized ${Vc_LIBRARY_RELEASE})
52+
```
53+
54+
to enable multi-configuration support.
55+
1656
## Media
1757

1858
![Colors](https://i.imgur.com/EwPzirl.png)

0 commit comments

Comments
 (0)