Fix scons build
Tested on Mac only, but probably also works on Windows/Linux
This commit is contained in:
25
SConstruct
25
SConstruct
@@ -50,7 +50,7 @@ else:
|
||||
""")
|
||||
|
||||
if str(platform) == "darwin":
|
||||
env.Append(CXXFLAGS="-std=c++11 -stdlib=libc++", RPATH='../Frameworks')
|
||||
env.Append(CXXFLAGS="-std=c++11 -stdlib=libc++ -include src/global.hpp", RPATH='../Frameworks')
|
||||
env["CC"] = 'clang'
|
||||
env["CXX"] = 'clang++'
|
||||
env.Append(BUILDERS={
|
||||
@@ -134,7 +134,7 @@ elif str(platform) == "win32":
|
||||
if 'msvc' in env['TOOLS']:
|
||||
env.Append(
|
||||
LINKFLAGS='/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup /MACHINE:X86',
|
||||
CXXFLAGS='/EHsc /MD',
|
||||
CXXFLAGS='/EHsc /MD /FIsrc/global.hpp',
|
||||
LIBPATH=("C:\Program Files (x86)\Microsoft Visual Studio " + env['MSVC_VERSION'] + "\VC\lib"),
|
||||
LIBS=Split("""
|
||||
kernel32
|
||||
@@ -151,6 +151,8 @@ elif str(platform) == "win32":
|
||||
odbccp32
|
||||
""")
|
||||
)
|
||||
else:
|
||||
env.Append(CXXFLAGS="-include src/global.hpp")
|
||||
def build_app_package(env, source, build_dir, info):
|
||||
env.Install(build_dir, source)
|
||||
|
||||
@@ -264,10 +266,15 @@ env.Append(CPPPATH=Split("""
|
||||
#src/
|
||||
#src/classes/
|
||||
#src/tools/
|
||||
#src/tools/gzstream/
|
||||
#src/tools/resmgr/
|
||||
#src/dialogxml/
|
||||
#src/dialogxml/xml-parser/
|
||||
#src/fileio/
|
||||
#src/fileio/gzstream/
|
||||
#src/fileio/resmgr/
|
||||
#src/fileio/xml-parser/
|
||||
#src/gfx/
|
||||
#src/dialogxml/dialogs/
|
||||
#src/dialogxml/widgets/
|
||||
#src/scenario/
|
||||
#src/universe/
|
||||
"""))
|
||||
|
||||
if str(platform) == "win32":
|
||||
@@ -297,17 +304,17 @@ Export("env platform")
|
||||
|
||||
# Gather common sources
|
||||
|
||||
common_classes, party_classes = SConscript("build/obj/classes/SConscript")
|
||||
tools = SConscript("build/obj/tools/SConscript")
|
||||
dlog_util = SConscript("build/obj/dialogxml/SConscript")
|
||||
common_sources = common_classes + dlog_util + tools
|
||||
common_sources = dlog_util + tools
|
||||
install_dir = "#build/Blades of Exile"
|
||||
party_classes = Glob("#src/universe/*.cpp")
|
||||
Export("install_dir party_classes common_sources")
|
||||
|
||||
# Programs
|
||||
|
||||
SConscript([
|
||||
"build/obj/SConscript",
|
||||
"build/obj/game/SConscript",
|
||||
"build/obj/pcedit/SConscript",
|
||||
"build/obj/scenedit/SConscript",
|
||||
"build/obj/test/SConscript"
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
Import("env")
|
||||
|
||||
common_classes = Split("""
|
||||
estreams.cpp
|
||||
item.cpp
|
||||
location.cpp
|
||||
monster.cpp
|
||||
outdoors.cpp
|
||||
scenario.cpp
|
||||
shop.cpp
|
||||
special.cpp
|
||||
spell.cpp
|
||||
talking.cpp
|
||||
terrain.cpp
|
||||
town.cpp
|
||||
vehicle.cpp
|
||||
""")
|
||||
|
||||
party_classes = Split("""
|
||||
creatlist.cpp
|
||||
creature.cpp
|
||||
living.cpp
|
||||
party.cpp
|
||||
pc.cpp
|
||||
universe.cpp
|
||||
""")
|
||||
|
||||
common = env.StaticLibrary("#build/lib/common", common_classes)
|
||||
party = env.StaticLibrary("#build/lib/common_party", party_classes)
|
||||
|
||||
ret = (common, party)
|
||||
|
||||
Return("ret")
|
||||
@@ -3,6 +3,6 @@ Import("env")
|
||||
|
||||
env = env.Clone()
|
||||
env.Append(CXXFLAGS="-fpermissive")
|
||||
dlog_util = env.StaticLibrary("#build/lib/dlogutil", Glob("*.cpp") + Glob("xml-parser/*.cpp"))
|
||||
dlog_util = env.StaticLibrary("#build/lib/dlogutil", Glob("dialogs/*.cpp") + Glob("widgets/*.cpp") + Glob("../fileio/xml-parser/*.cpp"))
|
||||
|
||||
Return("dlog_util")
|
||||
@@ -20,9 +20,9 @@ game_sources = Split("""
|
||||
boe.text.cpp
|
||||
boe.town.cpp
|
||||
boe.townspec.cpp
|
||||
pcedit/pc.editors.cpp
|
||||
tools/fileio_party.cpp
|
||||
tools/view_dialogs.cpp
|
||||
../pcedit/pc.editors.cpp
|
||||
../fileio/fileio_party.cpp
|
||||
../view_dialogs.cpp
|
||||
""")
|
||||
|
||||
if str(platform) == "darwin":
|
||||
@@ -41,7 +41,7 @@ boe = env.Program("#build/bin/Blades of Exile", common_sources + party_classes +
|
||||
if str(platform) == "darwin":
|
||||
boe_info = {
|
||||
'nib': '#rsrc/menus/game',
|
||||
'plist': 'BoE-Info.plist',
|
||||
'plist': '../BoE-Info.plist',
|
||||
'creator': 'blx!',
|
||||
'icons': 'BoE boegraphics boeresources boesave boesounds',
|
||||
}
|
||||
@@ -7,7 +7,7 @@ pced_sources = Split("""
|
||||
pc.fileio.cpp
|
||||
pc.graphics.cpp
|
||||
pc.main.cpp
|
||||
../tools/fileio_party.cpp
|
||||
../fileio/fileio_party.cpp
|
||||
""")
|
||||
|
||||
if str(platform) == "darwin":
|
||||
|
||||
@@ -10,7 +10,7 @@ scened_sources = Split("""
|
||||
scen.keydlgs.cpp
|
||||
scen.main.cpp
|
||||
scen.townout.cpp
|
||||
../tools/view_dialogs.cpp
|
||||
../view_dialogs.cpp
|
||||
""")
|
||||
|
||||
if str(platform) == "darwin":
|
||||
|
||||
@@ -2,19 +2,22 @@
|
||||
Import("env platform")
|
||||
|
||||
tools = Split("""
|
||||
fileio_scen.cpp
|
||||
fileio.cpp
|
||||
graphtool.cpp
|
||||
map_parse.cpp
|
||||
mathutil.cpp
|
||||
porting.cpp
|
||||
soundtool.cpp
|
||||
specials_parse.cpp
|
||||
tarball.cpp
|
||||
undo.cpp
|
||||
gzstream/gzstream.cpp
|
||||
resmgr/restypes.cpp
|
||||
""")
|
||||
../location.cpp
|
||||
../mathutil.cpp
|
||||
../porting.cpp
|
||||
../sounds.cpp
|
||||
../spell.cpp
|
||||
../utility.cpp
|
||||
../fileio/estreams.cpp
|
||||
../fileio/fileio.cpp
|
||||
../fileio/fileio_scen.cpp
|
||||
../fileio/map_parse.cpp
|
||||
../fileio/special_parse.cpp
|
||||
../fileio/tarball.cpp
|
||||
../fileio/gzstream/gzstream.cpp
|
||||
../fileio/resmgr/restypes.cpp
|
||||
""") + Glob("../gfx/*.cpp") + Glob("../scenario/*.cpp")
|
||||
|
||||
if str(platform) == "darwin":
|
||||
tools.extend(Glob("*.mac.*"))
|
||||
|
||||
Reference in New Issue
Block a user