Universal Windows App Error "Could not find 'resources.pri'" Problem in <ProjectPriFullPath> in .vcxproj
When I try to build and deploy a Universal Windows App project created by CMake 3.6.2, I am getting an error: Error DEP1000 : Cannot copy file "resources.pri" to layout "D:\Users\soji\ysbin\uwp\exe\Release\AppX\resources.pri". Could not find file 'resources.pri'. UWP_00_MinimumApp
MSBuild seems to occasionally fail to copy resources.pri to the deployment location, but the error message should include the full-path name of resources.pri like 'Cannot copy file "X:\Abc\Def\resources.pri"'. But, my error message only says 'Cannot copy file "resources.pri"'.
I looked into the .vcxproj file, and found a line: $(TargetDir)resources.pri
I was able to fix the problem by manually correcting .vcxproj file as:
- Writing full-path name instead of $(TargetDir)resources.pri, or
- Deleting this line.
The problem seems to be the variable $(TargetDir) is empty or doesn't exist at all. I suppose the solution is CMake write the full-path name in this tag instead of using $(TargetDir), or not writing this tag at all.
By the way, I am trying to build cross-platform OpenGL ES 2.0/2.0 programs. It would be nice if CMake supports nuget packages so that I don't have to use a hack to automatically download and add a reference to "ANGLE.WindowsStore" package from a .vcxproj.