From a7a98df1a2af55fb1cf4c6cd32b3839f41caecca Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 17 Aug 2016 12:59:12 +0200 Subject: [PATCH] Build: Fix TargetDirectory not being taken into account Former-commit-id: ffaf52748cda6abf396dbe79284c6e011e21af95 [formerly 581bef8e7e4973147111c1ae2dbe204a2e2fe619] [formerly 182b31ea267d0d629dd1bafb9a067a2a70b4b234 [formerly 4e59f7f0ee7a2768cbc1d9e0a7923dda498ffda0]] Former-commit-id: 82e66db889b74c6614949d0755eae9b41dc889fa [formerly faffe8c22d70e23c041fad00dc735b268fc07d90] Former-commit-id: 32e116644ab6213d23f6e819bd8341ae512a74e2 --- build/scripts/common.lua | 18 +++++++++--------- build/scripts/tools/assimp.lua | 1 - build/scripts/tools/ndk.lua | 2 +- build/scripts/tools/ndk_server.lua | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/build/scripts/common.lua b/build/scripts/common.lua index b467eb9c5..498b64ee0 100644 --- a/build/scripts/common.lua +++ b/build/scripts/common.lua @@ -270,7 +270,6 @@ function NazaraBuild:Execute() project(prefix .. toolTable.Name) location(_ACTION .. "/tools") - targetdir(toolTable.TargetDirectory) if (toolTable.Kind == "plugin" or toolTable.Kind == "library") then kind("SharedLib") @@ -296,6 +295,8 @@ function NazaraBuild:Execute() libdirs("../lib") libdirs("../extlibs/lib/common") + targetdir(toolTable.TargetDirectory) + configuration("x32") libdirs(toolTable.LibraryPaths.x86) @@ -305,18 +306,17 @@ function NazaraBuild:Execute() configuration({"codeblocks or codelite or gmake", "x32"}) libdirs("../extlibs/lib/" .. makeLibDir .. "/x86") - libdirs("../lib/" .. makeLibDir .. "/x86") + libdirs(toolTable.TargetDirectory .. "/" .. makeLibDir .. "/x86") if (toolTable.Kind == "library") then - targetdir("../lib/" .. makeLibDir .. "/x86") + targetdir(toolTable.TargetDirectory .. "/" .. makeLibDir .. "/x86") elseif (toolTable.Kind == "plugin") then targetdir("../plugins/" .. toolTable.Name .. "/lib/" .. makeLibDir .. "/x86") end configuration({"codeblocks or codelite or gmake", "x64"}) libdirs("../extlibs/lib/" .. makeLibDir .. "/x64") - libdirs("../lib/" .. makeLibDir .. "/x64") if (toolTable.Kind == "library") then - targetdir("../lib/" .. makeLibDir .. "/x64") + targetdir(toolTable.TargetDirectory .. "/" .. makeLibDir .. "/x64") elseif (toolTable.Kind == "plugin") then targetdir("../plugins/" .. toolTable.Name .. "/lib/" .. makeLibDir .. "/x64") end @@ -325,7 +325,7 @@ function NazaraBuild:Execute() libdirs("../extlibs/lib/msvc/x86") libdirs("../lib/msvc/x86") if (toolTable.Kind == "library") then - targetdir("../lib/msvc/x86") + targetdir(toolTable.TargetDirectory .. "/msvc/x86") elseif (toolTable.Kind == "plugin") then targetdir("../plugins/" .. toolTable.Name .. "/lib/msvc/x86") end @@ -334,7 +334,7 @@ function NazaraBuild:Execute() libdirs("../extlibs/lib/msvc/x64") libdirs("../lib/msvc/x64") if (toolTable.Kind == "library") then - targetdir("../lib/msvc/x64") + targetdir(toolTable.TargetDirectory .. "/msvc/x64") elseif (toolTable.Kind == "plugin") then targetdir("../plugins/" .. toolTable.Name .. "/lib/msvc/x64") end @@ -343,7 +343,7 @@ function NazaraBuild:Execute() libdirs("../extlibs/lib/xcode/x86") libdirs("../lib/xcode/x86") if (toolTable.Kind == "library") then - targetdir("../lib/xcode/x86") + targetdir(toolTable.TargetDirectory .. "/xcode/x86") elseif (toolTable.Kind == "plugin") then targetdir("../plugins/" .. toolTable.Name .. "/lib/xcode/x86") end @@ -352,7 +352,7 @@ function NazaraBuild:Execute() libdirs("../extlibs/lib/xcode/x64") libdirs("../lib/xcode/x64") if (toolTable.Kind == "library") then - targetdir("../lib/xcode/x64") + targetdir(toolTable.TargetDirectory .. "/xcode/x64") elseif (toolTable.Kind == "plugin") then targetdir("../plugins/" .. toolTable.Name .. "/lib/xcode/x64") end diff --git a/build/scripts/tools/assimp.lua b/build/scripts/tools/assimp.lua index c810d6c0a..f834d6d11 100644 --- a/build/scripts/tools/assimp.lua +++ b/build/scripts/tools/assimp.lua @@ -2,7 +2,6 @@ TOOL.Name = "Assimp" TOOL.Directory = "../plugins/Assimp" TOOL.Kind = "Plugin" -TOOL.TargetDirectory = "../SDK/lib" TOOL.Includes = { "../extlibs/include", diff --git a/build/scripts/tools/ndk.lua b/build/scripts/tools/ndk.lua index 8a40ea170..66dcf9a17 100644 --- a/build/scripts/tools/ndk.lua +++ b/build/scripts/tools/ndk.lua @@ -2,7 +2,7 @@ TOOL.Name = "SDK" TOOL.Directory = "../SDK" TOOL.Kind = "Library" -TOOL.TargetDirectory = "../SDK/lib" +TOOL.TargetDirectory = "../lib" TOOL.Defines = { "NDK_BUILD" diff --git a/build/scripts/tools/ndk_server.lua b/build/scripts/tools/ndk_server.lua index aa8548b80..cebd158c6 100644 --- a/build/scripts/tools/ndk_server.lua +++ b/build/scripts/tools/ndk_server.lua @@ -2,7 +2,7 @@ TOOL.Name = "SDKServer" TOOL.Directory = "../SDK" TOOL.Kind = "Library" -TOOL.TargetDirectory = "../SDK/lib" +TOOL.TargetDirectory = "../lib" TOOL.Defines = { "NDK_BUILD",