[Cmake] Resetting a variable
John Biddiscombe
john.biddiscombe at mirada-solutions.com
Thu May 1 11:00:32 EDT 2003
> IF(MAC_USE_X)
> # create a cache value for the X opengl, users can set this one
> SET(MAC_OPEN_GL_X openglx CACHE)
> # set the real open gl to the X value with a force
> # users will no longer be able to change this value
> SET(REAL_OPEN_GL ${MAC_OPEN_GL_X} CACHE INTERNAL FORCE)
> ENDIF(MAC_USE_X)
>
> # repeat the same for the native
> IF(MAC_USE_NATIVE)
> SET(MAC_OPEN_GL_NATIVE openglnative CACHE)
> SET(REAL_OPEN_GL ${MAC_OPEN_GL_NATIVE} CACHE FORCE)
> ENDIF(MAC_USE_NATIVE)
It's Good. I'll use this approach myself. (A bit long winded, but doesn't require any new commands!)
Thanks
JB
More information about the CMake
mailing list