[CMake] Corrupted CmakeLists.txt File how to heal it ?

Sonya Blade sonyablade2010 at hotmail.com
Tue Sep 9 08:05:20 EDT 2014


Hi Nils,You guess is correct it is not top level CMakeLists.txt, but actually originator instruct to do soand even instruct to add the additional lines to sub-level CMakeLists.txt. Probably I misinterpreted it,and probably this is what he meant:"Add the additional lines to the sub level CmakeLists but run the top-level Cmakelists file".
In in case modifying the auto generated code sounds weird to me, as a more experienced user than me do you spot any abnormalities by runing a quick eye at the code below ?
Originator Quote (OSG Cookbook){When we have the CMakeLists.txt file in the project folder (in projects/osgWeb), open it with any text editor and modify the last few lines:
find_path( OPENSCENEGRAPH_ROOT include/osg/Node PATHS$ENV{OSG_ROOT} )include_directories( ${OPENSCENEGRAPH_ROOT}/include )link_directories( ${Boost_LIBRARY_DIRS}${OPENSCENEGRAPH_ROOT}/lib )include_platform()target_link_libraries(${PROJECT_NAME} OpenThreadsosg osgDB osgGA osgViewer)}Regards,
> Date: Tue, 9 Sep 2014 13:56:15 +0200
> From: nilsgladitz at gmail.com
> To: sonyablade2010 at hotmail.com; cmake at cmake.org
> Subject: Re: [CMake] Corrupted CmakeLists.txt File how to heal it ?
> 
> On 09/09/2014 01:34 PM, Sonya Blade wrote:
> > I Use Cmake-GUI 2.8.12.2 to configure the CMakeLists.txt file but no
> > matter which compiler I set ( I prefer Code::Blocks MinGW Makefile)
> >   Cmake-GUI produces the "Error in configurition process, project files
> > may be invalid" dialog, with following report,
> >
> > /CMake Error at CMakeLists.txt:11 (Project):
> > project PROJECT called with incorrect number of arguments
> >
> > /
> > /CMake Error at CMakeLists.txt:39 (include_platform):
> > Unknown CMake command "include_platform".
> >
> > /
> > /Configuring incomplete, errors occurred!/
> > /
> > /
> > What is wrong here I 'll appreciate your guidance,
> 
> Is it possible that this isn't the top-level CMakeLists.txt?
> 
> It looks like the PLUGIN_NAME variable isn't set which is probably why 
> project() complains.
> 
> Also I see nothing that would define the include_platform() 
> function/macro which is missing.
> 
> Maybe both the variable and the function/macro are set up in a parent 
> CMakeLists.txt?
> 
> Nils
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140909/079c2f7d/attachment-0001.html>


More information about the CMake mailing list