# GUI中会显示选项,默认为ON
option(Build_SWIG_DotNet "Build Swig DotNet..." OFF)
# 这里只是判断变量是否被定义过,无法判断是ON,还是OFF
if(Build_SWIG_DotNet)
#Build_SWIG_DotNet变量,被定义过
#option中已经定义了Build_SWIG_DotNet变量,所以Build_SWIG_DotNet无论是ON,还是OFF,都会进来!
else()
#Build_SWIG_DotNet变量,没有被定义过
end()
# 这才是判断是ON,还是OFF
if(${Build_SWIG_DotNet} STREQUAL "ON")
#编译swig dotnet模块
else()
#不编译swig dotnet模块
end()