[Cmake] Resetting a variable

John Biddiscombe john.biddiscombe@mirada-solutions.com
Thu, 1 May 2003 16:00:32 +0100


> 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)
>=20
> # 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