Skip to content

Commit 1c38b6b

Browse files
authored
Merge pull request #61 from KTStephano/pr52
Refactoring dependency build
2 parents 51e0a43 + 3a90034 commit 1c38b6b

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ First set up the repo
9797

9898
Build 3rd party dependencies -> should only need to do this once per clone
9999

100+
python3 ./dependency_build.py --assimp
101+
102+
-> LINUX NOTE: If you get an error while building assimp, use your local package manager to install assimp instead. Then re-run the above step as:
103+
100104
python3 ./dependency_build.py
101105

102106
Now build the StratusGFX source
@@ -108,14 +112,11 @@ Now build the StratusGFX source
108112

109113
### Debian Linux
110114

111-
sudo apt install libassimp5
112-
sudo apt install libassimp-dev
113115
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=OFF
114116
cmake --build build/ -j 8
115117

116118
### Arch Linux
117119

118-
sudo pacman -S assimp
119120
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=OFF
120121
cmake --build build/ -j 8
121122

assimp

Submodule assimp updated 950 files

dependency_build.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,27 @@
33
import os
44
import threading
55
from distutils.dir_util import copy_tree
6+
import argparse
7+
8+
parser = argparse.ArgumentParser(prog='Stratus Engine Dependency Build')
9+
parser.add_argument('-a', '--assimp',
10+
action='store_true',
11+
default=False)
12+
args = parser.parse_args()
613

714
os.environ["CMAKE_BUILD_PARALLEL_LEVEL"] = str(os.cpu_count())
815

916
windows = ""
10-
linux = False
17+
build_assimp = args.assimp
1118
if os.name == "nt":
1219
print("Windows")
1320
windows = "--config Release"
1421
else:
1522
print("Linux")
16-
linux = True
17-
#linux = "--compile-no-warning-as-error"
1823

19-
configure = "cmake {} -Bbuild -S. -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release".format(linux)
24+
print("Building assimp:", build_assimp)
25+
26+
configure = "cmake -Bbuild -S. -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DASSIMP_BUILD_TESTS=OFF"
2027
build = "cmake --build build/ -j 8 {}".format(windows)
2128
install = "cmake --install build/ --prefix ../ThirdParty {}".format(windows)
2229
configure_build_install = configure + " && " + build + " && " + install
@@ -35,7 +42,7 @@
3542
t.start()
3643

3744
# Assimp
38-
if not linux:
45+
if build_assimp:
3946
cmd = "cd assimp && " + configure_build_install
4047
t = threading.Thread(target=lambda: os.system(cmd), args=())
4148
t.start()

0 commit comments

Comments
 (0)