Skip to content

Commit

Permalink
Added option to build bimg with libheif.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaradzic committed Jun 12, 2024
1 parent b66f60c commit 61c770b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
5 changes: 5 additions & 0 deletions scripts/genie.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions scripts/geometryv.lua
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
8 changes: 8 additions & 0 deletions scripts/texturec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ project "texturec"
"bimg",
}

if _OPTIONS["with-libheif"] then
links {
"heif",
}

configuration {}
end

using_bx()

configuration { "mingw-*" }
Expand Down
15 changes: 14 additions & 1 deletion scripts/texturev.lua
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions tools/texturev/texturev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ static const char* s_supportedExt[] =
"exr",
"gif",
"gnf",
"jpg",
"jpeg",
"hdr",
"heic",
"jpeg",
"jpg",
"ktx",
"pgm",
"png",
Expand Down

0 comments on commit 61c770b

Please sign in to comment.