Can't compile through CMake

Started by Kheartz, 09 November 2014, 23:37:45

Kheartz

Hello,

I am trying to compile TGUI against SFML.1 using CMake (through Visual Studio 12 2013). I receive the errors below:



I've been looking around to see if anyone else had similar problems; I couldn't find anyone else with this issue.
The directory for SFML_ROOT DOES contain include and lib. I've even been making copies of folders and moving them around to try and make it sync. The contents of "lib" and "Libs" are identical.



Thanks.


texus

That's weird.

SFML-2.1 contains the files downloaded from the sfml website (i.e. you didn't compile them yourself)?
So the lib folder contains no subfolders and has the dynamic release libraries in it directly?

Did you fill in anything manually in cmake except for SFML_ROOT? Like the include folder or the extlibs?

You might also want to check the "Advanced" checkbox and see if it finds some sfml libraries or simple none at all.

Kheartz

Thanks for your fast reply.


Right, I didn't compile it myself.
The lib folder actually contains two sub-directories "Debug" and "Release".

I had to fill in SFML_ROOT and SFML_INCLUDE_DIR manually, I'm not sure how the external libraries popped up on CMake the first time. I didn't have to manually insert those fields. I tried replicating it, but no luck.

KHeartz

texus

QuoteThe lib folder actually contains two sub-directories "Debug" and "Release".
That's wrong. Copy the contents of these folders directly into the lib folder. That will solve the problem.

QuoteI'm not sure how the external libraries popped up on CMake the first time
My cmake script detects them automatically if all goes right. But usually if it finds the external libs it also finds the sfml libs, that's why I was asking about it.

Kheartz

As soon as you inferred that there should be no sub-directories earlier, I went back and it worked! I could have sworn that these two folders were originally in the SFML 2.1 packages. I could be wrong.

Thanks for your assistance.

texus

These folders are not there in the official release, but I just checked and there isn't even an official release for VS2013. So I'm not sure where you got these libraries from, but the folder structure was not the same as the ones from the sfml website.

But it was the same problem as when you would compile sfml yourself. Visual Studio always creates these damn debug and release folders instead of just putting the libraries where you ask them to go.

Kheartz