-
Notifications
You must be signed in to change notification settings - Fork 5
Building from Source
Michael Fabian Dirks edited this page May 29, 2020
·
5 revisions
libcaffeine comes in two flavors: prebuilt binaries, and raw source code. This page covers how to convert the latter into actual binaries.
- Windows 10 64bit (Windows 7 also works)
- Git
- CMake (most recent version)
- Either:
- Visual Studio 2017 with LLVM Compiler Toolchain Extension and LLVM Tools
- Visual Studio 2019 with "Desktop development with C++" selected and "C++ Clang tools for Windows" installed.
- 7-Zip or a 7z compatible Archiver
- Download compatible WebRTC binaries from here.
curl -kL "<URL>" -f --retry 5 -o webrtc.7z - Extract the downloaded WebRTC binaries to
third_party/webrtc.
7z -othird_party/webrtc x webrtc.7z - Download compatible libCURL binaries from here.
curl -kL "<URL>" -f --retry 5 -o obsdeps.zip - Extract the downloaded libCURL binaries to
third_party/obsdeps.
7z -othird_party/obsdeps x obsdeps.zip - Enter the scripts directory.
- Run
win-build.batand wait until all windows have disappeared. - Open either the 32-bit solution at
build32/libcaffeine.slnor 64-bit solution atbuild64/libcaffeine.sln. To rebuild both for changes, just run thewin-build.batagain.
- Follow steps 1 to 4 from the above.
- To configure the project, run the following commands from the repository root:
- If you are using Visual Studio 2019:
cmake -H. -Bbuild32 -G "Visual Studio 16 2019" -A "Win32" -T "ClangCL" -D WEBRTC_ROOT_DIR="third_party/webrtc" -D DepsPath="third_party/obsdeps/win32" -D BUILD_TESTING=OFF -Dlibcaffeine_BuildTests=OFF
cmake -H. -Bbuild64 -G "Visual Studio 16 2019" -A "x64" -T "ClangCL" -D WEBRTC_ROOT_DIR="third_party/webrtc" -D DepsPath="third_party/obsdeps/win64" -D BUILD_TESTING=OFF -Dlibcaffeine_BuildTests=OFF - If you are using Visual Studio 2017:
cmake -H. -Bbuild32 -G "Visual Studio 15 2017 Win32" -T "LLVM" -D WEBRTC_ROOT_DIR="third_party/webrtc" -D DepsPath="third_party/obsdeps/win32" -D BUILD_TESTING=OFF -Dlibcaffeine_BuildTests=OFF
cmake -H. -Bbuild64 -G "Visual Studio 15 2017 x64" -T "LLVM" -D WEBRTC_ROOT_DIR="third_party/webrtc" -D DepsPath="third_party/obsdeps/win64" -D BUILD_TESTING=OFF -Dlibcaffeine_BuildTests=OFF
- If you are using Visual Studio 2019:
- You can now find the solution file at
build##/libcaffeine.sln. - Run either of the following commands to build for a specific bitness in the repository root:
- 32-bit:
cmake --build build32 --config RelWithDebInfo - 64-bit:
cmake --build build64 --config RelWithDebInfo - Or build within your Visual Studio IDE.
- 32-bit: