Hello,

I believe the usual way to call cmake is to create the build directory, 
change to it and call cmake with the path to the source dir, e.g.

mkdir build
cd build
cmake <path-to-opensg-source-tree>

I typically specify the type of build and the install destination as 
well, leading to a cmake call like:

cmake -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_INSTALL_PREFIX=$HOME/software/opensg2 <path-to-opensg-source-tree>

This will check for optional components (image format libraries, VTK, 
Qt, etc.) and configure the build with what is available.

        Cheers,
                Carsten

On 2017-01-06 13:10, Daniel Sperka wrote:
>    Can someone please give me commands to build opensg2 on linux? I'm
> looking at porting existing osg1.8 code to osg2, so I need to build
> libOSGSystem and libOSGWindowX (don't need GLUT or Qt)
>
> I'm not familiar with cmake or its conventions and cannot grok the
> correct incantations. Here is what I've tried so far:
>
> * Downloaded snapshot of opensg2 from sourceforge
> * create folder 'Build' root dir of opensg code
> * run cmake like so:
>
> cmake -DOpenSG_BINARY_DIR=./Build \
>                                   -DOSG_ENABLE_VTK=OFF \
>                                   -DOSG_ENABLE_C++11=ON \
>                                   -DOSG_ENABLE_FCD2CODE=ON \
>                                   -DOSG_VERBOSE_BUILD_MESSAGES=ON
>
> [ Note - I fumbled with the variables here by scanning CCacheLists.txt -
> please advise ]
>
> * cmake gives error like this:
>
> Error copying file "/home/dan/src/opensg2/OpenSG/OSGConfigured.h.cmake"
> to
> "/home/dan/src/opensg2/OpenSG/Source/Base/Base/OSGConfigured.h.tmp.cmake".
>
> - running make in spite of error gives
>
>
> [---cut---]
> /home/dan/src/opensg2/OpenSG/Source/Base/Base/OSGConfigured.h:14:2:
> error: #endif without #if
>  #endif // _OSGCONFIGURED_H_
> [---cut---]
>
>
>
> *** Contents of OSGConfigured.h
>
> [---START---]
> /* #undef OSG_WITH_NVSDKCOMMON */
>
> /* #undef OSG_WITH_NVOCLUTILS */
>
> /* #undef OSG_WITH_CUDACOMMON */
>
> /* #undef OSG_WITH_CUDAUTIL */
>
> /* #undef OSG_WITH_CUDPP */
>
> /* #undef OSG_WITH_CG */
>
> #endif // _OSGCONFIGURED_H_
> [---END---]
>
>
>
>
>
> Clearly something is broke, and I suspect I've just missed some obvious
> cmake setting. Can anyone guide me?
>
> Thanks!
>
> Dan
>
>
> --
> Daniel J. Sperka, Ph. D.
> UC Davis Center for Neuroscience
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to