Skip to content

how to import header-only files at third_party dir #5966

Closed Answered by waruqi
pplmx asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure how you plan to organize your project structure, but for the compilation error I currently encounter, you can fix it with the following patch.

It works for me.

ruki-2:hello ruki$ git diff
diff --git a/tests/xmake.lua b/tests/xmake.lua
index 7275822..34a22fc 100644
--- a/tests/xmake.lua
+++ b/tests/xmake.lua
@@ -6,5 +6,6 @@ target("hello-tests")
     set_targetdir("$(buildir)/bin")
     set_kind("binary")
     add_files("*.cpp")
+    add_includedirs("$(projectdir)/include")
     add_deps("hello_lib")
     add_packages("gtest")
diff --git a/xmake.lua b/xmake.lua
index 7e9e669..48c0d66 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -11,7 +11,7 @@ target("hello_lib")
     set_kind("st…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@pplmx
Comment options

@waruqi
Comment options

@pplmx
Comment options

@waruqi
Comment options

Answer selected by pplmx
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants