[osg-users] [build] CMake can not find include files

95 views
Skip to first unread message

Peter Klose

unread,
Jun 3, 2018, 6:51:50 AM6/3/18
to osg-...@lists.openscenegraph.org
Hi,

i am trying to build OSG with MS Visual Studio 2013 on Windows7.
I have downloaded the latest release from git, same with CMake, but it seems that there are some files missing?
Any helb would be appreciated.

Thank you!

Cheers,
Peter

the cmake-messages:
------------------------------
The C compiler identification is MSVC 18.0.21005.1
The CXX compiler identification is MSVC 18.0.21005.1
Check for working C compiler: C:/Program Files/Microsoft Visual Studio 12.0/VC/bin/cl.exe
Check for working C compiler: C:/Program Files/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 12.0/VC/bin/cl.exe
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at OpenThreads/CMakeLists.txt:13 (INCLUDE):
INCLUDE could not find load file:

CheckAtomicOps


CMake Error: File C:/0_Arbeiten/OpenSceneGraph/src/PlatformSpecifics/Windows/OpenThreadsVersionInfo.rc.in does not exist.
CMake Error at OpenThreads/CMakeLists.txt:42 (CONFIGURE_FILE):
CONFIGURE_FILE Problem configuring file


Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE
CMake Error: File C:/0_Arbeiten/OpenSceneGraph/src/packaging/pkgconfig/openthreads.pc.in does not exist.
CMake Error at OpenThreads/CMakeLists.txt:111 (CONFIGURE_FILE):
CONFIGURE_FILE Problem configuring file


CMake Error at osg/CMakeLists.txt:460 (SETUP_LIBRARY):
Unknown CMake command "SETUP_LIBRARY".


CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.11)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
See also "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeOutput.log".
See also "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeError.log".

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73923#73923





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Robert Osfield

unread,
Jun 3, 2018, 7:04:35 AM6/3/18
to OpenSceneGraph Users
Hi Peter,

You shouldn't need to compile OpenThreads independently, just point
CMakeSetup at OpenSceneGraph/CMakeLists.txt and OpenThreads will be
built alongside the rest of the OSG.

Robert.

Peter Klose

unread,
Jun 3, 2018, 8:30:43 AM6/3/18
to osg-...@lists.openscenegraph.org

robertosfield wrote:
> Hi Peter,
>
> You shouldn't need to compile OpenThreads independently, just point
> CMakeSetup at OpenSceneGraph/CMakeLists.txt and OpenThreads will be
> built alongside the rest of the OSG.
>
> Robert.
>
> ------------------
> Post generated by Mail2Forum


Hi Robert,
i have changed the source path in Cmake to the "osg" subdirectory as you suggested, but now comes another error unknown cmake command
"SETUP_LIBRARY"

The C compiler identification is MSVC 18.0.21005.1
The CXX compiler identification is MSVC 18.0.21005.1
Check for working C compiler: C:/Program Files/Microsoft Visual Studio 12.0/VC/bin/cl.exe
Check for working C compiler: C:/Program Files/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 12.0/VC/bin/cl.exe
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at CMakeLists.txt:460 (SETUP_LIBRARY):
Unknown CMake command "SETUP_LIBRARY".


CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.11)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
See also "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeOutput.log".

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73926#73926

Robert Osfield

unread,
Jun 3, 2018, 12:49:37 PM6/3/18
to OpenSceneGraph Users
HI Peter,

It's the OpenSceneGraph/CMakeLists.txt that it the one you should open
in CMakeSetup. All the CMakeLists.txt below this will rely upon all
the setting/includes that it sets up.

Robert.

sam

unread,
Jun 3, 2018, 1:54:35 PM6/3/18
to OpenSceneGraph Users
Hi Peter,

Not sure how you're attempting to compile OSG but I'd recommend you'd do the following:

osg1.png
From here I would hit Configure and then Generate. Open up the ALL_BUILD project and right-click OpenThreads and hit build. This will ensure all the dependencies are in place.


Peter Klose

unread,
Jun 3, 2018, 6:28:09 PM6/3/18
to osg-...@lists.openscenegraph.org

robertosfield wrote:
> HI Peter,
>
> It's the OpenSceneGraph/CMakeLists.txt that it the one you should open
> in CMakeSetup. All the CMakeLists.txt below this will rely upon all
> the setting/includes that it sets up.
>
> Robert.
>
>
>


Hi Robert,

this is exactly the one i am referreing to and it is the one that spits out the error because of its last line saying :

SETUP_LIBRARY(${LIB_NAME})

How can a Cmake command be the cause for an error like this?
unknown cmake command

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73932#73932

Peter Klose

unread,
Jun 3, 2018, 6:38:52 PM6/3/18
to osg-...@lists.openscenegraph.org
Hi Sam,
i do not have any binaries so i don't see any way to set a path to it?
I am trying to build binaries and my hope was the delivered cmakelists.txt would be the key for this. As Robert pointed out the cmakelists.txt file in the src/osg directory should do the job but it spits the weird error that a cmake command is unknown to cmake. Weird.

sam wrote:
> Hi Peter,
>
>
> Not sure how you're attempting to compile OSG but I'd recommend you'd do the following:
>
>
>
>
> ​

> From here I would hit Configure and then Generate. Open up the ALL_BUILD project and right-click OpenThreads and hit build. This will ensure all the dependencies are in place.
>
>
>
>
>
>
>

> On Sun, Jun 3, 2018 at 9:49 AM Robert Osfield < ()> wrote:
>
>
> > HI Peter,
> >
> > It's the OpenSceneGraph/CMakeLists.txt that it the one you should open
> > in CMakeSetup.  All the CMakeLists.txt below this will rely upon all
> > the setting/includes that it sets up.
> >
> > Robert.
> >
> >
> >
>
>

> ------------------
> Post generated by Mail2Forum

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=73933#73933

Peter Klose

unread,
Jun 3, 2018, 7:08:57 PM6/3/18
to osg-...@lists.openscenegraph.org
Hi,
it seems my fault was to look into the "src" directory for the sources.
With the cmakelists.txt file in the base directory openscenegraph cmake worked succesfully.
Now it is only to find out how to find the project file for VC++ which might load the project into the IDE?

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73934#73934

sam

unread,
Jun 3, 2018, 7:53:38 PM6/3/18
to OpenSceneGraph Users
If you're generating the cmake file through the cmake application then it should be generated in your build folder. If you are using cmake on the command line then you will need to pass cmake -G "Visual Studio XX" to the command line, where XX is your Visual Studio version.
Reply all
Reply to author
Forward
0 new messages