
Trying to compile latest sources on LInux (Ubuntu) using CMake and get the following output after executing
cmake .
command:
CMake Error at CMakeLists.txt:1227 (include):
include could not find load file:
FindGTest
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
X11_LIBRARIES (ADVANCED)
linked by target "clonk" in directory /home/sad/apps/openclonk
linked by target "clonk" in directory /home/sad/apps/openclonk
First error relates to
include(FindGTest)
line in CMakeLists.txt file. Can anyone give a hint to where this FindGTest file can be found?My interest lies in the second error. I have certainly installed ALL the depencies mentioned in README.linux file but it seems to still be not enough. Any help with that?
Thanks...
I wonder if you have /usr/share/cmake-2.8/Modules/FindGTest.cmake and /usr/include/X11/X.h (just assuming your Ubuntu is similar to mine.)
Those Files come with cmake-data and x11proto-core-dev, so maybe you could reinstall those?
Those Files come with cmake-data and x11proto-core-dev, so maybe you could reinstall those?

The problem with X11 was in the file /usr/include/X11/XLib.h which on MY system was located at /usr/X11R6/include/XLib.h. A simple symbolic link did the trick.
Also the deletion of CMakeCache.txt was needed as Günther sugested below.
As for the problem with FindGTest - it lies in the fact that I am using CMake 2.6.0 whereas Google Testing Framework support was added in version 2.7 or such. Will install latest CMake 2.8 to see if this solves the problem.
Regarding that and that debian stale now provides CMake 2.8.2, I'd set the Version requirement to 2.8. Or does anyone still have an oldstable cmake and wants to fix that?

Keep wondering how OC even RUNS on such an old system...

> /usr/X11R6/include/XLib.h
Wow, that's ancient. But the tricks to making that work should still be present in CMake. I'd recommend trying a newer Debian release, though. The radeon driver ought to still work.
The google testing stuff is optional, so any non-fatal complaining about it is harmless.



Removing of CMakeCache.txt was indeed necessary in order for CMake to relocate X11 headers after I created a link to files Caesar stated to be necessary.
Any workaround for this specific problem will be an overkill for different systems have a habbit to store exaclty the same files in slightly different locations. Manual fixes (like the one I had to apply) are the best solution for these kind of problems (which, by the way will only happen to people who compile OC from sources - who should be competent enough to know how to do it).
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill