Try setting the variable in the CACHE
SET(FOO_BUILD_SHARED OFF CACHE BOOL "Build libfoo shared library")
Note: You need to specify the variable type and a description so CMake knows how to display this entry in the GUI.
Try setting the variable in the CACHE
SET(FOO_BUILD_SHARED OFF CACHE BOOL "Build libfoo shared library")
Note: You need to specify the variable type and a description so CMake knows how to display this entry in the GUI.