-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_game.py
30 lines (27 loc) · 870 Bytes
/
build_game.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from pysemble.builders import Project, Library
from pysemble.compilers import Clang
from pysemble.archivers import Ar
import os
compiler = Clang(version = "c++17", optimization = 2) # g++
archiver = Ar()
working_directory = os.path.dirname(os.path.realpath(__file__))
os.environ["LD_LIBRARY_PATH"] = working_directory + "/vendor/SFML-2.5.1/lib/:" + working_directory + "/libwilson/lib/"
project = Project("wilson", compiler)
project.add_executables([
"game/main.cpp",
"game/PlayerComponent.cpp",
])
project.add_link_path("libwilson/lib")
project.add_link_path("vendor/SFML-2.5.1/lib")
project.add_include_directory("libwilson/include")
project.add_include_directory("vendor/SFML-2.5.1/include/")
project.add_dynamic_libs([
"stdc++",
"sfml-graphics",
"sfml-window",
"sfml-system",
"sfml-audio",
"wilson"
])
project.build()
project.run()