Skip to content

Commit

Permalink
use Windows dependencies from vcpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
Be-ing committed Jan 24, 2021
1 parent 40de53a commit 75fc1da
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ jobs:
-DLOCALECOMPARE=ON
-DMAD=ON
-DMEDIAFOUNDATION=ON
-DSTATIC_DEPS=ON
cc: cl
cxx: cl
cmake_generator: Ninja
Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
cmake_minimum_required(VERSION 3.13.0)

if(WIN32 AND NOT CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_PREFIX_PATH}/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "vcpkg toolchain file")
set(VCPKG_TARGET_TRIPLET "x64-windows")
set(X_VCPKG_APPLOCAL_DEPS_INSTALL ON)
endif()

project(mixxx VERSION 2.3.0)
set(CMAKE_PROJECT_HOMEPAGE_URL "https://www.mixxx.org")
set(CMAKE_PROJECT_DESCRIPTION "Mixxx is Free DJ software that gives you everything you need to perform live mixes.")
Expand Down
2 changes: 1 addition & 1 deletion packaging/windows/build_environment
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3-j00019-PLATFORM-CONFIGURATION-static-55e94982-minimal
mixxx-dependencies-2.3-x64-windows-76e3c70661c23021cb4e2618adda46e3ce2d937f
11 changes: 6 additions & 5 deletions tools/windows_buildenv.bat
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ EXIT /B 0

IF NOT EXIST %BUILDENV_PATH% (
ECHO ### Download prebuild build environment ###
SET BUILDENV_URL=https://downloads.mixxx.org/builds/buildserver/2.3.x-windows/!BUILDENV_NAME!.zip
SET BUILDENV_URL=https://downloads.mixxx.org/dependencies/2.3/Windows/!BUILDENV_NAME!.zip
IF NOT EXIST !BUILDENV_PATH!.zip (
ECHO ### Download prebuild build environment from !BUILDENV_URL! to !BUILDENV_PATH!.zip ###
BITSADMIN /transfer buildenvjob /download /priority normal !BUILDENV_URL! !BUILDENV_PATH!.zip
Expand All @@ -70,9 +70,7 @@ EXIT /B 0
ENDLOCAL

SET PATH=!BUILDENV_PATH!\bin;!PATH!

FOR /D %%G IN (%BUILDENV_PATH%\Qt-*) DO (SET Qt5_DIR=%%G)
SET CMAKE_PREFIX_PATH=!BUILDENV_PATH!;!Qt5_DIR!
SET CMAKE_PREFIX_PATH=!BUILDENV_PATH!

ECHO ^Environent Variables:
ECHO ^- PATH=!PATH!
Expand Down Expand Up @@ -172,9 +170,12 @@ REM Generate CMakeSettings.json which is read by MS Visual Studio to determine t
>>%CMakeSettings% echo "generator": "Ninja",
>>%CMakeSettings% echo "inheritEnvironments": [ "msvc_!PLATFORM!_!PLATFORM!" ],
>>%CMakeSettings% echo "installRoot": "!INSTALL_ROOT:\=\\!\\${name}",
>>%CMakeSettings% echo "cmakeToolchain": "!BUILDENV_PATH!\scripts\buildsystems\vcpkg.cmake",
>>%CMakeSettings% echo "intelliSenseMode": "windows-msvc-!PLATFORM!",
>>%CMakeSettings% echo "variables": [
SET variableElementTermination=,
CALL :AddCMakeVar2CMakeSettings_JSON "X_VCPKG_APPLOCAL_DEPS_INSTALL" "BOOL" "True"
CALL :AddCMakeVar2CMakeSettings_JSON "VCPKG_TARGET_TRIPLET" "STRING" "x64-windows"
CALL :AddCMakeVar2CMakeSettings_JSON "BATTERY" "BOOL" "True"
CALL :AddCMakeVar2CMakeSettings_JSON "BROADCAST" "BOOL" "True"
CALL :AddCMakeVar2CMakeSettings_JSON "BULK" "BOOL" "True"
Expand All @@ -192,7 +193,7 @@ REM Generate CMakeSettings.json which is read by MS Visual Studio to determine t
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"
CALL :AddCMakeVar2CMakeSettings_JSON "STATIC_DEPS" "BOOL" "False"
SET variableElementTermination=
CALL :AddCMakeVar2CMakeSettings_JSON "VINYLCONTROL" "BOOL" "True"
>>%CMakeSettings% echo ]
Expand Down

0 comments on commit 75fc1da

Please sign in to comment.