Browse Source

Re-factored Clang builtin include directory build script code.

pull/683/merge
Joao Matos 9 years ago
parent
commit
3f33124287
  1. 12
      build/LLVM.lua
  2. 6
      src/CppParser/premake4.lua

12
build/LLVM.lua

@ -67,23 +67,23 @@ function SetupLLVMIncludes() @@ -67,23 +67,23 @@ function SetupLLVMIncludes()
end
function CopyClangIncludes()
local clangBuiltinIncludeDir = path.join(LLVMRootDir, "lib", "clang")
local clangBuiltinIncludeDir = path.join(LLVMRootDir, "lib")
if LLVMDirPerConfiguration then
local clangBuiltinDebug = path.join(LLVMRootDirDebug, "lib", "clang")
local clangBuiltinRelease = path.join(LLVMRootDirRelease, "lib", "clang")
local clangBuiltinDebug = path.join(LLVMRootDirDebug, "lib")
local clangBuiltinRelease = path.join(LLVMRootDirRelease, "lib")
if os.isdir(clangBuiltinDebug) then
if os.isdir(path.join(clangBuiltinDebug, "clang")) then
clangBuiltinIncludeDir = clangBuiltinDebug
end
if os.isdir(clangBuiltinRelease) then
if os.isdir(path.join(clangBuiltinRelease, "clang")) then
clangBuiltinIncludeDir = clangBuiltinRelease
end
end
if os.isdir(clangBuiltinIncludeDir) then
prebuildcommands { string.format("{COPY} %s %%{cfg.buildtarget.directory}", clangBuiltinIncludeDir) }
postbuildcommands { string.format("{COPY} %s %%{cfg.buildtarget.directory}", clangBuiltinIncludeDir) }
end
end

6
src/CppParser/premake4.lua

@ -16,12 +16,6 @@ project "CppSharp.CppParser" @@ -16,12 +16,6 @@ project "CppSharp.CppParser"
flags { common_flags }
rtti "Off"
local copy = os.is_windows() and "xcopy /Q /E /Y /I" or "cp -rf";
local headers = path.getabsolute(path.join(LLVMRootDir, "lib/"))
if os.isdir(path.join(headers, "clang")) then
postbuildcommands { copy .. " " .. headers .. " %{cfg.targetdir}" }
end
configuration "vs*"
buildoptions { clang_msvc_flags }

Loading…
Cancel
Save