Reputation: 39
I am updating a build script from premake4 to an older version of premake5 with no "workspace" concept, but still the "solution" one.
When I run premake, I have custom options to build two vs2015 solutions A and B:
premake5.exe --A --B vs2015
I would like the project in B to have a reference on a project in A (ProjectReference). But it seems to do not find any project A and I am wondering if it because the project A is only searched inside the solution B, and not also A.
With premake4, we also had the function "vc2010.projectReferences" which called "premake.getdependencies" with premake.findproject inside.
But with premake5, the "findproject" seems to be called on the scope of the current solution/workspace (premake.solution(/workspace).findproject(cfg.solution, depproj))
Does that mean that I can't link my project B with a project A if there are not in the same solution ? Do I have to use the "external" api ?
Upvotes: 0
Views: 901
Reputation: 4276
Premake's links() function only works with projects in the same solution. But you can use externalproject() to link against a project that is not part of the solution.
externalproject "MyExternalProject"
location "build/MyExternalProject"
uuid "57940020-8E99-AEB6-271F-61E0F7F6B73B"
kind "StaticLib"
language "C++"
Upvotes: 1