Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/premakedeps - Double absolute paths #13926

Merged
merged 1 commit into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions conan/tools/premake/premakedeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@

# Helper class that expands cpp_info meta information in lua readable string sequences
class _PremakeTemplate(object):
def __init__(self, dep_cpp_info, pkg_folder):
def __init__(self, dep_cpp_info):
def _format_paths(paths):
if not paths:
return ""
return ",\n".join(f'"{pkg_folder}/{p}"'.replace("\\", "/") for p in paths)
return ",\n".join(f'"{p}"'.replace("\\", "/") for p in paths)

def _format_flags(flags):
if not flags:
Expand All @@ -106,7 +106,7 @@ def _format_flags(flags):
self.exelinkflags = _format_flags(dep_cpp_info.exelinkflags)
self.frameworks = ", ".join('"%s.framework"' % p.replace('"', '\\"') for p in
dep_cpp_info.frameworks) if dep_cpp_info.frameworks else ""
self.sysroot = f"{pkg_folder}/{dep_cpp_info.sysroot}".replace("\\", "/") \
self.sysroot = f"{dep_cpp_info.sysroot}".replace("\\", "/") \
if dep_cpp_info.sysroot else ""


Expand Down Expand Up @@ -211,7 +211,7 @@ def content(self):
var_filename = PREMAKE_VAR_FILE.format(pkgname=dep_name, config=conf_suffix)
self._output_lua_file(var_filename, [
PREMAKE_TEMPLATE_VAR.format(pkgname=dep_name,
config=conf_name, deps=_PremakeTemplate(dep_aggregate, dep.package_folder))
config=conf_name, deps=_PremakeTemplate(dep_aggregate))
])

# Create list of all available profiles by searching on disk
Expand Down