summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/src/main.lua')
-rw-r--r--scripts/src/main.lua41
1 files changed, 37 insertions, 4 deletions
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 809a18be70a..6bbdc01833c 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -95,16 +95,44 @@ function mainProject(_target, _subtarget)
"expat",
"softfloat",
"jpeg",
- "flac",
"7z",
"formats",
"lua",
"lsqlite3",
- "sqllite3",
- "zlib",
"jsoncpp",
"mongoose",
}
+
+ if _OPTIONS["with-bundled-zlib"] then
+ links {
+ "zlib",
+ }
+ else
+ links {
+ "z",
+ }
+ end
+
+ if _OPTIONS["with-bundled-flac"] then
+ links {
+ "flac",
+ }
+ else
+ links {
+ "FLAC",
+ }
+ end
+
+ if _OPTIONS["with-bundled-sqlite3"] then
+ links {
+ "sqllite3",
+ }
+ else
+ links {
+ "sqlite3",
+ }
+ end
+
if _OPTIONS["NO_USE_MIDI"]~="1" then
links {
"portmidi",
@@ -130,11 +158,16 @@ function mainProject(_target, _subtarget)
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
- MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. _target .. "/layout",
GEN_DIR .. "resource",
}
+ if _OPTIONS["with-bundled-zlib"] then
+ includedirs {
+ MAME_DIR .. "3rdparty/zlib",
+ }
+ end
+
if _OPTIONS["targetos"]=="macosx" and (not override_resources) then
linkoptions {
"-sectcreate __TEXT __info_plist " .. GEN_DIR .. "/resource/" .. _subtarget .. "-Info.plist"