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

the path resolve of $(SolutionDir) is not corrected #140

Open
Marskey opened this issue Mar 4, 2022 · 0 comments
Open

the path resolve of $(SolutionDir) is not corrected #140

Marskey opened this issue Mar 4, 2022 · 0 comments

Comments

@Marskey
Copy link

Marskey commented Mar 4, 2022

It should be fix by following

def resolve_path_variables_of_vs(context, path_with_vars):
    """ Evaluates paths with visual studio variables """
    path_with_vars = path_with_vars.replace('$(ProjectDir)', './')
    rel_path = os.path.relpath(context.solution_path, context.cmake)
    path_with_vars = path_with_vars.replace('$(SolutionDir)', rel_path + '/')
    return path_with_vars

otherwise the output of cmakelist will be wrong like this:

target_include_directories(${PROJECT_NAME} PUBLIC
    "${CMAKE_CURRENT_SOURCE_DIR}/User/Name/solution/project/xxx;"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant