Generalise build system

This commit is contained in:
K Tyl 2020-06-03 01:19:20 +01:00
parent 53326d6ff1
commit c330c8b760
7 changed files with 12 additions and 1 deletions

0
.gitignore vendored Normal file → Executable file
View File

7
CMakeLists.txt Normal file → Executable file
View File

@ -2,5 +2,10 @@ cmake_minimum_required(VERSION 3.10)
project(flark)
add_executable(flark main.cpp vec3.h colour.h)
file(GLOB flark_src
"src/*.h"
"src/*.cpp"
)
add_executable(flark ${flark_src})

0
README.md Normal file → Executable file
View File

6
run.sh
View File

@ -2,6 +2,12 @@ bin=./flark
output=image.ppm
viewer=$(which feh)
if [ -f $bin ];
then
echo "Removing old binary"
rm $bin
fi
# generate makefile
cmake .

0
colour.h → src/colour.h Normal file → Executable file
View File

0
main.cpp → src/main.cpp Normal file → Executable file
View File

0
vec3.h → src/vec3.h Normal file → Executable file
View File