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 "
67
67
get_property (NBL_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
68
68
69
69
include (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 )
73
74
NBL_IMPORT_VS_CONFIG ()
74
75
endif ()
75
76
Original file line number Diff line number Diff line change @@ -1301,9 +1301,8 @@ macro(NBL_GET_ALL_TARGETS_RECURSIVE NBL_TARGETS NBL_DIRECTORY)
1301
1301
endmacro ()
1302
1302
1303
1303
function (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." )
1307
1306
set (NBL_DEVENV_ISOLATION_INI_PATH "${CMAKE_GENERATOR_INSTANCE} /Common7/IDE/devenv.isolation.ini" )
1308
1307
file (READ ${NBL_DEVENV_ISOLATION_INI_PATH} NBL_DEVENV_ISOLATION_INI_CONTENT )
1309
1308
string (REPLACE "/" "\\ " NBL_VS_INSTALLATION_PATH ${CMAKE_GENERATOR_INSTANCE} )
@@ -1312,11 +1311,14 @@ function(NBL_IMPORT_VS_CONFIG)
1312
1311
1313
1312
execute_process (COMMAND "${NBL_VS_INSTALLER_PATH} " modify --installPath "${NBL_VS_INSTALLATION_PATH} " --config "${NBL_ROOT_PATH} /.vsconfig" --allowUnsignedExtensions
1314
1313
ERROR_VARIABLE vsconfig_error
1315
- RESULT_VARIABLE vsconfig_result )
1314
+ RESULT_VARIABLE vsconfig_result
1315
+ )
1316
1316
1317
1317
if (NOT vsconfig_result EQUAL 0 )
1318
1318
message (FATAL_ERROR "Visual Studio Installer error: ${vsconfig_error} " )
1319
1319
endif ()
1320
-
1320
+ else ()
1321
+ message (FATAL_ERORR "Cannot request importing VS config, doesn't meet requirements!" )
1321
1322
endif ()
1323
+
1322
1324
endfunction ()
You can’t perform that action at this time.
0 commit comments