Hi
I wrote two premake5.lua scripts and bat file to generate VisualStudio sln
the issue is that it is not working ....
this is my premake5.lua files
this is my premake5.lua files
to static library
project "MyNumericLibrary"
kind "StaticLib"
language "C++"
cppdialect "C++20"
files {"\\headers\\*.hpp","\\src\\*.cpp" }
includedirs {".\\headers"}
targetdir ("bin/%{cfg.buildcfg}")
filters "configurations:Debug"
defines {"DEBUG"}
symbols "On"
filters "configurations:Release"
defines {"NDEBUG"}
optimize "On"
to generating solution
workspace "DataBasePreMake-examples"
configurations{"Debug", "Realese"}
dofile "\\lib\\premake5.lua"
project "App"
kind "ConsoleApp"
language "C++"
cppdialect "C++20"
files {".\\src\\*.cpp",".\\headers\\*.hpp"}
includedirs{"include"}
targetdir ("bin/%{cfg.buildcfg}")
links{"MyNumericLibrary"}
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
and my bat file
@echo off
REM Set the path to the directory containing Premake5 executable
set PREMAKE_DIR=E:\Programing\C++\PreMake5-poligon
REM Set the path to the directory containing your main project Premake5 script
set PROJECT_DIR=E:\Programing\C++\PreMake5-poligon
REM Debug: Print directory paths
echo "Premake Directory: %PREMAKE_DIR%"
echo "Project Directory: %PROJECT_DIR%"
REM Change to the project directory
cd %PROJECT_DIR%
REM Debug: Print the current working directory
echo "Current Working Directory: %cd%"
REM Run Premake5 to generate Visual Studio solution files
%PREMAKE_DIR%\premake5.exe vs2019
echo "Visual Studio solution files generated successfully!"
this is my folder structure