mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
chore: check exact paths of test executable and provide temp dir
This commit is contained in:
51
test/Catch2Common.lua
Normal file
51
test/Catch2Common.lua
Normal file
@ -0,0 +1,51 @@
|
||||
Catch2Common = {}
|
||||
|
||||
function Catch2Common:include(includes)
|
||||
if includes:handle(self:name()) then
|
||||
includedirs {
|
||||
path.join(TestFolder(), "Catch2Common")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function Catch2Common:link(links)
|
||||
links:add(self:name())
|
||||
links:linkto(catch2)
|
||||
end
|
||||
|
||||
function Catch2Common:use()
|
||||
|
||||
end
|
||||
|
||||
function Catch2Common:name()
|
||||
return "Catch2Common"
|
||||
end
|
||||
|
||||
function Catch2Common:project()
|
||||
local folder = TestFolder()
|
||||
local includes = Includes:create()
|
||||
local links = Links:create()
|
||||
|
||||
project(self:name())
|
||||
targetdir(TargetDirectoryTest)
|
||||
location "%{wks.location}/test/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
|
||||
files {
|
||||
path.join(folder, "Catch2Common/**.h"),
|
||||
path.join(folder, "Catch2Common/**.cpp")
|
||||
}
|
||||
|
||||
vpaths {
|
||||
["*"] = {
|
||||
path.join(folder, "Catch2Common")
|
||||
}
|
||||
}
|
||||
|
||||
self:include(includes)
|
||||
catch2:include(includes)
|
||||
|
||||
links:linkto(catch2)
|
||||
links:linkall()
|
||||
end
|
Reference in New Issue
Block a user