Skip to content

Instantly share code, notes, and snippets.

@AntonioCS
Created July 10, 2019 05:47
Show Gist options
  • Select an option

  • Save AntonioCS/d65baeac4e48d6155e7a081ebcfa586b to your computer and use it in GitHub Desktop.

Select an option

Save AntonioCS/d65baeac4e48d6155e7a081ebcfa586b to your computer and use it in GitHub Desktop.

Revisions

  1. Alexej Harm revised this gist Jun 26, 2019. 1 changed file with 25 additions and 3 deletions.
    28 changes: 25 additions & 3 deletions solution.cmd
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,29 @@
    @echo off
    cmake -G "Visual Studio 16 2019" -A x64 -B %~dp0\build\msvc -DCMAKE_INSTALL_PREFIX:PATH=%~dp0 %~dp0
    set __SOURCE_PATH=%~dp0
    set __SOURCE_PATH=%__SOURCE_PATH:~0,-1%

    for /f %%i in ('where vcpkg.exe') do (
    set __SCRIPT_PATH=%%~dpiscripts
    goto :script_found
    )

    echo Could not find executable: vcpkg.exe
    pause
    goto :cleanup

    :script_found
    cmake -G "Visual Studio 16 2019" -A x64 -B "%__SOURCE_PATH%\build" ^
    -DCMAKE_TOOLCHAIN_FILE:PATH="%__SCRIPT_PATH%\buildsystems\vcpkg.cmake" ^
    -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE:PATH="%__SCRIPT_PATH%\toolchains\windows.cmake" ^
    -DVCPKG_TARGET_TRIPLET="%VCPKG_DEFAULT_TRIPLET%" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ^
    -DCMAKE_INSTALL_PREFIX:PATH="%__SOURCE_PATH%" "%__SOURCE_PATH%"
    if %errorlevel% == 0 (
    cmake --open %~dp0\build\msvc
    rem powershell "Start-Process devenv '%__SOURCE_PATH%\build\deus.sln' -verb runas"
    cmake --open "%__SOURCE_PATH%\build"
    ) else (
    pause
    )
    )

    :cleanup
    set __SCRIPT_PATH=
    set __SOURCE_PATH=
  2. Alexej Harm created this gist Apr 15, 2019.
    7 changes: 7 additions & 0 deletions solution.cmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    @echo off
    cmake -G "Visual Studio 16 2019" -A x64 -B %~dp0\build\msvc -DCMAKE_INSTALL_PREFIX:PATH=%~dp0 %~dp0
    if %errorlevel% == 0 (
    cmake --open %~dp0\build\msvc
    ) else (
    pause
    )