summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bimg/scripts
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bimg/scripts')
-rw-r--r--3rdparty/bimg/scripts/bimg.lua28
-rw-r--r--3rdparty/bimg/scripts/bimg_decode.lua8
-rw-r--r--3rdparty/bimg/scripts/bimg_encode.lua30
-rw-r--r--3rdparty/bimg/scripts/genie.lua8
-rw-r--r--3rdparty/bimg/scripts/texturec.lua10
5 files changed, 53 insertions, 31 deletions
diff --git a/3rdparty/bimg/scripts/bimg.lua b/3rdparty/bimg/scripts/bimg.lua
index a70460ef092..0dde12d3899 100644
--- a/3rdparty/bimg/scripts/bimg.lua
+++ b/3rdparty/bimg/scripts/bimg.lua
@@ -1,30 +1,34 @@
--
--- Copyright 2010-2018 Branimir Karadzic. All rights reserved.
+-- Copyright 2010-2022 Branimir Karadzic. All rights reserved.
-- License: https://github.com/bkaradzic/bx#license-bsd-2-clause
--
-function filesexist(_srcPath, _dstPath, _files)
- for _, file in ipairs(_files) do
- file = path.getrelative(_srcPath, file)
- local filePath = path.join(_dstPath, file)
- if not os.isfile(filePath) then return false end
- end
-
- return true
-end
-
project "bimg"
kind "StaticLib"
includedirs {
- path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
+ path.join(BIMG_DIR, "3rdparty/astc-encoder/include"),
+ path.join(BIMG_DIR, "3rdparty/tinyexr/deps/miniz"),
}
files {
path.join(BIMG_DIR, "include/**"),
path.join(BIMG_DIR, "src/image.*"),
path.join(BIMG_DIR, "src/image_gnf.cpp"),
+
+ path.join(BIMG_DIR, "3rdparty/astc-encoder/source/**.cpp"),
+ path.join(BIMG_DIR, "3rdparty/astc-encoder/source/**.h"),
+
+ path.join(BIMG_DIR, "3rdparty/tinyexr/deps/miniz/miniz.*"),
+ }
+
+ using_bx()
+
+ configuration {}
+
+ removeflags {
+ "FloatFast", -- astc-encoder doesn't work with it.
}
configuration { "linux-*" }
diff --git a/3rdparty/bimg/scripts/bimg_decode.lua b/3rdparty/bimg/scripts/bimg_decode.lua
index ca045ed1b92..143027e731e 100644
--- a/3rdparty/bimg/scripts/bimg_decode.lua
+++ b/3rdparty/bimg/scripts/bimg_decode.lua
@@ -1,5 +1,5 @@
--
--- Copyright 2010-2018 Branimir Karadzic. All rights reserved.
+-- Copyright 2010-2022 Branimir Karadzic. All rights reserved.
-- License: https://github.com/bkaradzic/bx#license-bsd-2-clause
--
@@ -7,11 +7,9 @@ project "bimg_decode"
kind "StaticLib"
includedirs {
- path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BIMG_DIR, "3rdparty"),
- path.join(BIMG_DIR, "3rdparty/nvtt"),
- path.join(BIMG_DIR, "3rdparty/iqa/include"),
+ path.join(BIMG_DIR, "3rdparty/tinyexr/deps/miniz"),
}
files {
@@ -19,6 +17,8 @@ project "bimg_decode"
path.join(BIMG_DIR, "src/image_decode.*"),
}
+ using_bx()
+
configuration { "linux-*" }
buildoptions {
"-fPIC",
diff --git a/3rdparty/bimg/scripts/bimg_encode.lua b/3rdparty/bimg/scripts/bimg_encode.lua
index 06649108b82..6bc48d345e0 100644
--- a/3rdparty/bimg/scripts/bimg_encode.lua
+++ b/3rdparty/bimg/scripts/bimg_encode.lua
@@ -1,5 +1,5 @@
--
--- Copyright 2010-2018 Branimir Karadzic. All rights reserved.
+-- Copyright 2010-2022 Branimir Karadzic. All rights reserved.
-- License: https://github.com/bkaradzic/bx#license-bsd-2-clause
--
@@ -7,11 +7,12 @@ project "bimg_encode"
kind "StaticLib"
includedirs {
- path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BIMG_DIR, "3rdparty"),
- path.join(BIMG_DIR, "3rdparty/nvtt"),
+ path.join(BIMG_DIR, "3rdparty/astc-encoder/include"),
path.join(BIMG_DIR, "3rdparty/iqa/include"),
+ path.join(BIMG_DIR, "3rdparty/nvtt"),
+ path.join(BIMG_DIR, "3rdparty/tinyexr/deps/miniz"),
}
files {
@@ -30,16 +31,35 @@ project "bimg_encode"
path.join(BIMG_DIR, "3rdparty/nvtt/**.h"),
path.join(BIMG_DIR, "3rdparty/pvrtc/**.cpp"),
path.join(BIMG_DIR, "3rdparty/pvrtc/**.h"),
- path.join(BIMG_DIR, "3rdparty/astc/**.cpp"),
- path.join(BIMG_DIR, "3rdparty/astc/**.h"),
path.join(BIMG_DIR, "3rdparty/tinyexr/**.h"),
path.join(BIMG_DIR, "3rdparty/iqa/include/**.h"),
path.join(BIMG_DIR, "3rdparty/iqa/source/**.c"),
}
+ using_bx()
+
+ configuration {}
+
+ removeflags {
+ "FloatFast", -- astc-encoder doesn't work with it.
+ }
+
configuration { "linux-*" }
buildoptions {
"-fPIC",
}
+ configuration { "mingw* or linux* or osx*" }
+ buildoptions {
+ "-Wno-implicit-fallthrough",
+ "-Wno-shadow",
+ "-Wno-shift-negative-value",
+ "-Wno-undef",
+ }
+
+ buildoptions_cpp {
+ "-Wno-class-memaccess",
+ "-Wno-deprecated-copy",
+ }
+
configuration {}
diff --git a/3rdparty/bimg/scripts/genie.lua b/3rdparty/bimg/scripts/genie.lua
index 93acdfb712f..2cd13581109 100644
--- a/3rdparty/bimg/scripts/genie.lua
+++ b/3rdparty/bimg/scripts/genie.lua
@@ -1,6 +1,6 @@
--
--- Copyright 2010-2018 Branimir Karadzic. All rights reserved.
--- License: https://github.com/bkaradzic/bimg#license-bsd-2-clause
+-- Copyright 2010-2022 Branimir Karadzic. All rights reserved.
+-- License: https://github.com/bkaradzic/bimg/blob/master/LICENSE
--
newoption {
@@ -37,7 +37,6 @@ solution "bimg"
end
language "C++"
- startproject "example-00-helloworld"
MODULE_DIR = path.getabsolute("..")
BIMG_DIR = path.getabsolute("..")
@@ -64,12 +63,11 @@ function copyLib()
end
group "libs"
+dofile(path.join(BX_DIR, "scripts/bx.lua"))
dofile "bimg.lua"
dofile "bimg_decode.lua"
dofile "bimg_encode.lua"
-dofile(path.join(BX_DIR, "scripts/bx.lua"))
-
if _OPTIONS["with-tools"] then
group "tools"
dofile "texturec.lua"
diff --git a/3rdparty/bimg/scripts/texturec.lua b/3rdparty/bimg/scripts/texturec.lua
index 9bb3ef63649..2a392696701 100644
--- a/3rdparty/bimg/scripts/texturec.lua
+++ b/3rdparty/bimg/scripts/texturec.lua
@@ -1,13 +1,12 @@
--
--- Copyright 2010-2018 Branimir Karadzic. All rights reserved.
--- License: https://github.com/bkaradzic/bimg#license-bsd-2-clause
+-- Copyright 2010-2022 Branimir Karadzic. All rights reserved.
+-- License: https://github.com/bkaradzic/bimg/blob/master/LICENSE
--
project "texturec"
kind "ConsoleApp"
includedirs {
- path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
}
@@ -20,13 +19,14 @@ project "texturec"
"bimg_decode",
"bimg_encode",
"bimg",
- "bx",
}
+ using_bx()
+
configuration { "mingw-*" }
targetextension ".exe"
- configuration { "osx" }
+ configuration { "osx*" }
links {
"Cocoa.framework",
}