fixing sdl and windows include path for sdl3
This commit is contained in:
25
premake5.lua
25
premake5.lua
@@ -20,8 +20,7 @@ workspace "SakuraVNE"
|
|||||||
include "libs/imgui"
|
include "libs/imgui"
|
||||||
include "libs/imgui-node-editor"
|
include "libs/imgui-node-editor"
|
||||||
|
|
||||||
project "SakuraVNE" --project under solution
|
project "SakuraVNE"
|
||||||
--location "SakuraVNE"
|
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
language "C++"
|
language "C++"
|
||||||
cppdialect "C++20"
|
cppdialect "C++20"
|
||||||
@@ -31,14 +30,12 @@ project "SakuraVNE" --project under solution
|
|||||||
targetdir ("build/bin/" .. outputdir .. "/%{prj.name}")
|
targetdir ("build/bin/" .. outputdir .. "/%{prj.name}")
|
||||||
objdir ("build/bin-int/" ..outputdir .. "/%{prj.name}")
|
objdir ("build/bin-int/" ..outputdir .. "/%{prj.name}")
|
||||||
|
|
||||||
-- Capture the absolute path to your project root.
|
|
||||||
-- (We also replace \ with / to ensure it works flawlessly if you ever build on Windows)
|
|
||||||
local root_path = os.getcwd():gsub("\\", "/")
|
local root_path = os.getcwd():gsub("\\", "/")
|
||||||
|
|
||||||
prebuildcommands {
|
prebuildcommands {
|
||||||
"echo ==== Building SDL3 via CMake ====",
|
"echo ==== Building SDL3 via CMake ====",
|
||||||
|
|
||||||
"mkdir -p \"" .. root_path .. "/build/bin/" .. outputdir .. "/SDL3\"",
|
"cmake -E make_directory \"" .. root_path .. "/build/bin/" .. outputdir .. "/SDL3\"",
|
||||||
|
|
||||||
"cmake -S libs/sdl3 -B \"" .. root_path .. "/build/bin-int/" .. outputdir .. "/SDL3\" -DCMAKE_BUILD_TYPE=Release " ..
|
"cmake -S libs/sdl3 -B \"" .. root_path .. "/build/bin-int/" .. outputdir .. "/SDL3\" -DCMAKE_BUILD_TYPE=Release " ..
|
||||||
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=\"" .. root_path .. "/build/bin/" .. outputdir .. "/SDL3\" " ..
|
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=\"" .. root_path .. "/build/bin/" .. outputdir .. "/SDL3\" " ..
|
||||||
@@ -50,12 +47,13 @@ project "SakuraVNE" --project under solution
|
|||||||
|
|
||||||
prebuildcommands{
|
prebuildcommands{
|
||||||
"echo ==== Building spdlog via CMake ====",
|
"echo ==== Building spdlog via CMake ====",
|
||||||
"mkdir -p \"" .. root_path .. "/build/bin/" ..outputdir .. "/spdlog\"",
|
"cmake -E make_directory \"" .. root_path .. "/build/bin/" ..outputdir .. "/spdlog\"",
|
||||||
"cmake -S libs/spdlog -B \"" .. root_path .. "/build/bin-int/" ..outputdir .. "/spdlog\" -DCMAKE_BUILD_TYPE=Release",
|
"cmake -S libs/spdlog -B \"" .. root_path .. "/build/bin-int/" ..outputdir .. "/spdlog\" -DCMAKE_BUILD_TYPE=Release",
|
||||||
"cmake --build \"" .. root_path .. "/build/bin-int/" ..outputdir .. "/spdlog\"",
|
"cmake --build \"" .. root_path .. "/build/bin-int/" ..outputdir .. "/spdlog\"",
|
||||||
"cp \"" .. root_path .. "/build/bin-int/" .. outputdir .. "/spdlog/\"libspdlog* \"" .. root_path .. "/build/bin/" .. outputdir .. "/spdlog/\""
|
"cmake -E copy \"" .. root_path .. "/build/bin-int/" .. outputdir .. "/spdlog/\"libspdlog* \"" .. root_path .. "/build/bin/" .. outputdir .. "/spdlog/\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
files{
|
files{
|
||||||
"%{prj.name}/src/**.h",
|
"%{prj.name}/src/**.h",
|
||||||
"%{prj.name}/src/**.cpp"
|
"%{prj.name}/src/**.cpp"
|
||||||
@@ -73,8 +71,8 @@ project "SakuraVNE" --project under solution
|
|||||||
|
|
||||||
libdirs{
|
libdirs{
|
||||||
"build/bin/" .. outputdir .. "/ImGui",
|
"build/bin/" .. outputdir .. "/ImGui",
|
||||||
"build/bin/" .. outputdir .. "/ImGuiNodeEditor",
|
"build/bin/" .. outputdir .. "/ImGuiNodeEditor",
|
||||||
"build/bin/" .. outputdir .. "/SDL3",
|
"build/bin/" .. outputdir .. "/Release/SDL3",
|
||||||
"build/bin/" .. outputdir .. "/spdlog"
|
"build/bin/" .. outputdir .. "/spdlog"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,10 +94,6 @@ project "SakuraVNE" --project under solution
|
|||||||
"PLATFORM_WINDOWS"
|
"PLATFORM_WINDOWS"
|
||||||
}
|
}
|
||||||
|
|
||||||
postbuildcommands{
|
|
||||||
--("{COPY} libs/sdl3/windows/lib/x64/SDL3.dll %{cfg.buildtarget.directory}")
|
|
||||||
}
|
|
||||||
|
|
||||||
filter "system:linux"
|
filter "system:linux"
|
||||||
system "linux"
|
system "linux"
|
||||||
cppdialect "C++20"
|
cppdialect "C++20"
|
||||||
@@ -111,10 +105,9 @@ project "SakuraVNE" --project under solution
|
|||||||
"PLATFORM_LINUX"
|
"PLATFORM_LINUX"
|
||||||
}
|
}
|
||||||
|
|
||||||
-- TELL THE LINKER TO USE SYSTEM LIBS
|
|
||||||
links {
|
links {
|
||||||
"dl", -- Dynamic linking loader (often needed)
|
"dl",
|
||||||
"pthread" -- POSIX threads (often needed)
|
"pthread"
|
||||||
}
|
}
|
||||||
|
|
||||||
filter "configurations:Debug"
|
filter "configurations:Debug"
|
||||||
|
|||||||
Reference in New Issue
Block a user