-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Using Vcpkg
Warning, MSVC building is still experimental. Use with caution. Most plugins aren't available when compiling with MSVC.
Compiling LMMS with MSVC is most easily done using Vcpkg.
- Install Visual Studio Community from here: https://www.visualstudio.com/downloads/
- Install Qt Open Source version from here: https://www.qt.io/download Select the newest Qt version for MSVC 2017 or MSVC 2015, installing Qt Creator is recommended. If you want to build for 64bit, make sure to install Qt 32bit as well to support 32bit VSTs. Because Qt doesn't offer any 32bit binaries for MSVC 2017, you'll have to install Qt for MSVC 2015 instead. This is fine as MSVC 2017 can safely link against binaries compiled with MSVC 2015.
- Install CMake from here: https://cmake.org/download/
- Installl Git
- Install Vcpkg:
git clone https://github.com/Microsoft/vcpkg cd vcpkg .\bootstrap-vcpkg.bat
- Install remaining dependencies using Vcpkg:
If targeting 64bit, add the option
vcpkg install fftw3 libsamplerate libsndfile lilv lv2 sdl2
--triplet x64-windows
.
Use the master
branch, MSVC is not supported on stable-1.2
.
git clone -b master https://github.com/LMMS/lmms.git
Skip to the next section if you want to use the command line instead.
-
Open up Qt Creator
-
Go to Tools->Options->
Build & Run
->Kits
. Qt Creator should have detected your Qt installation automatically. We need to make adjustments to it so that CMake finds the libraries installed using Vcpkg. Select the detected kit and click Change... next to "CMake configuration": -
Assuming Vcpkg is installed at
C:\vcpkg
, add;C:\vcpkg\installed\x64-windows
to the line starting withCMAKE_PREFIX_PATH
: -
Exit the options and open
CMakeLists.txt
.
Configure using CMake. This assumes you are using MSVC2017, installed Qt 5.9.5 MSVC 2015 64bit & 32bit using the default path and installed Vcpkg to C:\vcpkg
. Change paths accordingly.
cd lmms
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=C:\Qt\5.9.5\msvc2015_64;C:\vcpkg\installed\x64-windows -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64"
If configuring succeeded, compile using
cmake --build . --config Release