Make CS Loader implementation dependant of DOTNET_COMMAND.
@@ -31,20 +31,20 @@ message(STATUS "Plugin ${target} implementation")
if(DOTNET_VERSION VERSION_EQUAL "2.0" OR DOTNET_VERSION VERSION_GREATER "2.0")
add_custom_target(${target} ALL
- COMMAND dotnet restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj
- COMMAND dotnet publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj -o ${CMAKE_BINARY_DIR}
+ COMMAND ${DOTNET_COMMAND} restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj
+ COMMAND ${DOTNET_COMMAND} publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj -o ${CMAKE_BINARY_DIR}
)
else()
if(DOTNET_MIGRATE)
add_custom_target(${target} ALL
- COMMAND dotnet migrate ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json
- COMMAND dotnet restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json
- COMMAND dotnet publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json -o ${CMAKE_BINARY_DIR}
+ COMMAND ${DOTNET_COMMAND} migrate ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json
+ COMMAND ${DOTNET_COMMAND} restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json
+ COMMAND ${DOTNET_COMMAND} publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json -o ${CMAKE_BINARY_DIR}
)
else()
add_custom_target(${target} ALL
- COMMAND dotnet restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json
- COMMAND dotnet publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json -o ${CMAKE_BINARY_DIR}
+ COMMAND ${DOTNET_COMMAND} restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json
+ COMMAND ${DOTNET_COMMAND} publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json -o ${CMAKE_BINARY_DIR}
)
endif()
endif()
