Skip to content

xmake install and pkg-config #1301

Answered by waruqi
maluoi asked this question in Q&A
Mar 21, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You can write a xxx.pc file in after_install(), like this

local file = io.open(pcfile, 'w')
if file then
file:print("prefix=%s", package:installdir())
file:print("exec_prefix=${prefix}")
file:print("libdir=${exec_prefix}/lib")
file:print("includedir=${prefix}/include")
file:print("")
file:print("Name: %s", package:name())
file:print("Description: %s", package:description())
file:print("Version: %s", package:version_str())
file:print("Libs: %s", libs)
file:print("Libs.private: ")
file:print("Cflags: %s", cflags)
file:close(…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@maluoi
Comment options

Answer selected by maluoi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants