Skip to content

Commit

Permalink
build: change third party into a repo system
Browse files Browse the repository at this point in the history
This uses the xmake repository system which is the correct way to have packages inside of a project,
allowing us to depend on those packages in other packages as well as improving package xmake.lua
change detection.
  • Loading branch information
localcc committed May 19, 2024
1 parent 34484ea commit f82d668
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 31 deletions.
File renamed without changes.
19 changes: 19 additions & 0 deletions deps/third-repo/packages/i/iconfontcppheaders/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package("IconFontCppHeaders")
add_urls("[email protected]:juliettef/IconFontCppHeaders.git")
add_urls("https://github.com/juliettef/IconFontCppHeaders.git")
set_kind("library", { headeronly = true })

add_versions("v1.0", "main")

on_install(function (package)
os.cp("**.h", package:installdir("include"))
end)

on_test(function (package)
assert(package:check_cxxsnippets({ test = [[
void test() {
ICON_FA_TERMINAL;
}
]]}, { includes = { "IconsFontAwesome5.h" } }))
end)
package_end()
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,4 @@ package("ImGuiTextEdit")

import("package.tools.xmake").install(package)
end)
package_end()

package("IconFontCppHeaders")
add_urls("[email protected]:juliettef/IconFontCppHeaders.git")
add_urls("https://github.com/juliettef/IconFontCppHeaders.git")
set_kind("library", { headeronly = true })

add_versions("v1.0", "main")

on_install(function (package)
os.cp("**.h", package:installdir("include"))
end)

on_test(function (package)
assert(package:check_cxxsnippets({ test = [[
void test() {
ICON_FA_TERMINAL;
}
]]}, { includes = { "IconsFontAwesome5.h" } }))
end)
package_end()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 1 addition & 11 deletions deps/third/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
includes("zycore")
includes("zydis")
includes("polyhook_2")
includes("glaze")
includes("imgui")
includes("glad")
includes("raw_pdb")

add_requires("zycore v1.5.0", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
add_requires("zydis v4.1.0", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
add_requires("polyhook_2", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
includes("glad")
7 changes: 7 additions & 0 deletions deps/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
includes("first")
-- Third party dependencies
includes("third")
-- Third party dependencies repository
-- Everything that is an xmake package should be inside of this repository
add_repositories("third-party deps/third-repo", { rootdir = get_config("ue4ssRoot") })

add_requires("zycore v1.5.0", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
add_requires("zydis v4.1.0", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
add_requires("polyhook_2", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })

0 comments on commit f82d668

Please sign in to comment.