diff options
Diffstat (limited to '3rdparty/bimg/scripts')
-rw-r--r-- | 3rdparty/bimg/scripts/bimg.lua | 24 | ||||
-rw-r--r-- | 3rdparty/bimg/scripts/bimg_decode.lua | 27 | ||||
-rw-r--r-- | 3rdparty/bimg/scripts/bimg_encode.lua | 42 | ||||
-rw-r--r-- | 3rdparty/bimg/scripts/genie.lua | 76 | ||||
-rw-r--r-- | 3rdparty/bimg/scripts/texturec.lua | 57 |
5 files changed, 226 insertions, 0 deletions
diff --git a/3rdparty/bimg/scripts/bimg.lua b/3rdparty/bimg/scripts/bimg.lua new file mode 100644 index 00000000000..b1f56d1d225 --- /dev/null +++ b/3rdparty/bimg/scripts/bimg.lua @@ -0,0 +1,24 @@ +-- +-- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- License: https://github.com/bkaradzic/bx#license-bsd-2-clause +-- + +project "bimg" + kind "StaticLib" + + includedirs { + path.join(BX_DIR, "include"), + path.join(BIMG_DIR, "include"), + } + + files { + path.join(BIMG_DIR, "include/**"), + path.join(BIMG_DIR, "src/image.*"), + } + + configuration { "linux-*" } + buildoptions { + "-fPIC", + } + + configuration {} diff --git a/3rdparty/bimg/scripts/bimg_decode.lua b/3rdparty/bimg/scripts/bimg_decode.lua new file mode 100644 index 00000000000..743d0ec59e1 --- /dev/null +++ b/3rdparty/bimg/scripts/bimg_decode.lua @@ -0,0 +1,27 @@ +-- +-- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- License: https://github.com/bkaradzic/bx#license-bsd-2-clause +-- + +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"), + } + + files { + path.join(BIMG_DIR, "include/**"), + path.join(BIMG_DIR, "src/image_decode.*"), + } + + configuration { "linux-*" } + buildoptions { + "-fPIC", + } + + configuration {} diff --git a/3rdparty/bimg/scripts/bimg_encode.lua b/3rdparty/bimg/scripts/bimg_encode.lua new file mode 100644 index 00000000000..44021dc44a7 --- /dev/null +++ b/3rdparty/bimg/scripts/bimg_encode.lua @@ -0,0 +1,42 @@ +-- +-- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- License: https://github.com/bkaradzic/bx#license-bsd-2-clause +-- + +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/iqa/include"), + } + + files { + path.join(BIMG_DIR, "include/**"), + path.join(BIMG_DIR, "src/image_encode.*"), + path.join(BIMG_DIR, "3rdparty/libsquish/**.cpp"), + path.join(BIMG_DIR, "3rdparty/libsquish/**.h"), + path.join(BIMG_DIR, "3rdparty/edtaa3/**.cpp"), + path.join(BIMG_DIR, "3rdparty/edtaa3/**.h"), + path.join(BIMG_DIR, "3rdparty/etc1/**.cpp"), + path.join(BIMG_DIR, "3rdparty/etc1/**.h"), + path.join(BIMG_DIR, "3rdparty/etc2/**.cpp"), + path.join(BIMG_DIR, "3rdparty/etc2/**.hpp"), + path.join(BIMG_DIR, "3rdparty/nvtt/**.cpp"), + 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/tinyexr/**.h"), + path.join(BIMG_DIR, "3rdparty/iqa/include/**.h"), + path.join(BIMG_DIR, "3rdparty/iqa/source/**.c"), + } + + configuration { "linux-*" } + buildoptions { + "-fPIC", + } + + configuration {} diff --git a/3rdparty/bimg/scripts/genie.lua b/3rdparty/bimg/scripts/genie.lua new file mode 100644 index 00000000000..b22c4dd26ce --- /dev/null +++ b/3rdparty/bimg/scripts/genie.lua @@ -0,0 +1,76 @@ +-- +-- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause +-- + +newoption { + trigger = "with-amalgamated", + description = "Enable amalgamated build.", +} + +newoption { + trigger = "with-shared-lib", + description = "Enable building shared library.", +} + +newoption { + trigger = "with-tools", + description = "Enable building tools.", +} + +solution "bimg" + configurations { + "Debug", + "Release", + } + + if _ACTION == "xcode4" then + platforms { + "Universal", + } + else + platforms { + "x32", + "x64", + "Native", -- for targets where bitness is not specified + } + end + + language "C++" + startproject "example-00-helloworld" + +MODULE_DIR = path.getabsolute("..") +BIMG_DIR = path.getabsolute("..") +BX_DIR = os.getenv("BX_DIR") + +local BIMG_BUILD_DIR = path.join(BIMG_DIR, ".build") +local BIMG_THIRD_PARTY_DIR = path.join(BIMG_DIR, "3rdparty") +if not BX_DIR then + BX_DIR = path.getabsolute(path.join(BIMG_DIR, "../bx")) +end + +if not os.isdir(BX_DIR) then + print("bx not found at " .. BX_DIR) + print("For more info see: https://bkaradzic.github.io/bgfx/build.html") + os.exit() +end + +dofile (path.join(BX_DIR, "scripts/toolchain.lua")) +if not toolchain(BIMG_BUILD_DIR, BIMG_THIRD_PARTY_DIR) then + return -- no action specified +end + +function copyLib() +end + +group "libs" +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" +end diff --git a/3rdparty/bimg/scripts/texturec.lua b/3rdparty/bimg/scripts/texturec.lua new file mode 100644 index 00000000000..02f6bb65d41 --- /dev/null +++ b/3rdparty/bimg/scripts/texturec.lua @@ -0,0 +1,57 @@ +-- +-- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause +-- + +project "texturec" + kind "ConsoleApp" + + 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"), + } + + files { + path.join(BIMG_DIR, "3rdparty/libsquish/**.cpp"), + path.join(BIMG_DIR, "3rdparty/libsquish/**.h"), + path.join(BIMG_DIR, "3rdparty/edtaa3/**.cpp"), + path.join(BIMG_DIR, "3rdparty/edtaa3/**.h"), + path.join(BIMG_DIR, "3rdparty/etc1/**.cpp"), + path.join(BIMG_DIR, "3rdparty/etc1/**.h"), + path.join(BIMG_DIR, "3rdparty/etc2/**.cpp"), + path.join(BIMG_DIR, "3rdparty/etc2/**.hpp"), + path.join(BIMG_DIR, "3rdparty/nvtt/**.cpp"), + 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/tinyexr/**.h"), + path.join(BIMG_DIR, "3rdparty/iqa/include/**.h"), + path.join(BIMG_DIR, "3rdparty/iqa/source/**.c"), + path.join(BIMG_DIR, "tools/texturec/**.cpp"), + path.join(BIMG_DIR, "tools/texturec/**.h"), + } + + links { + "bimg_decode", + "bimg_encode", + "bimg", + "bx", + } + + configuration { "mingw-*" } + targetextension ".exe" + + configuration { "osx" } + links { + "Cocoa.framework", + } + + configuration { "vs20* or mingw*" } + links { + "psapi", + } + + configuration {} |