Skip to content

Commit 1e4a7c5

Browse files
committed
Drop VsDevCmd.cmake hack because we use MSBuild
This stop overwriting CMakeUserPresets.json too.
1 parent b11e270 commit 1e4a7c5

File tree

3 files changed

+4
-134
lines changed

3 files changed

+4
-134
lines changed

CMakePresets.json

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
{
6161
"name": "linux-tiles-sounds-x64-vcpkg",
6262
"configurePreset": "linux-tiles-sounds-x64-vcpkg"
63+
},
64+
{
65+
"name": "windows-tiles-sounds-x64-msvc",
66+
"configurePreset": "windows-tiles-sounds-x64-msvc"
6367
}
6468
],
6569
"testPresets": [

build-scripts/VsDevCmd.cmake

-115
This file was deleted.

build-scripts/windows-tiles-sounds-x64-msvc.cmake

-19
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ Pre-load script for Microsoft Visual Studio builds.
77
88
Used by CMakePresets.json -> "cacheVariables" -> "CMAKE_PROJECT_INCLUDE_BEFORE".
99
10-
When CMake does not run under VS environment, it sources the VsDevCmd.bat on it own.
11-
It then writes CMakeUserPresets.json -> "buildPresets" -> "environment"
12-
1310
#]=======================================================================]
1411

1512
# Ref https://github.com/actions/virtual-environments/blob/win19/20220515.1/images/win/Windows2019-Readme.md#environment-variables
@@ -20,19 +17,3 @@ endif()
2017
if ("$ENV{VCPKG_ROOT}" STREQUAL "" AND WIN32)
2118
set(ENV{VCPKG_ROOT} $CACHE{VCPKG_ROOT})
2219
endif()
23-
24-
include(${CMAKE_SOURCE_DIR}/build-scripts/VsDevCmd.cmake)
25-
26-
# It's fine to keep @_MSVC_DEVENV@ undefined
27-
set(BUILD_PRESET_NAME "windows-tiles-sounds-x64-msvc")
28-
set(CONFIGURE_PRESET "windows-tiles-sounds-x64-msvc")
29-
configure_file(
30-
${CMAKE_SOURCE_DIR}/build-scripts/CMakeUserPresets.json.in
31-
${CMAKE_SOURCE_DIR}/CMakeUserPresets.json
32-
@ONLY
33-
)
34-
35-
# Ninja is provided by Microsoft but not in the Path
36-
if (CMAKE_GENERATOR MATCHES "^Ninja")
37-
set(CMAKE_MAKE_PROGRAM $ENV{DevEnvDir}\\CommonExtensions\\Microsoft\\CMake\\Ninja\\ninja.exe CACHE PATH "")
38-
endif()

0 commit comments

Comments
 (0)