Skip to content

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

@Marskey

Description

@Marskey

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;"
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions