init
This commit is contained in:
5
expkg/vendor/lz4/build/visual/README.md
vendored
Normal file
5
expkg/vendor/lz4/build/visual/README.md
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
These scripts will generate Visual Studio Solutions for a selected set of supported versions of MS Visual.
|
||||
|
||||
For these scripts to work, both `cmake` and the relevant Visual Studio version must be locally installed on the system where the script is run.
|
||||
|
||||
If `cmake` is installed into a non-standard directory, or user wants to test a specific version of `cmake`, the target `cmake` directory can be provided via the environment variable `CMAKE_PATH`.
|
||||
55
expkg/vendor/lz4/build/visual/generate_solution.cmd
vendored
Normal file
55
expkg/vendor/lz4/build/visual/generate_solution.cmd
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
:: Requires 1 parameter == GENERATOR
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
:: Set path
|
||||
set "BUILD_BASE_DIR=%~dp0" :: Use the directory where the script is located
|
||||
set "CMAKELIST_DIR=..\..\cmake"
|
||||
|
||||
if "%~1"=="" (
|
||||
echo No generator specified as first parameter
|
||||
exit /b 1
|
||||
)
|
||||
set "GENERATOR=%~1"
|
||||
|
||||
:: Check if a user-defined CMAKE_PATH is set and prioritize it
|
||||
if defined CMAKE_PATH (
|
||||
set "CMAKE_EXECUTABLE=%CMAKE_PATH%\cmake.exe"
|
||||
echo Using user-defined cmake at %CMAKE_PATH%
|
||||
) else (
|
||||
:: Attempt to find cmake in the system PATH
|
||||
where cmake >nul 2>&1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
:: Use the default standard cmake installation directory if not found in PATH
|
||||
set "CMAKE_PATH=C:\Program Files\CMake\bin"
|
||||
echo CMake not in system PATH => using default CMAKE_PATH=%CMAKE_PATH%
|
||||
set "CMAKE_EXECUTABLE=%CMAKE_PATH%\cmake.exe"
|
||||
) else (
|
||||
set "CMAKE_EXECUTABLE=cmake"
|
||||
echo CMake found in system PATH.
|
||||
)
|
||||
)
|
||||
|
||||
:: Set the build directory to a subdirectory named after the generator
|
||||
set "BUILD_DIR=%BUILD_BASE_DIR%\%GENERATOR%"
|
||||
|
||||
:: Create the build directory if it doesn't exist
|
||||
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
|
||||
|
||||
:: Run CMake to configure the project and generate the solution
|
||||
pushd "%BUILD_DIR%"
|
||||
"%CMAKE_EXECUTABLE%" -G "%GENERATOR%" "%CMAKELIST_DIR%"
|
||||
if %ERRORLEVEL% neq 0 goto :error
|
||||
|
||||
:: If successful, end script
|
||||
echo Build configuration successful for %GENERATOR%.
|
||||
goto :end
|
||||
|
||||
:error
|
||||
echo Failed to configure build for %GENERATOR%.
|
||||
exit /b 1
|
||||
|
||||
:end
|
||||
popd
|
||||
endlocal
|
||||
@echo on
|
||||
3
expkg/vendor/lz4/build/visual/generate_vs2015.cmd
vendored
Normal file
3
expkg/vendor/lz4/build/visual/generate_vs2015.cmd
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
:: Call the central script with the specific generator for VS2015
|
||||
call generate_solution.cmd "Visual Studio 14 2015"
|
||||
3
expkg/vendor/lz4/build/visual/generate_vs2017.cmd
vendored
Normal file
3
expkg/vendor/lz4/build/visual/generate_vs2017.cmd
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
:: Call the central script with the specific generator for VS2017
|
||||
call generate_solution.cmd "Visual Studio 15 2017"
|
||||
3
expkg/vendor/lz4/build/visual/generate_vs2019.cmd
vendored
Normal file
3
expkg/vendor/lz4/build/visual/generate_vs2019.cmd
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
:: Call the central script with the specific generator for VS2019
|
||||
call generate_solution.cmd "Visual Studio 16 2019"
|
||||
3
expkg/vendor/lz4/build/visual/generate_vs2022.cmd
vendored
Normal file
3
expkg/vendor/lz4/build/visual/generate_vs2022.cmd
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
:: Call the central script with the specific generator for VS2022
|
||||
call generate_solution.cmd "Visual Studio 17 2022"
|
||||
Reference in New Issue
Block a user