diff --git a/scripts/genie.lua b/scripts/genie.lua index 96909185a..477f8f9bf 100644 --- a/scripts/genie.lua +++ b/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", diff --git a/scripts/geometryv.lua b/scripts/geometryv.lua index de63a3349..a79a800ef 100644 --- a/scripts/geometryv.lua +++ b/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" diff --git a/scripts/texturec.lua b/scripts/texturec.lua index 58b163da6..4e403fadb 100644 --- a/scripts/texturec.lua +++ b/scripts/texturec.lua @@ -23,6 +23,14 @@ project "texturec" "bimg", } + if _OPTIONS["with-libheif"] then + links { + "heif", + } + + configuration {} + end + using_bx() configuration { "mingw-*" } diff --git a/scripts/texturev.lua b/scripts/texturev.lua index 9cc003ec0..0a34eef8b 100644 --- a/scripts/texturev.lua +++ b/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 diff --git a/tools/texturev/texturev.cpp b/tools/texturev/texturev.cpp index 8516e8e5c..5737c4637 100644 --- a/tools/texturev/texturev.cpp +++ b/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",