diff options
-rw-r--r-- | .github/workflows/build.yml | 20 | ||||
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | CMakeLists.txt | 48 | ||||
-rw-r--r-- | README.md | 53 | ||||
-rwxr-xr-x | tools/deploy.sh | 81 | ||||
-rw-r--r-- | tools/windows_buildenv.bat | 112 |
6 files changed, 254 insertions, 70 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 549528282b..0d069c2de7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,7 +108,12 @@ jobs: - name: "[Windows] Install additional build tools" if: runner.os == 'Windows' - run: python -m pip install ninja git+https://github.com/frerich/clcache.git + # TODO: Add ninja, clcache and rsync to the windows buildenv + run: | + python -m pip install ninja git+https://github.com/frerich/clcache.git + $Env:PATH="C:\msys64\usr\bin;$Env:PATH" + pacman -S --noconfirm coreutils bash rsync openssh + Add-Content -Path "$Env:GITHUB_ENV" -Value "PATH=$Env:PATH" - name: "[Windows] Set up MSVC Developer Command Prompt" if: runner.os == 'Windows' @@ -265,15 +270,18 @@ jobs: run: signtool sign /f $Env:WINDOWS_CODESIGN_CERTIFICATE_PATH /p $Env:WINDOWS_CODESIGN_CERTIFICATE_PASSWORD *.msi working-directory: build - - name: "[macOS] Upload build to downloads.mixxx.org" + - name: "[macOS/Windows] Upload build to downloads.mixxx.org" # skip deploying Ubuntu builds to downloads.mixxx.org because these are deployed to the PPA - if: runner.os == 'macOS' && env.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD != null - run: tools/deploy.sh + if: runner.os != 'Linux' && github.event_name == 'push' && env.SSH_PASSWORD != null + run: bash tools/deploy.sh ${{ matrix.artifacts_path }} env: - FILE_TO_DEPLOY: ${{ matrix.artifacts_path }} + DESTDIR: public_html/downloads/builds OS: ${{ runner.os }} - DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }} + SSH_HOST: downloads-hostgator.mixxx.org SSH_KEY: packaging/certificates/downloads-hostgator.mixxx.org.key + SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }} + SSH_USER: mixxx + UPLOAD_ID: ${{ github.run_id }} - name: "Upload GitHub Actions artifacts" uses: actions/upload-artifact@v2 diff --git a/.gitignore b/.gitignore index 2808c3d7c0..df5dbb89a5 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,13 @@ compile_commands.json # Exclude buildenv directory from our helper scripts /buildenv/ + +# CMake build configurations, generated by tools/windows_buildenv.bat +CMakeSettings.json + +# Build and distribution directories for various build configurations +/build/ +/install/ + +# VisualStudio project files +/.vs/ diff --git a/CMakeLists.txt b/CMakeLists.txt index bea844cdc3..c95899660e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,8 +83,17 @@ endif() # set(OPTIMIZE "portable" CACHE STRING "Optimization and Tuning (set to off, portable, native, legacy, fastbuild)") message(STATUS "Optimization level: ${OPTIMIZE}") -if(NOT OPTIMIZE STREQUAL "off") - if(MSVC) + +if(MSVC) + # Microsoft Visual Studio Compiler + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # Target architecture is x64 -> x64 has alsways SSE and SSE2 instruction sets + message(STATUS "x64 Enabling SS2 CPU optimizations (>= Pentium 4)") + # Define gcc/clang style defines for SSE and SSE2 for compatibility + add_compile_definitions("__SSE__" "__SSE2__") + endif() + + if(NOT OPTIMIZE STREQUAL "off") # Use the fastest floating point math library # http://msdn.microsoft.com/en-us/library/e7s85ffb.aspx # http://msdn.microsoft.com/en-us/library/ms235601.aspx @@ -97,10 +106,6 @@ if(NOT OPTIMIZE STREQUAL "off") add_compile_options(/Gy) add_link_options(/OPT:REF /OPT:ICF) - # Don't worry about aligning code on 4KB boundaries - # ALBERT: NOWIN98 is not supported in MSVC 2010. - #add_link_options(mixxx-lib PUBLIC "/OPT:NOWIN98") - # http://msdn.microsoft.com/en-us/library/59a3b321.aspx # In general, you should pick /O2 over /Ox add_compile_options($<$<NOT:$<CONFIG:Debug>>:/O2>) @@ -130,22 +135,39 @@ if(NOT OPTIMIZE STREQUAL "off") endif() if(OPTIMIZE STREQUAL "portable" OR OPTIMIZE STREQUAL "fastbuild") - message(STATUS "Enabling SS2 CPU optimizations (>= Pentium 4)") - # SSE and SSE2 are core instructions on x64 - # and consequently raise a warning message from compiler with this flag on x64. if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + # Target architecture is x86 with SSE and SSE2 + message(STATUS "x86 Enabling SS2 CPU optimizations (>= Pentium 4)") + # Define gcc/clang style defines for SSE and SSE2 for compatibility + add_compile_definitions("__SSE__" "__SSE2__") + # Set compiler option for SSE/SSE2 add_compile_options(/arch:SSE2) endif() - add_compile_definitions("__SSE__" "__SSE2__") elseif(OPTIMIZE STREQUAL "native") - message("Enabling native optimizations for ${CMAKE_SYSTEM_PROCESSOR}") + message("Enabling optimizations for native system, specified by user") + if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + # Target architecture is x86 with SSE and SSE2 + message(STATUS "x86 Enabling SS2 CPU optimizations (>= Pentium 4)") + # Define gcc/clang style defines for SSE and SSE2 for compatibility + add_compile_definitions("__SSE__" "__SSE2__") + endif() + # Define the target processor instruction and other compiler optimization flags here: + # https://docs.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-160 + # add_compile_options(/arch:AVX512) + message(FATAL_ERROR "User need to set the MSVC compiler flags for the native processor here!") add_compile_options("/favor:${CMAKE_SYSTEM_PROCESSOR}") elseif(OPTIMIZE STREQUAL "legacy") - message("Enabling pure i386 code") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + message("Enabling pure x64 instruction set (without AVX etc.)") + else() + message("Enabling pure i386 instruction set (without SSE/SSE2 etc.)") + endif() else() message(FATAL_ERROR "Invalid value passed to OPTIMIZE option: ${OPTIMIZE}") endif() - elseif(GNU_GCC OR LLVM_CLANG) + endif() +elseif(GNU_GCC OR LLVM_CLANG) + if(NOT OPTIMIZE STREQUAL "off") # Common flags to all optimizations. # -ffast-math will prevent a performance penalty by denormals # (floating point values almost Zero are treated as Zero) @@ -31,24 +31,42 @@ Have a bug or feature request? [File a bug on Launchpad][fileabug]. Want to get involved in Mixxx development? Assign yourself a bug from the [easy bug list][easybugs] and get started! -## Compiling - -* macOS [![Build Status](https://travis-ci.org/mixxxdj/mixxx.svg)](https://travis-ci.org/mixxxdj/mixxx) -* Ubuntu / Windows [![Build status](https://ci.appveyor.com/api/projects/status/j460rficblcaopwx?svg=true)](https://ci.appveyor.com/project/mixxxdj/mixxx) -* Jenkins [![Build status](https://img.shields.io/jenkins/s/https/builds.mixxx.org/job/master-release.svg)](https://builds.mixxx.org/job/master-release) - -First, you must install all of Mixxx's dependencies. To compile Mixxx using -[CMake], run: - +## Compiling on Linux $ mkdir build $ cd build $ cmake .. $ cmake --build . +Please see our helpful guide on the [wiki] for more information: [Compiling on Linux] -Please see our helpful guides on the [wiki] for more information: -- [Compiling on Linux] -- [Compiling on macOS] -- [Compiling on Windows] +## Compiling on MacOS + $ mkdir build + $ cd build + $ cmake .. + $ cmake --build . +Please see our helpful guide on the [wiki] for more information: [Compiling on MacOS] + +## Compiling on Windows +### Build Requirements +- Windows 7 or later +- MS Visual Studio 2019 (Community Edition is free of charge) +- At least 10G free diskspace +- To create an .msi installer, you need to install the WiX toolkit from https://wixtoolset.org/releases/ +### Setup your build environment +1. Download these sources (using git checkout as described in [Using Git]) +2. Run the batch file `tools\windows_buildenv.bat` + - This file downloads the prebuild Mixxx environment, defined in `cmake\windows_build_environment_name` from https://downloads.mixxx.org/builds/buildserver/2.3.x-windows/ + - Generates the `CMakeSettings.json` with the matching build configurations for Visual Studio +3. Start Visual Studio, choose "Open a local folder" select the `mixxx` directory containing `CMakeSettings.json` +4. Menu "Project" -> "Generate Cache for mixxx" +5. Select the build configuration in the toolbar (`x64__fastbuild` is recommended) +6. Menu "Build" -> "Build All" +### Creating an .msi installer (optional) +7. Than open the Visual Studio 'Developer Command Prompt' by Menu -> "Tools" -> "Command line" -> "Developer Command Prompt" +8. Go to your build directory, e.g. by "cd .\build\x64-fastbuild" +9. Run "cpack -G WIX" + + +Please see also our helpful guide on the [wiki] for more information: [Compiling on Windows] ## Documentation @@ -94,12 +112,13 @@ license. [facebook]: https://www.facebook.com/pages/Mixxx-DJ-Software/21723485212 [blog]: https://mixxxblog.blogspot.com [manual]: https://www.mixxx.org/manual/latest/ -[wiki]: https://www.mixxx.org/wiki/ +[wiki]: https://github.com/mixxxdj/mixxx/wiki [faq]: https://mixxx.org/wiki/doku.php/faq [forums]: https://www.mixxx.org/forums/ -[compiling on linux]: https://mixxx.org/wiki/doku.php/compiling_on_linux -[compiling on macOS]: https://mixxx.org/wiki/doku.php/compiling_on_os_x -[compiling on windows]: https://mixxx.org/wiki/doku.php/compiling_on_windows +[Compiling on Linux]: https://github.com/mixxxdj/mixxx/wiki/Compiling%20on%20Linux +[Compiling on MacOS]: https://github.com/mixxxdj/mixxx/wiki/Compiling%20on%20macOS +[Compiling on Windows]: https://github.com/mixxxdj/mixxx/wiki/compiling-on-windows +[Using Git]: https://github.com/mixxxdj/mixxx/wiki/Using-Git [mailing list]: https://lists.sourceforge.net/lists/listinfo/mixxx-devel [CMake]: https://cmake.org/ [launchpad 2.3.0]: https://launchpad.net/mixxx/+milestone/2.3.0 diff --git a/tools/deploy.sh b/tools/deploy.sh index 457e6b6edd..328f160ac3 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -4,37 +4,64 @@ set -eu -o pipefail -USER=mixxx -HOSTNAME=downloads-hostgator.mixxx.org -DESTDIR=public_html/downloads/builds +[ -z "${SSH_HOST}" ] && echo "Please set the SSH_HOST env var." >&2 && exit 1 +[ -z "${SSH_KEY}" ] && echo "Please set the SSH_KEY env var." >&2 && exit 1 +[ -z "${SSH_PASSWORD}" ] && echo "Please set the SSH_PASSWORD env var." >&2 && exit 1 +[ -z "${SSH_USER}" ] && echo "Please set the SSH_USER env var." >&2 && exit 1 +[ -z "${UPLOAD_ID}" ] && echo "Please set the UPLOAD_ID env var." >&2 && exit 1 +[ -z "${OS}" ] && echo "Please set the OS env var." >&2 && exit 1 +[ -z "${DESTDIR}" ] && echo "Please set the DESTDIR env var." >&2 && exit 1 + SSH="ssh -i ${SSH_KEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) -DEST_PATH=${DESTDIR}/${GIT_BRANCH}/${OS} -TMP_PATH=${DESTDIR}/.tmp/${GIT_BRANCH}/${OS} +GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" +DEST_PATH="${DESTDIR}/${GIT_BRANCH}/${OS}" +TMP_PATH="${DESTDIR}/.tmp/${UPLOAD_ID}" echo "Deploying to $TMP_PATH, then to $DEST_PATH." # Remove permissions for group and other users so that ssh-keygen does not # complain about the key not being protected. -chmod go-rwx ${SSH_KEY} - -# "Unlock" the key by removing its password. This is easier than messing with ssh-agent. -ssh-keygen -p -P ${DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD} -N "" -f ${SSH_KEY} - -# Always upload to a temporary path. -# This prevents users from downloading an incomplete file from the server which has not yet finished deploying. -shopt -s extglob -rsync -e "${SSH}" --rsync-path="mkdir -p ${TMP_PATH} && rsync" -r --delete-after ${FILE_TO_DEPLOY} ${USER}@${HOSTNAME}:${TMP_PATH} - -FILE_NAME=$(basename $FILE_TO_DEPLOY) -FILE_EXTENSION="${FILE_NAME##*.}" -SYMLINK_NAME="Mixxx-${GIT_BRANCH}-latest.${FILE_EXTENSION}" - -# Move from the temporary path to the final destination. -$SSH ${USER}@${HOSTNAME} << EOF -mkdir -p ${DEST_PATH} && -mv ${TMP_PATH}/* ${DEST_PATH} && -rmdir ${TMP_PATH} && -cd ${DEST_PATH} && -ln -sf ${FILE_NAME} ${SYMLINK_NAME} +chmod go-rwx "${SSH_KEY}" + +# Unlock the key by removing its password. This is easier than messing with ssh-agent. +ssh-keygen -p -P "${SSH_PASSWORD}" -N "" -f "${SSH_KEY}" + +# realpath does not exist on macOS +command -v realpath >/dev/null 2>&1 || realpath() { + [[ "$1" = /* ]] && echo "$1" || echo "${PWD}/${1#./}" +} + +# sha256sum doesn't exist on Windows (Git Bash) or macOS +command -v sha256sum >/dev/null 2>&1 || sha256sum() { + openssl dgst -sha256 "$@" | sed 's/^SHA256(\(.*\))= \(\w\+\)$/\2 \1/' +} + +for FILEPATH in "$@" +do + # Always upload to a temporary path. + # This prevents users from downloading an incomplete file from the server which has not yet finished deploying. + echo "Deploying artifact: ${FILEPATH}" + FILENAME="$(basename "${FILEPATH}")" + FILENAME_HASH="${FILENAME}.sha256sum" + FILEPATH_HASH="${FILEPATH}.sha256sum" + + # There should be no path components in the shasum file, so we need to cd to it first. + pushd "$(dirname "$(realpath "${FILEPATH}")")" + sha256sum "${FILENAME}" > "${FILENAME_HASH}" + popd + + FILEEXT="${FILENAME##*.}" + SYMLINK_NAME="Mixxx-${GIT_BRANCH}-latest.${FILEEXT}" + + rsync -e "${SSH}" --rsync-path="mkdir -p ${TMP_PATH} && rsync" -r --delete-after "${FILEPATH}" "${FILEPATH_HASH}" "${SSH_USER}@${SSH_HOST}:${TMP_PATH}" + + # Move from the temporary path to the final destination. + ${SSH} "${SSH_USER}@${SSH_HOST}" << EOF + trap 'rm -rf "${TMP_PATH}"' EXIT + mkdir -p "${DEST_PATH}" && + mv "${TMP_PATH}/${FILENAME}" "${TMP_PATH}/${FILENAME_HASH}" "${DEST_PATH}" && + cd "${DEST_PATH}" && + ln -sf "${FILENAME_HASH}" "${SYMLINK_NAME}.sha256sum" && + ln -sf "${FILENAME}" "${SYMLINK_NAME}" EOF +done diff --git a/tools/windows_buildenv.bat b/tools/windows_buildenv.bat index e27ff8bfd6..7379f5cf49 100644 --- a/tools/windows_buildenv.bat +++ b/tools/windows_buildenv.bat @@ -16,12 +16,26 @@ IF NOT DEFINED BUILDENV_BASEPATH ( SET BUILDENV_BASEPATH=%MIXXX_ROOT%\buildenv ) -CALL :COMMAND_%1 +IF NOT DEFINED BUILD_ROOT ( + SET BUILD_ROOT=%MIXXX_ROOT%\build +) + +IF NOT DEFINED INSTALL_ROOT ( + SET INSTALL_ROOT=%MIXXX_ROOT%\install +) + +IF "%~1"=="" ( + REM In case of manual start by double click no arguments are specified: Default to COMMAND_setup + CALL :COMMAND_setup + PAUSE +) ELSE ( + CALL :COMMAND_%1 +) + EXIT /B 0 :COMMAND_name CALL :READ_ENVNAME - ECHO "%RETVAL%" IF DEFINED GITHUB_ENV ( ECHO BUILDENV_NAME=!RETVAL! >> !GITHUB_ENV! ) @@ -33,23 +47,39 @@ EXIT /B 0 SET BUILDENV_PATH=%BUILDENV_BASEPATH%\%BUILDENV_NAME% IF NOT EXIST %BUILDENV_BASEPATH% ( + ECHO ### Create subdirectory buildenv ### MD %BUILDENV_BASEPATH% ) + IF NOT DEFINED GITHUB_ENV ( + CALL :GENERATE_CMakeSettings_JSON + + IF NOT EXIST %BUILD_ROOT% ( + ECHO ### Create subdirectory build ### + MD %BUILD_ROOT% + ) + + IF NOT EXIST %INSTALL_ROOT% ( + ECHO ### Create subdirectory install ### + MD %INSTALL_ROOT% + ) + ) + IF NOT EXIST %BUILDENV_PATH% ( - SET BUILDENV_URL=https://downloads.mixxx.org/builds/buildserver/2.3.x-windows/%BUILDENV_NAME%.zip + ECHO ### Download prebuild build environment ### + SET BUILDENV_URL=https://downloads.mixxx.org/builds/buildserver/2.3.x-windows/!BUILDENV_NAME!.zip IF NOT EXIST !BUILDENV_PATH!.zip ( - ECHO Downloading !BUILDENV_URL! + ECHO ### Download prebuild build environment from !BUILDENV_URL! to !BUILDENV_PATH!.zip ### BITSADMIN /transfer buildenvjob /download /priority normal !BUILDENV_URL! !BUILDENV_PATH!.zip REM TODO: verify download using sha256sum? ) - ECHO Unpacking !BUILDENV_PATH!.zip + ECHO ### Unpacking !BUILDENV_PATH!.zip ### CALL :UNZIP "!BUILDENV_PATH!.zip" "!BUILDENV_BASEPATH!" - ECHO Unpacking complete. + ECHO ### Unpacking complete. ### DEL /f /q %BUILDENV_PATH%.zip ) - ECHO Using build environment: !BUILDENV_PATH! + ECHO ### Build environment path: !BUILDENV_PATH! ### ENDLOCAL SET PATH=!BUILDENV_PATH!\bin;!PATH! @@ -92,8 +122,76 @@ EXIT /B 0 :READ_ENVNAME + ECHO ### Read name of prebuild environment from: %MIXXX_ROOT%\packaging\windows\build_environment ### SET /P BUILDENV_NAME=<%MIXXX_ROOT%\packaging\windows\build_environment SET BUILDENV_NAME=!BUILDENV_NAME:PLATFORM=%PLATFORM%! SET BUILDENV_NAME=!BUILDENV_NAME:CONFIGURATION=%CONFIGURATION%! SET RETVAL=%BUILDENV_NAME% + ECHO "%RETVAL%" + GOTO :EOF + +:GENERATE_CMakeSettings_JSON +REM Generate CMakeSettings.json which is read by MS Visual Studio to determine the supported CMake build environments + SET CMakeSettings=%MIXXX_ROOT%\CMakeSettings.json + IF EXIST %CMakeSettings% ( + ECHO ### CMakeSettings.json exist: Rename old file to CMakeSettings__YYYY-MM-DD_HH-MM-SS.json ### + FOR /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set DateTime=%%a + REN %CMakeSettings% CMakeSettings__!DateTime:~0,4!-!DateTime:~4,2!-!DateTime:~6,2!_!DateTime:~8,2!-!DateTime:~10,2!-!DateTime:~12,2!.json + ) + ECHO ### Create new CMakeSettings.json ### + >>%CMakeSettings% echo { + >>%CMakeSettings% echo "configurations": [ + SET configElementTermination=, + CALL :Configuration2CMakeSettings_JSON off Debug + CALL :Configuration2CMakeSettings_JSON legacy RelWithDebInfo + CALL :Configuration2CMakeSettings_JSON portable RelWithDebInfo + CALL :Configuration2CMakeSettings_JSON fastbuild RelWithDebInfo + SET configElementTermination= + CALL :Configuration2CMakeSettings_JSON native Release + >>%CMakeSettings% echo ] + >>%CMakeSettings% echo } GOTO :EOF + +:Configuration2CMakeSettings_JSON <optimize> <configurationtype> + >>%CMakeSettings% echo { + >>%CMakeSettings% echo "buildRoot": "${projectDir}\\build\\!PLATFORM!__%1", + >>%CMakeSettings% echo "configurationType": "%2", + >>%CMakeSettings% echo "enableClangTidyCodeAnalysis": true, + >>%CMakeSettings% echo "generator": "Ninja", + >>%CMakeSettings% echo "inheritEnvironments": [ "msvc_!PLATFORM!_!PLATFORM!" ], + >>%CMakeSettings% echo "installRoot": "${projectDir}\\install\\!PLATFORM!__%1", + >>%CMakeSettings% echo "intelliSenseMode": "windows-msvc-!PLATFORM!", + >>%CMakeSettings% echo "name": "!PLATFORM!__%1", + >>%CMakeSettings% echo "variables": [ + SET variableElementTermination=, + CALL :AddCMakeVar2CMakeSettings_JSON "BATTERY" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "BROADCAST" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "BULK" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "CMAKE_EXPORT_COMPILE_COMMANDS" "BOOL" "true" + REM Replace all \ by \\ in CMAKE_PREFIX_PATH + CALL :AddCMakeVar2CMakeSettings_JSON "CMAKE_PREFIX_PATH" "PATH" "!CMAKE_PREFIX_PATH:\=\\!" + CALL :AddCMakeVar2CMakeSettings_JSON "DEBUG_ASSERTIONS_FATAL" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "HID" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "HSS1394" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "KEYFINDER" "BOOL" "false" + CALL :AddCMakeVar2CMakeSettings_JSON "LOCALECOMPARE" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "LILV" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "MAD" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "MEDIAFOUNDATION" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "OPUS" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "OPTIMIZE" "STRING" "%1" + CALL :AddCMakeVar2CMakeSettings_JSON "QTKEYCHAIN" "BOOL" "true" + CALL :AddCMakeVar2CMakeSettings_JSON "STATIC_DEPS" "BOOL" "true" + SET variableElementTermination= + CALL :AddCMakeVar2CMakeSettings_JSON "VINYLCONTROL" "BOOL" "true" + >>%CMakeSettings% echo ] + >>%CMakeSettings% echo }!configElementTermination! + GOTO :EOF + +:AddCMakeVar2CMakeSettings_JSON <varname> <vartype> <value> + >>%CMakeSettings% echo { + >>%CMakeSettings% echo "name": %1, + >>%CMakeSettings% echo "type": %2, + >>%CMakeSettings% echo "value": %3 + >>%CMakeSettings% echo }!variableElementTermination! + GOTO :EOF |