tools/build_vcpkg_basic.bat
author sheepluva
Mon, 05 Aug 2019 00:20:45 +0200
changeset 15300 f382ec6dba11
parent 14273 23eacb6f1c20
child 15320 90f9a0eac3ae
permissions -rw-r--r--
In hindsight my emscripten-ifdef (70d416a8f63f) is nonsense. As fpcrtl_glShaderSource() would not be defined and lead to compiling issues. So either it's 3 ifdefs (in pas2cRedo, pas2cSystem and misc.c), in order to toggle between fpcrtl_ and the native function, or alternatively have no ifdef for it at all. I'm going with none at all, which means emscripten will compile with the original (const) function prototype, being wrapped by the fpcrtl_ function, same as non-emscripten builds.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13928
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
     1
@echo off
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
     2
::edit these variables if necessary
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
     3
set BUILD_TYPE="Debug"
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
     4
::set if vcpkg is not on path
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
     5
set VCPKG_PATH=%VCPKG_ROOT%
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
     6
::set if CMake is not on path
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
     7
set CMAKE_PATH=
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
     8
::set if FPC is not on path
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
     9
set PASCAL_PATH=
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    10
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    11
:setup
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    12
set CURRDIR="%CD%"
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    13
cd %CURRDIR%\..\
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    14
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    15
set PATH=%PASCAL_PATH%;%VCPKG_PATH%;%CMAKE_PATH%;%PATH%
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    16
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    17
echo Running cmake...
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    18
set ERRORLEVEL=
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    19
14273
23eacb6f1c20 prevent SDL2main from being linked in on windows
alfadur
parents: 13928
diff changeset
    20
cmake . -DCMAKE_TOOLCHAIN_FILE="%VCPKG_PATH%\scripts\buildsystems\vcpkg.cmake" -G"NMake Makefiles" -DNOPNG=1 -DNOSERVER=1 -DNOVIDEOREC=1 -DCMAKE_BUILD_TYPE="%BUILD_TYPE%" -DSDL2_BUILDING_LIBRARY=1
13928
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    21
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    22
if %ERRORLEVEL% NEQ 0 goto exitpoint
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    23
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    24
echo Configuration completed successfully
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    25
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    26
echo Building...
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    27
set ERRORLEVEL=
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    28
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    29
nmake
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    30
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    31
if %ERRORLEVEL% NEQ 0 goto exitpoint
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    32
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    33
echo Build completed successfully
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    34
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    35
:exitpoint
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    36
cd %CURRDIR%
4d63acb2b978 Add basic windows build script
alfadur
parents:
diff changeset
    37
pause