Browse Source

CMake: remove CMAKE_BUILD_TYPE from configure presets

Since we use Visual Studio as generator, CMAKE_BUILD_TYPE doesn't make
sense, since configuration (release/debug) is specified on build step,
not configure step.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
pull/652/head
Lev Stipakov 1 year ago committed by Lev Stipakov
parent
commit
ab3c42b75e
  1. 6
      .github/workflows/msbuild.yml
  2. 6
      CMakeLists.txt
  3. 92
      CMakePresets.json

6
.github/workflows/msbuild.yml

@ -54,15 +54,15 @@ jobs:
- name: Run CMake consuming CMakePreset.json and vcpkg.json by mean of vcpkg.
uses: lukka/run-cmake@v10
with:
configurePreset: '${{ matrix.arch }}-release${{ matrix.ovpn3.preset }}'
configurePreset: '${{ matrix.arch }}${{ matrix.ovpn3.preset }}'
buildPreset: '${{ matrix.arch }}-release${{ matrix.ovpn3.preset }}'
- uses: actions/upload-artifact@v3
with:
name: openvpn-gui_${{ matrix.arch }}${{ matrix.ovpn3.upload_name }}
path: |
out/build/${{ matrix.arch }}-release${{ matrix.ovpn3.preset }}/*.dll
out/build/${{ matrix.arch }}-release${{ matrix.ovpn3.preset }}/*.exe
out/build/${{ matrix.arch }}${{ matrix.ovpn3.preset }}/Release/*.dll
out/build/${{ matrix.arch }}${{ matrix.ovpn3.preset }}/Release/*.exe
mingw:
strategy:

6
CMakeLists.txt

@ -153,12 +153,6 @@ target_compile_definitions(${TEST_PLAP_EXE} PRIVATE
HAVE_CONFIG_H)
if(MSVC)
# work around msvc generator Debug/Release directory ugliness, doesn't apply for Ninja
set_target_properties(${PROJECT_NAME} ${PROJECT_NAME_PLAP} ${TEST_PLAP_EXE} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<0:>
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<0:>
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<0:>)
target_compile_options(${PROJECT_NAME} PRIVATE "$<$<CONFIG:Release>:/Zi>")
target_link_options(${PROJECT_NAME} PRIVATE
"$<$<CONFIG:Release>:/DEBUG:FULL>"

92
CMakePresets.json

@ -16,39 +16,25 @@
},
{
"name": "x64",
"hidden": true,
"inherits": "base",
"architecture": {
"value": "x64"
}
},
{
"name": "arm64",
"hidden": true,
"inherits": "base",
"architecture": {
"value": "arm64"
}
},
{
"name": "x86",
"hidden": true,
"inherits": "base",
"architecture": {
"value": "Win32"
}
},
{
"name": "debug",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "release",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "ovpn3",
"hidden": true,
@ -57,113 +43,77 @@
}
},
{
"name": "x64-debug",
"inherits": [ "base", "x64", "debug" ]
"name": "x64-ovpn3",
"inherits": [ "x64", "ovpn3" ]
},
{
"name": "arm64-debug",
"inherits": [ "base", "arm64", "debug" ]
"name": "arm64-ovpn3",
"inherits": [ "arm64", "ovpn3" ]
},
{
"name": "x86-debug",
"inherits": [ "base", "x86", "debug" ]
},
{
"name": "x64-release",
"inherits": [ "base", "x64", "release" ]
},
{
"name": "arm64-release",
"inherits": [ "base", "arm64", "release" ]
},
{
"name": "x86-release",
"inherits": [ "base", "x86", "release" ]
},
{
"name": "x64-debug-ovpn3",
"inherits": [ "x64-debug", "ovpn3" ]
},
{
"name": "arm64-debug-ovpn3",
"inherits": [ "arm64-debug", "ovpn3" ]
},
{
"name": "x86-debug-ovpn3",
"inherits": [ "x86-debug", "ovpn3" ]
},
{
"name": "x64-release-ovpn3",
"inherits": [ "x64-release", "ovpn3" ]
},
{
"name": "arm64-release-ovpn3",
"inherits": [ "arm64-release", "ovpn3" ]
},
{
"name": "x86-release-ovpn3",
"inherits": [ "x86-release", "ovpn3" ]
"name": "x86-ovpn3",
"inherits": [ "x86", "ovpn3" ]
}
],
"buildPresets": [
{
"name": "x64-release",
"configurePreset": "x64-release",
"configurePreset": "x64",
"configuration": "Release"
},
{
"name": "x86-release",
"configurePreset": "x86-release",
"configurePreset": "x86",
"configuration": "Release"
},
{
"name": "arm64-release",
"configurePreset": "arm64-release",
"configurePreset": "arm64",
"configuration": "Release"
},
{
"name": "x64-debug",
"configurePreset": "x64-debug",
"configurePreset": "x64",
"configuration": "Debug"
},
{
"name": "x86-debug",
"configurePreset": "x86-debug",
"configurePreset": "x86",
"configuration": "Debug"
},
{
"name": "arm64-debug",
"configurePreset": "arm64-debug",
"configurePreset": "arm64",
"configuration": "Debug"
},
{
"name": "x64-release-ovpn3",
"configurePreset": "x64-release-ovpn3",
"configurePreset": "x64-ovpn3",
"configuration": "Release"
},
{
"name": "x86-release-ovpn3",
"configurePreset": "x86-release-ovpn3",
"configurePreset": "x86-ovpn3",
"configuration": "Release"
},
{
"name": "arm64-release-ovpn3",
"configurePreset": "arm64-release-ovpn3",
"configurePreset": "arm64-ovpn3",
"configuration": "Release"
},
{
"name": "x64-debug-ovpn3",
"configurePreset": "x64-debug-ovpn3",
"configurePreset": "x64-ovpn3",
"configuration": "Debug"
},
{
"name": "x86-debug-ovpn3",
"configurePreset": "x86-debug-ovpn3",
"configurePreset": "x86-ovpn3",
"configuration": "Debug"
},
{
"name": "arm64-debug-ovpn3",
"configurePreset": "arm64-debug-ovpn3",
"configurePreset": "arm64-ovpn3",
"configuration": "Debug"
}
]

Loading…
Cancel
Save