build system update
-each dependency is now a module and is easier to intigrate into other projects
This commit is contained in:
parent
312e14a231
commit
969f820419
|
|
@ -396,12 +396,6 @@ Game/bin
|
|||
|
||||
imgui.ini
|
||||
|
||||
vendor/imgui-sfml/lib
|
||||
vendor/sfml/lib
|
||||
vendor/flac/lib
|
||||
vendor/freetype/lib
|
||||
vendor/ogg/lib
|
||||
vendor/vorbis/lib/Release*
|
||||
vendor/vorbis/lib/Debug*
|
||||
|
||||
/lib/
|
||||
build/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#! /bin/bash
|
||||
./vendor/premake5/premake5 premake-ninja
|
||||
ninja $1
|
||||
ninja $1 -C build
|
||||
|
|
|
|||
2
build.sh
2
build.sh
|
|
@ -1,3 +1,3 @@
|
|||
#! /bin/bash
|
||||
./vendor/premake5/premake5 gmake
|
||||
make config=$1
|
||||
make -C build config=$1
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/bash
|
||||
if [ -z "$1" ] || [ $# -eq 0 ]
|
||||
then
|
||||
ninja -t clean
|
||||
ninja -C build -t clean
|
||||
else
|
||||
ninja -t clean $1
|
||||
ninja -C build -t clean $1
|
||||
fi
|
||||
4
clean.sh
4
clean.sh
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/bash
|
||||
if [ -z "$1" ] || [ $# -eq 0 ]
|
||||
then
|
||||
make config=Debug clean && make config=Release clean
|
||||
make -C build config=Debug clean && make config=Release clean
|
||||
else
|
||||
make config=$1 clean
|
||||
make -C build config=$1 clean
|
||||
fi
|
||||
114
premake5.lua
114
premake5.lua
|
|
@ -1,55 +1,57 @@
|
|||
require "ecc/ecc"
|
||||
require "ninja/ninja"
|
||||
local ogg = require("vendor/ogg/build-ogg")
|
||||
local sfml = require("vendor/sfml/build-sfml")
|
||||
local flac = require("vendor/flac/build-flac")
|
||||
local vorbis = require("vendor/vorbis/build-vorbis")
|
||||
local freetype = require("vendor/freetype/build-freetype")
|
||||
local imguisfml = require("vendor/imgui-sfml/build-imgui-sfml")
|
||||
|
||||
workspace "snake"
|
||||
architecture "x64"
|
||||
startproject"snake"
|
||||
configurations
|
||||
{
|
||||
"Release",
|
||||
"Debug"
|
||||
}
|
||||
staticruntime"off"
|
||||
|
||||
defines
|
||||
{
|
||||
--"__STDC_LIMIT_MACROS=1" -- flac may or may not need this on modern computers
|
||||
}
|
||||
location "build"
|
||||
|
||||
configurations{"Debug", "Release"}
|
||||
|
||||
filter"system:linux"
|
||||
pic"On" -- fix warning when statically linking <relocation against ... in read-only section .text>
|
||||
filter""
|
||||
|
||||
local project_dir = "./"
|
||||
if _ACTION and _ACTION:match("vs") then
|
||||
project_dir = "$(SolutionDir)"
|
||||
else
|
||||
project_dir = "%{wks.location}/"
|
||||
end
|
||||
|
||||
output_dir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
|
||||
intdir = project_dir .. "intermediate-files/" .. output_dir
|
||||
bindir = project_dir .. "bin/" .. output_dir
|
||||
libout = "lib/" .. output_dir
|
||||
intdir = "../intermediate-files/"
|
||||
bindir = "../bin/" .. output_dir
|
||||
liboutdir = "../lib/" .. output_dir
|
||||
|
||||
group "Dependencies"
|
||||
include ("vendor/ogg/build-ogg.lua")
|
||||
include ("vendor/vorbis/build-vorbis.lua")
|
||||
include ("vendor/flac/build-flac.lua")
|
||||
include ("vendor/freetype/build-freetype.lua")
|
||||
include ("vendor/sfml/build-sfml.lua")
|
||||
include("vendor/imgui-sfml/build-imgui-sfml.lua")
|
||||
externalwarnings "Off"
|
||||
|
||||
filter "configurations:debug"
|
||||
defines {"LOG_ENABLE", "GAME_DEBUG"}
|
||||
symbols "on"
|
||||
runtime "Debug"
|
||||
warnings "Extra"
|
||||
|
||||
filter "configurations:release"
|
||||
defines {"GAME_RELEASE"}
|
||||
optimize "Speed"
|
||||
inlining "Auto"
|
||||
symbols "off"
|
||||
runtime "Release"
|
||||
filter""
|
||||
|
||||
group"Dependencies"
|
||||
ogg.generateproject(liboutdir, intdir)
|
||||
sfml.generateproject(liboutdir, intdir)
|
||||
flac.generateproject(liboutdir, intdir)
|
||||
vorbis.generateproject(liboutdir, intdir)
|
||||
freetype.generateproject(liboutdir, intdir)
|
||||
imguisfml.generateproject(liboutdir, intdir)
|
||||
group""
|
||||
|
||||
project "snake"
|
||||
output_dir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
|
||||
intdir = project_dir .. "intermediate-files/" .. output_dir
|
||||
bindir = project_dir .. "bin/" .. output_dir
|
||||
sfmldir = project_dir .. "vendor/sfml"
|
||||
imguidir = project_dir .. "vendor/imgui-sfml"
|
||||
include_dir = project_dir .. "include"
|
||||
|
||||
language "C++"
|
||||
cppdialect "C++20"
|
||||
systemversion "latest"
|
||||
|
|
@ -57,15 +59,16 @@ workspace "snake"
|
|||
targetname "snake"
|
||||
targetdir (bindir)
|
||||
objdir (intdir)
|
||||
debugdir (project_dir)
|
||||
links {"imgui-sfml", "sfml", "vorbis", "flac", "ogg", "freetype"}
|
||||
debugdir (path.getabsolute(path.getdirectory(_SCRIPT)))
|
||||
|
||||
|
||||
imguisfml.link()
|
||||
sfml.link()
|
||||
|
||||
includedirs
|
||||
{
|
||||
"src",
|
||||
include_dir,
|
||||
sfmldir .. "/include",
|
||||
imguidir
|
||||
"include",
|
||||
}
|
||||
|
||||
files
|
||||
|
|
@ -77,16 +80,7 @@ workspace "snake"
|
|||
|
||||
--windows specific settings--
|
||||
filter{"system:windows"}
|
||||
defines {"PLATFORM_WINDOWS", "SFML_STATIC", "IMGUI_SFML_STATIC_LIB"}
|
||||
staticruntime "off"
|
||||
links
|
||||
{
|
||||
"legacy_stdio_definitions",
|
||||
"opengl32",
|
||||
"gdi32",
|
||||
"winmm",
|
||||
"ws2_32"
|
||||
}
|
||||
defines {"PLATFORM_WINDOWS"}
|
||||
|
||||
filter {"system:windows", "configurations:debug"}
|
||||
defines{"_DEBUG", "_CONSOLE"}
|
||||
|
|
@ -97,29 +91,3 @@ workspace "snake"
|
|||
--linux specific settings--
|
||||
filter {"system:linux"}
|
||||
defines {"PLATFORM_LINUX"}
|
||||
|
||||
links
|
||||
{
|
||||
"Xi",
|
||||
"Xrandr",
|
||||
"Xcursor",
|
||||
"X11",
|
||||
"udev",
|
||||
"pthread",
|
||||
"OpenGL",
|
||||
}
|
||||
|
||||
|
||||
--config settings--
|
||||
filter "configurations:debug"
|
||||
defines {"LOG_ENABLE", "GAME_DEBUG"}
|
||||
symbols "on"
|
||||
runtime "Debug"
|
||||
warnings "Extra"
|
||||
|
||||
filter "configurations:release"
|
||||
defines {"GAME_RELEASE"}
|
||||
optimize "Speed"
|
||||
inlining "Auto"
|
||||
symbols "off"
|
||||
runtime "Release"
|
||||
|
|
@ -1,9 +1,16 @@
|
|||
project"flac"
|
||||
cppdialect"c++17"
|
||||
local m = {}
|
||||
|
||||
local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
|
||||
local ogg = require("vendor/ogg/build-ogg")
|
||||
function m.generateproject(liboutdir, intdir)
|
||||
project"flac"
|
||||
language"C" -- c++ will mangle names and sfml wont build
|
||||
kind"staticLib"
|
||||
targetdir (libout)
|
||||
staticruntime "off"
|
||||
objdir("intermediate-files/" .. output_dir)
|
||||
targetdir (liboutdir)
|
||||
objdir(intdir)
|
||||
warnings"Off"
|
||||
|
||||
ogg.link()
|
||||
|
||||
defines
|
||||
{
|
||||
|
|
@ -14,41 +21,46 @@ project"flac"
|
|||
}
|
||||
|
||||
filter"system:linux"
|
||||
defines
|
||||
{
|
||||
"HAVE_LROUND",--fix error in lpc.c <Static declaration of 'lround' follows non-static declaration>
|
||||
"HAVE_STDINT_H" --fix error in alloc.h <# error>
|
||||
}
|
||||
defines
|
||||
{
|
||||
"HAVE_LROUND",--fix error in lpc.c <Static declaration of 'lround' follows non-static declaration>
|
||||
"HAVE_STDINT_H", --fix error in alloc.h <# error>
|
||||
}
|
||||
|
||||
includedirs
|
||||
{
|
||||
"include",
|
||||
"src/libFLAC/include",
|
||||
"../ogg/include"
|
||||
path.join(scriptdir, "include"),
|
||||
path.join(scriptdir, "src/libFLAC/include"),
|
||||
}
|
||||
|
||||
files
|
||||
{
|
||||
"src/libFLAC/**.c",
|
||||
path.join(scriptdir, "src/libFLAC/**.c"),
|
||||
}
|
||||
|
||||
removefiles
|
||||
{
|
||||
"src/libFLAC/deduplication/**"
|
||||
path.join(scriptdir, "src/libFLAC/deduplication/**"),
|
||||
}
|
||||
|
||||
filter"system:windows"
|
||||
files
|
||||
{
|
||||
"src/share/win_utf8_io/**.c"
|
||||
}
|
||||
files
|
||||
{
|
||||
path.join(scriptdir, "src/share/win_utf8_io/**.c"),
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
filter""
|
||||
|
||||
filter "configurations:Release"
|
||||
runtime "Release"
|
||||
optimize "Speed"
|
||||
end
|
||||
|
||||
filter""
|
||||
function m.link()
|
||||
externalincludedirs
|
||||
{
|
||||
path.join(scriptdir, "include"),
|
||||
path.join(scriptdir, "src/libFLAC/include"),
|
||||
path.join(scriptdir, "../ogg/include")
|
||||
}
|
||||
links {"flac", "ogg"}
|
||||
end
|
||||
|
||||
return m
|
||||
|
|
|
|||
|
|
@ -1,91 +1,96 @@
|
|||
project"freetype"
|
||||
kind"staticLib"
|
||||
cppdialect"c++17"
|
||||
targetdir (libout)
|
||||
staticruntime "off"
|
||||
objdir("intermediate-files/" .. output_dir)
|
||||
local m = {}
|
||||
|
||||
includedirs {"include"}
|
||||
local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
|
||||
|
||||
function m.generateproject(liboutdir, intdir)
|
||||
project"freetype"
|
||||
kind"staticLib"
|
||||
language"C" -- c++ will mangle names and sfml wont build
|
||||
targetdir (liboutdir)
|
||||
objdir(intdir)
|
||||
warnings"Off"
|
||||
|
||||
includedirs {path.join(scriptdir, "include")}
|
||||
|
||||
defines
|
||||
{
|
||||
"FT2_BUILD_LIBRARY",
|
||||
"NDEBUG", -- have freetype always be in release mode
|
||||
"FT_DEBUG_LEVEL_ERROR=0", -- ''
|
||||
"FT_DEBUG_LEVEL_ERROR=0", -- fix linking errors <undefined reference...>
|
||||
"FT_DEBUG_LEVEL_TRACE=0" -- fix linking errors <undefined reference...>
|
||||
}
|
||||
|
||||
files
|
||||
{
|
||||
"src/autofit/autofit.c",
|
||||
"src/base/ftbase.c",
|
||||
"src/base/ftbbox.c",
|
||||
"src/base/ftbdf.c",
|
||||
"src/base/ftbitmap.c",
|
||||
"src/base/ftcid.c",
|
||||
"src/base/ftfstype.c",
|
||||
"src/base/ftgasp.c",
|
||||
"src/base/ftglyph.c",
|
||||
"src/base/ftgxval.c",
|
||||
"src/base/ftinit.c",
|
||||
"src/base/ftmm.c",
|
||||
"src/base/ftotval.c",
|
||||
"src/base/ftpatent.c",
|
||||
"src/base/ftpfr.c",
|
||||
"src/base/ftstroke.c",
|
||||
"src/base/ftsynth.c",
|
||||
"src/base/fttype1.c",
|
||||
"src/base/ftwinfnt.c",
|
||||
"src/bdf/bdf.c",
|
||||
"src/bzip2/ftbzip2.c",
|
||||
"src/cache/ftcache.c",
|
||||
"src/cff/cff.c",
|
||||
"src/cid/type1cid.c",
|
||||
"src/gzip/ftgzip.c",
|
||||
"src/lzw/ftlzw.c",
|
||||
"src/pcf/pcf.c",
|
||||
"src/pfr/pfr.c",
|
||||
"src/psaux/psaux.c",
|
||||
"src/pshinter/pshinter.c",
|
||||
"src/psnames/psnames.c",
|
||||
"src/raster/raster.c",
|
||||
"src/sdf/sdf.c",
|
||||
"src/sfnt/sfnt.c",
|
||||
"src/smooth/smooth.c",
|
||||
"src/svg/svg.c",
|
||||
"src/truetype/truetype.c",
|
||||
"src/type1/type1.c",
|
||||
"src/type42/type42.c",
|
||||
"src/winfonts/winfnt.c",
|
||||
"src/base/ftdebug.c" --fix linking errors related to FT_THROW, etc
|
||||
path.join(scriptdir, "src/autofit/autofit.c"),
|
||||
path.join(scriptdir, "src/base/ftbase.c"),
|
||||
path.join(scriptdir, "src/base/ftbbox.c"),
|
||||
path.join(scriptdir, "src/base/ftbdf.c"),
|
||||
path.join(scriptdir, "src/base/ftbitmap.c"),
|
||||
path.join(scriptdir, "src/base/ftcid.c"),
|
||||
path.join(scriptdir, "src/base/ftfstype.c"),
|
||||
path.join(scriptdir, "src/base/ftgasp.c"),
|
||||
path.join(scriptdir, "src/base/ftglyph.c"),
|
||||
path.join(scriptdir, "src/base/ftgxval.c"),
|
||||
path.join(scriptdir, "src/base/ftinit.c"),
|
||||
path.join(scriptdir, "src/base/ftmm.c"),
|
||||
path.join(scriptdir, "src/base/ftotval.c"),
|
||||
path.join(scriptdir, "src/base/ftpatent.c"),
|
||||
path.join(scriptdir, "src/base/ftpfr.c"),
|
||||
path.join(scriptdir, "src/base/ftstroke.c"),
|
||||
path.join(scriptdir, "src/base/ftsynth.c"),
|
||||
path.join(scriptdir, "src/base/fttype1.c"),
|
||||
path.join(scriptdir, "src/base/ftwinfnt.c"),
|
||||
path.join(scriptdir, "src/bdf/bdf.c"),
|
||||
path.join(scriptdir, "src/bzip2/ftbzip2.c"),
|
||||
path.join(scriptdir, "src/cache/ftcache.c"),
|
||||
path.join(scriptdir, "src/cff/cff.c"),
|
||||
path.join(scriptdir, "src/cid/type1cid.c"),
|
||||
path.join(scriptdir, "src/gzip/ftgzip.c"),
|
||||
path.join(scriptdir, "src/lzw/ftlzw.c"),
|
||||
path.join(scriptdir, "src/pcf/pcf.c"),
|
||||
path.join(scriptdir, "src/pfr/pfr.c"),
|
||||
path.join(scriptdir, "src/psaux/psaux.c"),
|
||||
path.join(scriptdir, "src/pshinter/pshinter.c"),
|
||||
path.join(scriptdir, "src/psnames/psnames.c"),
|
||||
path.join(scriptdir, "src/raster/raster.c"),
|
||||
path.join(scriptdir, "src/sdf/sdf.c"),
|
||||
path.join(scriptdir, "src/sfnt/sfnt.c"),
|
||||
path.join(scriptdir, "src/smooth/smooth.c"),
|
||||
path.join(scriptdir, "src/svg/svg.c"),
|
||||
path.join(scriptdir, "src/truetype/truetype.c"),
|
||||
path.join(scriptdir, "src/type1/type1.c"),
|
||||
path.join(scriptdir, "src/type42/type42.c"),
|
||||
path.join(scriptdir, "src/winfonts/winfnt.c"),
|
||||
path.join(scriptdir, "src/base/ftdebug.c"), --fix linking errors related to FT_THROW, et)c
|
||||
}
|
||||
|
||||
filter "system:linux"
|
||||
defines
|
||||
{
|
||||
"HAVE_FCNTL_H",--fix error in ftsystem.c <implicit declaration of function ‘open’>
|
||||
"HAVE_UNISTD_H" --fix error in ftsystem.c <implicit declaration of function ‘read’>
|
||||
}
|
||||
|
||||
filter""
|
||||
|
||||
defines
|
||||
{
|
||||
"HAVE_FCNTL_H",--fix error in ftsystem.c <implicit declaration of function ‘open’>
|
||||
"HAVE_UNISTD_H" --fix error in ftsystem.c <implicit declaration of function ‘read’>
|
||||
}
|
||||
|
||||
filter"system:windows"
|
||||
files
|
||||
{
|
||||
"builds/windows/ftsystem.c",
|
||||
"builds/windows/ftdebug.c"
|
||||
}
|
||||
files
|
||||
{
|
||||
path.join(scriptdir, "builds/windows/ftsystem.c"),
|
||||
path.join(scriptdir, "builds/windows/ftdebug.c"),
|
||||
}
|
||||
|
||||
filter"system:linux"
|
||||
files{"builds/unix/ftsystem.c"}
|
||||
files{path.join(scriptdir, "builds/unix/ftsystem.c")}
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
optimize"Speed"
|
||||
|
||||
filter "configurations:Release"
|
||||
runtime "Release"
|
||||
optimize "Speed"
|
||||
filter""
|
||||
end
|
||||
|
||||
filter""
|
||||
function m.link()
|
||||
externalincludedirs{path.join(scriptdir, "include")}
|
||||
links {"freetype"}
|
||||
end
|
||||
|
||||
return m
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
*
|
||||
!README
|
||||
!.gitignore
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
This directory contains all the object files created when building the
|
||||
library.
|
||||
|
|
@ -1,29 +1,35 @@
|
|||
project"imgui-sfml"
|
||||
cppdialect"c++17"
|
||||
kind"staticLib"
|
||||
targetdir (libout)
|
||||
staticruntime "off"
|
||||
objdir("intermediate-files/" .. output_dir)
|
||||
local m = {}
|
||||
|
||||
includedirs
|
||||
{
|
||||
"../sfml/include",
|
||||
"."
|
||||
}
|
||||
local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
|
||||
local sfml = require("vendor/sfml/build-sfml")
|
||||
function m.generateproject(liboutdir, intdir)
|
||||
project"imgui-sfml"
|
||||
cppdialect"c++17"
|
||||
kind"staticLib"
|
||||
targetdir (liboutdir)
|
||||
objdir(intdir)
|
||||
warnings"Off"
|
||||
|
||||
files
|
||||
{
|
||||
"imgui.cpp",
|
||||
"imgui_draw.cpp",
|
||||
"imgui_tables.cpp",
|
||||
"imgui_widgets.cpp",
|
||||
"imgui-SFML.cpp"
|
||||
}
|
||||
sfml.link()
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
includedirs
|
||||
{
|
||||
scriptdir,
|
||||
}
|
||||
|
||||
filter "configurations:Release"
|
||||
runtime "Release"
|
||||
optimize "Speed"
|
||||
files
|
||||
{
|
||||
path.join(scriptdir, "imgui.cpp"),
|
||||
path.join(scriptdir, "imgui_draw.cpp"),
|
||||
path.join(scriptdir, "imgui_tables.cpp"),
|
||||
path.join(scriptdir, "imgui_widgets.cpp"),
|
||||
path.join(scriptdir, "imgui-SFML.cpp"),
|
||||
}
|
||||
end
|
||||
|
||||
function m.link()
|
||||
externalincludedirs{scriptdir, path.join(scriptdir, "../sfml/include")}
|
||||
links {"imgui-sfml"}
|
||||
end
|
||||
|
||||
return m
|
||||
|
|
@ -1,24 +1,28 @@
|
|||
project"ogg"
|
||||
cppdialect"c++17"
|
||||
kind"staticLib"
|
||||
targetdir (libout)
|
||||
staticruntime "off"
|
||||
objdir("intermediate-files/" .. output_dir)
|
||||
local m = {}
|
||||
|
||||
includedirs"include"
|
||||
local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
|
||||
|
||||
function m.generateproject(liboutdir, intdir)
|
||||
project"ogg"
|
||||
language"C" -- c++ will mangle names and sfml wont build
|
||||
kind"staticLib"
|
||||
targetdir (liboutdir)
|
||||
objdir(intdir)
|
||||
warnings"Off"
|
||||
|
||||
includedirs {path.join(scriptdir, "include")}
|
||||
|
||||
files
|
||||
{
|
||||
"src/**.h",
|
||||
"src/**.c"
|
||||
path.join(scriptdir, "src/**.h"),
|
||||
path.join(scriptdir, "src/**.c"),
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
end
|
||||
|
||||
filter "configurations:Release"
|
||||
runtime "Release"
|
||||
optimize "Speed"
|
||||
function m.link()
|
||||
links{"ogg"}
|
||||
externalincludedirs{path.join(scriptdir, "/include")}
|
||||
end
|
||||
|
||||
filter""
|
||||
return m
|
||||
|
|
@ -1,12 +1,23 @@
|
|||
project"sfml"
|
||||
local m = {}
|
||||
|
||||
links{"freetype", "ogg", "flac", "vorbis"}
|
||||
local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
|
||||
local ogg = require("vendor/ogg/build-ogg")
|
||||
local flac = require("vendor/flac/build-flac")
|
||||
local vorbis = require("vendor/vorbis/build-vorbis")
|
||||
local freetype = require("vendor/freetype/build-freetype")
|
||||
function m.generateproject(liboutdir, intdir)
|
||||
project"sfml"
|
||||
cppdialect"c++17"
|
||||
kind "staticLib"
|
||||
targetdir (libout)
|
||||
staticruntime "off"
|
||||
objdir("intermediate-files/" .. output_dir)
|
||||
|
||||
targetdir (liboutdir)
|
||||
objdir(intdir)
|
||||
warnings"Off"
|
||||
|
||||
freetype.link()
|
||||
ogg.link()
|
||||
flac.link()
|
||||
vorbis.link()
|
||||
|
||||
defines
|
||||
{
|
||||
"SFML_STATIC",
|
||||
|
|
@ -20,52 +31,75 @@ project"sfml"
|
|||
"SFML_IS_BIG_ENDIAN=0",
|
||||
"FT2_BUILD_LIBRARY",
|
||||
"FLAC__NO_DLL",
|
||||
"OV_EXCLUDE_STATIC_CALLBACKS"
|
||||
"OV_EXCLUDE_STATIC_CALLBACKS",
|
||||
}
|
||||
|
||||
|
||||
includedirs
|
||||
{
|
||||
"include",
|
||||
"src",
|
||||
"extlibs/headers/glad/include",
|
||||
"extlibs/headers/mingw",
|
||||
"extlibs/headers/miniaudio",
|
||||
"extlibs/headers/minimp3",
|
||||
"extlibs/headers/stb_image",
|
||||
"extlibs/headers/vulkan",
|
||||
"../freetype/include",
|
||||
"../ogg/include",
|
||||
"../flac/include",
|
||||
"../vorbis/include"
|
||||
path.join(scriptdir, "include"),
|
||||
path.join(scriptdir, "src"),
|
||||
path.join(scriptdir, "extlibs/headers/glad/include"),
|
||||
path.join(scriptdir, "extlibs/headers/mingw"),
|
||||
path.join(scriptdir, "extlibs/headers/miniaudio"),
|
||||
path.join(scriptdir, "extlibs/headers/minimp3"),
|
||||
path.join(scriptdir, "extlibs/headers/stb_image"),
|
||||
path.join(scriptdir, "extlibs/headers/vulkan"),
|
||||
|
||||
}
|
||||
|
||||
files
|
||||
{
|
||||
"include/SFML/**.hpp",
|
||||
"include/SFML/**.inl",
|
||||
"src/SFML/**.hpp",
|
||||
"src/SFML/**.cpp"
|
||||
path.join(scriptdir, "include/SFML/**.hpp"),
|
||||
path.join(scriptdir, "include/SFML/**.inl"),
|
||||
path.join(scriptdir, "src/SFML/**.hpp"),
|
||||
path.join(scriptdir, "src/SFML/**.cpp"),
|
||||
}
|
||||
|
||||
filter"system:windows"
|
||||
removefiles
|
||||
{
|
||||
"src/SFML/System/Unix/**",
|
||||
"src/SFML/Window/Unix/**"
|
||||
}
|
||||
removefiles
|
||||
{
|
||||
path.join(scriptdir, "src/SFML/System/Unix/**"),
|
||||
path.join(scriptdir, "src/SFML/Window/Unix/**"),
|
||||
path.join(scriptdir, "src/SFML/Network/Unix/**"),
|
||||
}
|
||||
|
||||
filter"system:linux"
|
||||
removefiles
|
||||
{
|
||||
"src/SFML/System/Win32/**",
|
||||
"src/SFML/Window/Win32/**",
|
||||
"src/SFML/Main/**"
|
||||
}
|
||||
removefiles
|
||||
{
|
||||
path.join(scriptdir, "src/SFML/System/Win32/**"),
|
||||
path.join(scriptdir, "src/SFML/Network/Win32/**"),
|
||||
path.join(scriptdir, "src/SFML/Window/Win32/**"),
|
||||
path.join(scriptdir, "src/SFML/Main/**"),
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
end
|
||||
|
||||
filter "configurations:Release"
|
||||
runtime "Release"
|
||||
optimize "Speed"
|
||||
function m.link()
|
||||
defines{"SFML_STATIC"}
|
||||
externalincludedirs
|
||||
{
|
||||
path.join(scriptdir, "include"),
|
||||
path.join(scriptdir, "src"),
|
||||
path.join(scriptdir, "extlibs/headers/glad/include"),
|
||||
path.join(scriptdir, "extlibs/headers/mingw"),
|
||||
path.join(scriptdir, "extlibs/headers/miniaudio"),
|
||||
path.join(scriptdir, "extlibs/headers/minimp3"),
|
||||
path.join(scriptdir, "extlibs/headers/stb_image"),
|
||||
path.join(scriptdir, "extlibs/headers/vulkan"),
|
||||
path.join(scriptdir, "../freetype/include"),
|
||||
path.join(scriptdir, "../ogg/include"),
|
||||
path.join(scriptdir, "../flac/include"),
|
||||
path.join(scriptdir, "../vorbis/include")
|
||||
}
|
||||
|
||||
links{"sfml", "freetype", "flac", "vorbis", "ogg"}
|
||||
|
||||
filter"system:windows"
|
||||
links{"legacy_stdio_definitions", "opengl32", "gdi32", "winmm", "ws2_32", "openal32"}
|
||||
|
||||
filter"system:linux"
|
||||
links{"Xi", "Xrandr", "Xcursor", "X11", "udev", "pthread", "OpenGL", "openal"}
|
||||
|
||||
end
|
||||
|
||||
return m
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SFML - Simple and Fast Multimedia Library
|
||||
// Copyright (C) 2007-2025 Laurent Gomila (laurent@sfml-dev.org)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it freely,
|
||||
// subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented;
|
||||
// you must not claim that you wrote the original software.
|
||||
// If you use this software in a product, an acknowledgment
|
||||
// in the product documentation would be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such,
|
||||
// and must not be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#include <SFML/Network/Ftp.hpp>
|
||||
#include <SFML/Network/Http.hpp>
|
||||
#include <SFML/Network/IpAddress.hpp>
|
||||
#include <SFML/Network/Packet.hpp>
|
||||
#include <SFML/Network/Socket.hpp>
|
||||
#include <SFML/Network/SocketHandle.hpp>
|
||||
#include <SFML/Network/SocketSelector.hpp>
|
||||
#include <SFML/Network/TcpListener.hpp>
|
||||
#include <SFML/Network/TcpSocket.hpp>
|
||||
#include <SFML/Network/UdpSocket.hpp>
|
||||
|
||||
#include <SFML/System.hpp>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \defgroup network Network module
|
||||
///
|
||||
/// Socket-based communication, utilities and higher-level
|
||||
/// network protocols (HTTP, FTP).
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
@ -1,70 +1,80 @@
|
|||
project"vorbis"
|
||||
cppdialect"c++17"
|
||||
kind"staticLib"
|
||||
targetdir (libout)
|
||||
staticruntime "off"
|
||||
objdir("intermediate-files/" .. output_dir)
|
||||
local m = {}
|
||||
|
||||
links{"ogg"}
|
||||
local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
|
||||
local ogg = require("vendor/ogg/build-ogg")
|
||||
function m.generateproject(liboutdir, intdir)
|
||||
project"vorbis"
|
||||
language"C" -- c++ will mangle names and sfml wont build
|
||||
kind"staticLib"
|
||||
targetdir (liboutdir)
|
||||
objdir(intdir)
|
||||
warnings"Off"
|
||||
|
||||
ogg.link()
|
||||
|
||||
includedirs
|
||||
{
|
||||
"include",
|
||||
"lib",
|
||||
"../ogg/include"
|
||||
path.join(scriptdir, "include"),
|
||||
path.join(scriptdir, "lib"),
|
||||
}
|
||||
|
||||
files
|
||||
{
|
||||
"lib/envelope.h",
|
||||
"lib/lpc.h",
|
||||
"lib/lsp.h",
|
||||
"lib/codebook.h",
|
||||
"lib/misc.h",
|
||||
"lib/psy.h",
|
||||
"lib/masking.h",
|
||||
"lib/os.h",
|
||||
"lib/mdct.h",
|
||||
"lib/smallft.h",
|
||||
"lib/highlevel.h",
|
||||
"lib/registry.h",
|
||||
"lib/scales.h",
|
||||
"lib/window.h",
|
||||
"lib/lookup.h",
|
||||
"lib/lookup_data.h",
|
||||
"lib/codec_internal.h",
|
||||
"lib/backends.h",
|
||||
"lib/bitrate.h",
|
||||
"lib/mdct.c",
|
||||
"lib/smallft.c",
|
||||
"lib/block.c",
|
||||
"lib/envelope.c",
|
||||
"lib/window.c",
|
||||
"lib/lsp.c",
|
||||
"lib/lpc.c",
|
||||
"lib/analysis.c",
|
||||
"lib/synthesis.c",
|
||||
"lib/psy.c",
|
||||
"lib/info.c",
|
||||
"lib/floor1.c",
|
||||
"lib/floor0.c",
|
||||
"lib/res0.c",
|
||||
"lib/mapping0.c",
|
||||
"lib/registry.c",
|
||||
"lib/codebook.c",
|
||||
"lib/sharedbook.c",
|
||||
"lib/lookup.c",
|
||||
"lib/bitrate.c",
|
||||
"lib/vorbisfile.c",
|
||||
"lib/vorbisenc.c",
|
||||
path.join(scriptdir, "lib/envelope.h"),
|
||||
path.join(scriptdir, "lib/lpc.h"),
|
||||
path.join(scriptdir, "lib/lsp.h"),
|
||||
path.join(scriptdir, "lib/codebook.h"),
|
||||
path.join(scriptdir, "lib/misc.h"),
|
||||
path.join(scriptdir, "lib/psy.h"),
|
||||
path.join(scriptdir, "lib/masking.h"),
|
||||
path.join(scriptdir, "lib/os.h"),
|
||||
path.join(scriptdir, "lib/mdct.h"),
|
||||
path.join(scriptdir, "lib/smallft.h"),
|
||||
path.join(scriptdir, "lib/highlevel.h"),
|
||||
path.join(scriptdir, "lib/registry.h"),
|
||||
path.join(scriptdir, "lib/scales.h"),
|
||||
path.join(scriptdir, "lib/window.h"),
|
||||
path.join(scriptdir, "lib/lookup.h"),
|
||||
path.join(scriptdir, "lib/lookup_data.h"),
|
||||
path.join(scriptdir, "lib/codec_internal.h"),
|
||||
path.join(scriptdir, "lib/backends.h"),
|
||||
path.join(scriptdir, "lib/bitrate.h"),
|
||||
path.join(scriptdir, "lib/mdct.c"),
|
||||
path.join(scriptdir, "lib/smallft.c"),
|
||||
path.join(scriptdir, "lib/block.c"),
|
||||
path.join(scriptdir, "lib/envelope.c"),
|
||||
path.join(scriptdir, "lib/window.c"),
|
||||
path.join(scriptdir, "lib/lsp.c"),
|
||||
path.join(scriptdir, "lib/lpc.c"),
|
||||
path.join(scriptdir, "lib/analysis.c"),
|
||||
path.join(scriptdir, "lib/synthesis.c"),
|
||||
path.join(scriptdir, "lib/psy.c"),
|
||||
path.join(scriptdir, "lib/info.c"),
|
||||
path.join(scriptdir, "lib/floor1.c"),
|
||||
path.join(scriptdir, "lib/floor0.c"),
|
||||
path.join(scriptdir, "lib/res0.c"),
|
||||
path.join(scriptdir, "lib/mapping0.c"),
|
||||
path.join(scriptdir, "lib/registry.c"),
|
||||
path.join(scriptdir, "lib/codebook.c"),
|
||||
path.join(scriptdir, "lib/sharedbook.c"),
|
||||
path.join(scriptdir, "lib/lookup.c"),
|
||||
path.join(scriptdir, "lib/bitrate.c"),
|
||||
path.join(scriptdir, "lib/vorbisfile.c"),
|
||||
path.join(scriptdir, "lib/vorbisenc.c"),
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
|
||||
filter "configurations:Release"
|
||||
runtime "Release"
|
||||
optimize "Speed"
|
||||
filter""
|
||||
end
|
||||
|
||||
filter""
|
||||
function m.link()
|
||||
links {"vorbis", "ogg"}
|
||||
externalincludedirs
|
||||
{
|
||||
path.join(scriptdir, "include"),
|
||||
path.join(scriptdir, "lib"),
|
||||
path.join(scriptdir, "../ogg/include")
|
||||
}
|
||||
end
|
||||
|
||||
return m
|
||||
Loading…
Reference in New Issue