From 50b33991e106ccb7c6eea0b4b6a472aa0fe7a65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 11 Dec 2017 20:19:50 -0800 Subject: [PATCH] Fixed build. --- scripts/bimg.lua | 44 +++++++++++++++----------------------------- src/image_gnf.cpp | 4 +++- 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/scripts/bimg.lua b/scripts/bimg.lua index 835722d..de99460 100644 --- a/scripts/bimg.lua +++ b/scripts/bimg.lua @@ -13,28 +13,6 @@ function filesexist(_srcPath, _dstPath, _files) return true end -function overridefiles(_srcPath, _dstPath, _files) - - local remove = {} - local add = {} - for _, file in ipairs(_files) do - file = path.getrelative(_srcPath, file) - local filePath = path.join(_dstPath, file) - if not os.isfile(filePath) then return end - - table.insert(remove, path.join(_srcPath, file)) - table.insert(add, filePath) - end - - removefiles { - remove, - } - - files { - add, - } -end - project "bimg" kind "StaticLib" @@ -46,11 +24,23 @@ project "bimg" files { path.join(BIMG_DIR, "include/**"), path.join(BIMG_DIR, "src/image.*"), + path.join(BIMG_DIR, "src/image_gnf.cpp"), } - overridefiles(BIMG_DIR, path.join(BIMG_DIR, "../bimg-ext"), { - path.join(BIMG_DIR, "src/image_gnf.cpp"), - }) +--[[ + if filesexist(BIMG_DIR, path.join(BIMG_DIR, "../bimg-ext"), { + path.join(BIMG_DIR, "scripts/bimg.lua"), }) then + + if filesexist(BIMG_DIR, path.join(BIMG_DIR, "../bimg-ext"), { + path.join(BIMG_DIR, "src/image_gnf.cpp"), }) then + + removefiles { + path.join(BIMG_DIR, "src/image_gnf.cpp"), + } + end + + dofile(path.join(BIMG_DIR, "../bimg-ext/scripts/bimg.lua") ) + end]] configuration { "linux-*" } buildoptions { @@ -58,7 +48,3 @@ project "bimg" } configuration {} - - if filesexist(BIMG_DIR, path.join(BIMG_DIR, "../bimg-ext"), { path.join(BIMG_DIR, "scripts/bimg.lua"), }) then - dofile(path.join(BIMG_DIR, "../bimg-ext/scripts/bimg.lua") ) - end diff --git a/src/image_gnf.cpp b/src/image_gnf.cpp index 1e69899..8dc9181 100644 --- a/src/image_gnf.cpp +++ b/src/image_gnf.cpp @@ -16,6 +16,8 @@ namespace bimg ImageContainer* imageParseGnf(bx::AllocatorI* _allocator, const void* _src, uint32_t _size, bx::Error* _err) { + BX_UNUSED(_allocator); + bx::MemoryReader reader(_src, _size); uint32_t magic; @@ -29,7 +31,7 @@ namespace bimg } BX_ERROR_SET(_err, BIMG_ERROR, "GNF: not supported."); - return false; + return NULL; } } // namespace bimg