I'd like to add a variable that the us开发者_运维技巧er must set after clicking "Configure" in cmake-gui. Is there a way to do this?
Using the set command, specify CACHE parameters, e.g.
set(NAME_INCLUDE "default value" CACHE FILEPATH "description")
set(NAME_LIB "default value" CACHE FILEPATH "description")
In the GUI CMake will group all variables with the same prefix.
See the CMake documentation for set.
精彩评论