#197 CMake Script Needs Modification

closed-accepted
nobody
moderate (59)
5
2013-04-04
2013-03-18
Jim
No

It would be nice if CMAKE_SOURCE_DIR was replaced with CMAKE_CURRENT_SOURCE_DIR.

This lets me just chain in freeglut with exsiting cmake project and build the whole mess with proper dependencies all over.
But, if included in another script, it cannot find <badroot>/config.h.in.

Changing the variable will not mean any difference if compiled with freeglut as a root project.

s/CMAKE_SOURCE_DIR/CMAKE_CURRENT_SOURCE_DIR/g

Discussion

  • Jim

    Jim - 2013-04-01

    Also, one should probably not set BUILD_STATIC_LIBS or BUILD_SHARED_LIBS. While they can be used to force global behavior, that will leak into other projects attempting to source-chain to you.

    I updated references to 'FREEGLUT_BUILD_STATIC_LIBS' or shared as appropriate, and all is quite well.

     
  • Diederick C. Niehorster

    Committed in r1575 and r1576, thanks! Should you have other comments on the CMake setup, please do let us know -- I'm the biggest expert on this stuff

     
  • Diederick C. Niehorster

    • status: open --> closed-accepted
     

Log in to post a comment.