Prechádzať zdrojové kódy

Added option to build bimg with libheif.

Бранимир Караџић 1 rok pred
rodič
commit
61c770b0f5

+ 5 - 0
scripts/genie.lua

@@ -50,6 +50,11 @@ newoption {
 	description = "Enable building examples.",
 }
 
+newoption {
+	trigger = "with-libheif",
+	description = "Enable building bimg with libheif HEIF and AVIF file format decoder.",
+}
+
 newaction {
 	trigger = "idl",
 	description = "Generate bgfx interface source code",

+ 5 - 0
scripts/geometryv.lua

@@ -1,3 +1,8 @@
+--
+-- Copyright 2010-2024 Branimir Karadzic. All rights reserved.
+-- License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
+--
+
 project ("geometryv")
 	uuid (os.uuid("geometryv") )
 	kind "ConsoleApp"

+ 8 - 0
scripts/texturec.lua

@@ -23,6 +23,14 @@ project "texturec"
 		"bimg",
 	}
 
+	if _OPTIONS["with-libheif"] then
+		links {
+			"heif",
+		}
+
+		configuration {}
+	end
+
 	using_bx()
 
 	configuration { "mingw-*" }

+ 14 - 1
scripts/texturev.lua

@@ -1,4 +1,9 @@
-project ("texturev")
+--
+-- Copyright 2010-2024 Branimir Karadzic. All rights reserved.
+-- License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
+--
+
+project "texturev"
 	uuid (os.uuid("texturev") )
 	kind "ConsoleApp"
 
@@ -73,6 +78,14 @@ project ("texturev")
 		configuration {}
 	end
 
+	if _OPTIONS["with-libheif"] then
+		links {
+			"heif",
+		}
+
+		configuration {}
+	end
+
 	configuration { "vs*" }
 		linkoptions {
 			"/ignore:4199", -- LNK4199: /DELAYLOAD:*.dll ignored; no imports found from *.dll

+ 3 - 2
tools/texturev/texturev.cpp

@@ -76,9 +76,10 @@ static const char* s_supportedExt[] =
 	"exr",
 	"gif",
 	"gnf",
-	"jpg",
-	"jpeg",
 	"hdr",
+	"heic",
+	"jpeg",
+	"jpg",
 	"ktx",
 	"pgm",
 	"png",