0

So for a class we have a couple of programs where we are using opengl. To make setup easier we started by cloning glitter https://github.com/Polytonic/Glitter. I then compliled it according to the instructions for visual studio 2017 and added my code to the project I am working on. I did this on my desktop computer but saved the files in onedrive. When I open the same project on my laptop and try to build the project I get the error "the source directory D:/OneDrive/fall_2017/Glitter does not appear to contain CMakeLists.txt" and several other similar errors. On my laptop the directory to the files is C:/Users/Me/OneDrive/fall_2017/Glitter. The visual studio program lists the full path as D:/OneDrive/fall_2017/Glitter which is the path of the folder on my desktop.

Is there a way for me to change the filepath or is the issue with my cmake file? Do I have to rebuild it for every computer I use it on? I don't know a whole lot about visual studio so I don't know what I need to change to get this to work.

genpfault
  • 51,148
  • 11
  • 85
  • 139
greyer
  • 97
  • 1
  • 13
  • 4
    CMake-generated solutions aren't portable, commit the `CMakeLists.txt` file and generate solutions as-needed on other machines. – genpfault Oct 11 '17 at 20:46
  • Yes, you have to rebuild it on every computer. – usr1234567 Oct 11 '17 at 21:06
  • Thanks. I did not realize that I had to rebuild it for every computer. Now that I know that I can actually get my work done instead of trying to solve a problem that can't be solved. – greyer Oct 11 '17 at 21:08
  • Possible duplicate of [How to tell CMake to use relative paths](https://stackoverflow.com/questions/45856955/how-to-tell-cmake-to-use-relative-paths). And please consider that VS2017 now has the "Open Folder" feature. So no need anymore for `.sln`/`.vcxproj` files handling when using CMake enabled projects. – Florian Oct 13 '17 at 06:59

1 Answers1

0

Turns out I have to rebuild on every computer. Thanks to those who left comments.

greyer
  • 97
  • 1
  • 13