Skip to content

Commit

Permalink
cmake: Update readme.txt.
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardu committed Jul 31, 2024
1 parent 1f28315 commit 28ae5d8
Showing 1 changed file with 73 additions and 4 deletions.
77 changes: 73 additions & 4 deletions cmake/readme.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
######################

# Trixie/unstable amd64 qemu VM 2024-07-28
# Debian Trixie/unstable amd64 qemu VM 2024-07-28

apt install git curl zip unzip tar build-essential cmake ninja-build mingw-w64 nasm pkg-config ccache




mkdir $HOME/source
cd $HOME/source
git clone https://github.com/microsoft/vcpkg.git
Expand All @@ -19,13 +19,12 @@ vcpkg --version




export PATH=/usr/lib/ccache:$PATH

vcpkg install zlib:x64-mingw-static
vcpkg install zstd:x64-mingw-static
vcpkg install libjpeg-turbo:x64-mingw-static

vcpkg install liblzma:x64-mingw-static



Expand All @@ -46,3 +45,73 @@ cmake --build . -j

cp -a /usr/lib/gcc/x86_64-w64-mingw32/13-win32/libstdc++-6.dll .
cp -a /usr/lib/gcc/x86_64-w64-mingw32/13-win32/libgcc_s_seh-1.dll .





######################

# Windows with cmake, generate Visual Studio project files

# Install git
# Install Visual Studio Community 2022 (with MFC components to avoid errors about missing afxres.h)

# Open git bash

mkdir c:/source
cd c:/source
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg


# Developer Command Prompt for VS

cd /d c:\source\vcpkg
bootstrap-vcpkg.bat -disableMetrics
set VCPKG_ROOT=c:\source\vcpkg
set PATH=%VCPKG_ROOT%;%PATH%

vcpkg --version



vcpkg install zlib:x64-windows-static
vcpkg install zstd:x64-windows-static
vcpkg install libjpeg-turbo:x64-windows-static
vcpkg install liblzma:x64-windows-static

vcpkg integrate install


cd /d c:\source
git clone https://github.com/ultravnc/UltraVNC.git

mkdir obj && cd obj
cmake ^
-DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake ^
-DVCPKG_TARGET_TRIPLET=x64-windows-static ^
..\UltraVNC\cmake
set CL=/MP
cmake --build . --parallel --config=RelWithDebInfo




######################

# Windows with regular Visual Studio project files

# Install Plattformtoolset matching to the project files, currently v142

set _P=^
/p:Platform=x64 ^
/p:Configuration=Release ^
/p:Plattformtoolset=v143 ^
/p:BuildInParallel=true -maxcpucount:16 /p:CL_MPCount=16 ^
/t:Clean;Build
set CL=/MP

cd /d C:\source\UltraVNC
msbuild %_P% winvnc\winvnc.sln
msbuild %_P% vncviewer\vncviewer.sln

0 comments on commit 28ae5d8

Please sign in to comment.