File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NBL_ROOT_PATH}/cmake" CACHE PATH "
6767get_property (NBL_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
6868
6969include (common)
70- #import .vsconfig file with VS components required for Nabla
71- if (WIN32 AND "${CMAKE_GENERATOR} " MATCHES "Visual Studio" )
72- option (NBL_ENABLE_VS_CONFIG_IMPORT "" OFF )
70+
71+ option (NBL_ENABLE_VS_CONFIG_IMPORT "Request import of .vsconfig file with VS components required to build Nabla" OFF )
72+
73+ if (NBL_ENABLE_VS_CONFIG_IMPORT)
7374 NBL_IMPORT_VS_CONFIG()
7475endif ()
7576
Original file line number Diff line number Diff line change @@ -1301,9 +1301,8 @@ macro(NBL_GET_ALL_TARGETS_RECURSIVE NBL_TARGETS NBL_DIRECTORY)
13011301endmacro ()
13021302
13031303function (NBL_IMPORT_VS_CONFIG)
1304- if (NBL_ENABLE_VS_CONFIG_IMPORT)
1305- message (STATUS "NOTICE: Configuration will continue after Visual Studio Installer is closed." )
1306- message (STATUS "To disable VS config import disable the NBL_IMPORT_VS_CONFIG option." )
1304+ if (WIN32 AND "${CMAKE_GENERATOR} " MATCHES "Visual Studio" )
1305+ message (STATUS "Requesting import of .vsconfig file! Configuration will continue after Visual Studio Installer is closed." )
13071306 set (NBL_DEVENV_ISOLATION_INI_PATH "${CMAKE_GENERATOR_INSTANCE} /Common7/IDE/devenv.isolation.ini" )
13081307 file (READ ${NBL_DEVENV_ISOLATION_INI_PATH} NBL_DEVENV_ISOLATION_INI_CONTENT)
13091308 string (REPLACE "/" "\\ " NBL_VS_INSTALLATION_PATH ${CMAKE_GENERATOR_INSTANCE} )
@@ -1312,11 +1311,14 @@ function(NBL_IMPORT_VS_CONFIG)
13121311
13131312 execute_process (COMMAND "${NBL_VS_INSTALLER_PATH} " modify --installPath "${NBL_VS_INSTALLATION_PATH} " --config "${NBL_ROOT_PATH} /.vsconfig" --allowUnsignedExtensions
13141313 ERROR_VARIABLE vsconfig_error
1315- RESULT_VARIABLE vsconfig_result)
1314+ RESULT_VARIABLE vsconfig_result
1315+ )
13161316
13171317 if (NOT vsconfig_result EQUAL 0)
13181318 message (FATAL_ERROR "Visual Studio Installer error: ${vsconfig_error} " )
13191319 endif ()
1320-
1320+ else ()
1321+ message (FATAL_ERORR "Cannot request importing VS config, doesn't meet requirements!" )
13211322 endif ()
1323+
13221324endfunction ()
You can’t perform that action at this time.
0 commit comments