Browse Source

Fixed build.

Branimir Karadžić 8 years ago
parent
commit
50b33991e1
2 changed files with 18 additions and 30 deletions
  1. 15 29
      scripts/bimg.lua
  2. 3 1
      src/image_gnf.cpp

+ 15 - 29
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

+ 3 - 1
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