Generalise build system
This commit is contained in:
parent
53326d6ff1
commit
c330c8b760
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
7
CMakeLists.txt
Normal file → Executable file
7
CMakeLists.txt
Normal file → Executable 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})
|
||||
|
||||
|
6
run.sh
6
run.sh
@ -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
0
colour.h → src/colour.h
Normal file → Executable file
0
main.cpp → src/main.cpp
Normal file → Executable file
0
main.cpp → src/main.cpp
Normal file → Executable file
0
vec3.h → src/vec3.h
Normal file → Executable file
0
vec3.h → src/vec3.h
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user