Compare commits
4 Commits
b6431d1db2
...
52ea1ea63a
| Author | SHA1 | Date |
|---|---|---|
|
|
52ea1ea63a | |
|
|
2e23b64536 | |
|
|
6fa910901e | |
|
|
f39abf24dd |
|
|
@ -9,7 +9,7 @@ this makes developing on linux easier as most distros don't have SFML 3 in their
|
||||||
<br> -(optional) replace `<directory-path>` with the path to the directory you want the repo to be cloned to,
|
<br> -(optional) replace `<directory-path>` with the path to the directory you want the repo to be cloned to,
|
||||||
leaving this out will place this repo into `./imgui-sfml-premake`
|
leaving this out will place this repo into `./imgui-sfml-premake`
|
||||||
```
|
```
|
||||||
git submodule add https://gitlab.com/JosephA1997/imgui-sfml-premake.git <directory-path><br>
|
git submodule add https://gitlab.com/JosephA1997/imgui-sfml-premake.git <directory-path>
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
```
|
```
|
||||||
2. Add this to the top of the script that contains the workspace, replace 'path/to' with the directory that you cloned this repo to
|
2. Add this to the top of the script that contains the workspace, replace 'path/to' with the directory that you cloned this repo to
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ local vorbis = require("path/to/premake-scripts/vorbis/build-vorbis")
|
||||||
local freetype = require("path/to/premake-scripts/freetype/build-freetype")
|
local freetype = require("path/to/premake-scripts/freetype/build-freetype")
|
||||||
local imguisfml = require("path/to/premake-scripts/imgui-sfml/build-imgui-sfml")
|
local imguisfml = require("path/to/premake-scripts/imgui-sfml/build-imgui-sfml")
|
||||||
|
|
||||||
local exampleproject = require("path/to/premake-scripts/project")
|
local exampleproject = require("path/to/project")
|
||||||
|
|
||||||
-- assuming you are using the modules I provided with premake
|
-- assuming you are using the modules I provided with premake
|
||||||
require ("ecc/ecc")
|
require ("ecc/ecc")
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,24 @@ function m.generateproject(liboutdir, intdir)
|
||||||
|
|
||||||
ogg.link()
|
ogg.link()
|
||||||
|
|
||||||
|
files
|
||||||
|
{
|
||||||
|
path.join(rootdir, "flac/src/libFLAC/**.c"),
|
||||||
|
}
|
||||||
|
|
||||||
|
removefiles
|
||||||
|
{
|
||||||
|
path.join(rootdir, "flac/src/libFLAC/deduplication/**"),
|
||||||
|
}
|
||||||
|
|
||||||
|
includedirs
|
||||||
|
{
|
||||||
|
path.join(rootdir, "flac/include"),
|
||||||
|
path.join(rootdir, "flac/src/libFLAC/include"),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defines
|
defines
|
||||||
{
|
{
|
||||||
"FLAC__NO_DLL",
|
"FLAC__NO_DLL",
|
||||||
|
|
@ -27,23 +45,6 @@ function m.generateproject(liboutdir, intdir)
|
||||||
"HAVE_LROUND",--fix error in lpc.c <Static declaration of 'lround' follows non-static declaration>
|
"HAVE_LROUND",--fix error in lpc.c <Static declaration of 'lround' follows non-static declaration>
|
||||||
"HAVE_STDINT_H", --fix error in alloc.h <# error>
|
"HAVE_STDINT_H", --fix error in alloc.h <# error>
|
||||||
}
|
}
|
||||||
filter""
|
|
||||||
|
|
||||||
includedirs
|
|
||||||
{
|
|
||||||
path.join(rootdir, "flac/include"),
|
|
||||||
path.join(rootdir, "flac/src/libFLAC/include"),
|
|
||||||
}
|
|
||||||
|
|
||||||
files
|
|
||||||
{
|
|
||||||
path.join(rootdir, "flac/src/libFLAC/**.c"),
|
|
||||||
}
|
|
||||||
|
|
||||||
removefiles
|
|
||||||
{
|
|
||||||
path.join(rootdir, "flac/src/libFLAC/deduplication/**"),
|
|
||||||
}
|
|
||||||
|
|
||||||
filter"system:windows"
|
filter"system:windows"
|
||||||
files
|
files
|
||||||
|
|
@ -61,7 +62,6 @@ function m.link()
|
||||||
path.join(rootdir, "flac/include"),
|
path.join(rootdir, "flac/include"),
|
||||||
path.join(rootdir, "flac/src/libFLAC/include"),
|
path.join(rootdir, "flac/src/libFLAC/include"),
|
||||||
}
|
}
|
||||||
defines { "FLAC__NO_DLL" } -- in case projects want to reference flac directly, it wont expect a dynamic library
|
|
||||||
links {"flac"}
|
links {"flac"}
|
||||||
ogg.link()
|
ogg.link()
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
local m = {}
|
local m = {}
|
||||||
|
|
||||||
local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
|
local rootdir = path.join(path.getabsolute(path.getdirectory(_SCRIPT)), "../")
|
||||||
|
|
||||||
function m.generateproject(liboutdir, intdir)
|
function m.generateproject(liboutdir, intdir)
|
||||||
project"freetype"
|
project"freetype"
|
||||||
|
|
@ -10,7 +10,7 @@ function m.generateproject(liboutdir, intdir)
|
||||||
objdir(intdir)
|
objdir(intdir)
|
||||||
warnings"Off"
|
warnings"Off"
|
||||||
|
|
||||||
includedirs {path.join(scriptdir, "freetype/include")}
|
includedirs {path.join(rootdir, "freetype/include")}
|
||||||
|
|
||||||
defines
|
defines
|
||||||
{
|
{
|
||||||
|
|
@ -22,47 +22,47 @@ function m.generateproject(liboutdir, intdir)
|
||||||
|
|
||||||
files
|
files
|
||||||
{
|
{
|
||||||
path.join(scriptdir, "freetype/src/autofit/autofit.c"),
|
path.join(rootdir, "freetype/src/autofit/autofit.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftbase.c"),
|
path.join(rootdir, "freetype/src/base/ftbase.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftbbox.c"),
|
path.join(rootdir, "freetype/src/base/ftbbox.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftbdf.c"),
|
path.join(rootdir, "freetype/src/base/ftbdf.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftbitmap.c"),
|
path.join(rootdir, "freetype/src/base/ftbitmap.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftcid.c"),
|
path.join(rootdir, "freetype/src/base/ftcid.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftfstype.c"),
|
path.join(rootdir, "freetype/src/base/ftfstype.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftgasp.c"),
|
path.join(rootdir, "freetype/src/base/ftgasp.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftglyph.c"),
|
path.join(rootdir, "freetype/src/base/ftglyph.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftgxval.c"),
|
path.join(rootdir, "freetype/src/base/ftgxval.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftinit.c"),
|
path.join(rootdir, "freetype/src/base/ftinit.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftmm.c"),
|
path.join(rootdir, "freetype/src/base/ftmm.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftotval.c"),
|
path.join(rootdir, "freetype/src/base/ftotval.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftpatent.c"),
|
path.join(rootdir, "freetype/src/base/ftpatent.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftpfr.c"),
|
path.join(rootdir, "freetype/src/base/ftpfr.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftstroke.c"),
|
path.join(rootdir, "freetype/src/base/ftstroke.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftsynth.c"),
|
path.join(rootdir, "freetype/src/base/ftsynth.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/fttype1.c"),
|
path.join(rootdir, "freetype/src/base/fttype1.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftwinfnt.c"),
|
path.join(rootdir, "freetype/src/base/ftwinfnt.c"),
|
||||||
path.join(scriptdir, "freetype/src/bdf/bdf.c"),
|
path.join(rootdir, "freetype/src/bdf/bdf.c"),
|
||||||
path.join(scriptdir, "freetype/src/bzip2/ftbzip2.c"),
|
path.join(rootdir, "freetype/src/bzip2/ftbzip2.c"),
|
||||||
path.join(scriptdir, "freetype/src/cache/ftcache.c"),
|
path.join(rootdir, "freetype/src/cache/ftcache.c"),
|
||||||
path.join(scriptdir, "freetype/src/cff/cff.c"),
|
path.join(rootdir, "freetype/src/cff/cff.c"),
|
||||||
path.join(scriptdir, "freetype/src/cid/type1cid.c"),
|
path.join(rootdir, "freetype/src/cid/type1cid.c"),
|
||||||
path.join(scriptdir, "freetype/src/gzip/ftgzip.c"),
|
path.join(rootdir, "freetype/src/gzip/ftgzip.c"),
|
||||||
path.join(scriptdir, "freetype/src/lzw/ftlzw.c"),
|
path.join(rootdir, "freetype/src/lzw/ftlzw.c"),
|
||||||
path.join(scriptdir, "freetype/src/pcf/pcf.c"),
|
path.join(rootdir, "freetype/src/pcf/pcf.c"),
|
||||||
path.join(scriptdir, "freetype/src/pfr/pfr.c"),
|
path.join(rootdir, "freetype/src/pfr/pfr.c"),
|
||||||
path.join(scriptdir, "freetype/src/psaux/psaux.c"),
|
path.join(rootdir, "freetype/src/psaux/psaux.c"),
|
||||||
path.join(scriptdir, "freetype/src/pshinter/pshinter.c"),
|
path.join(rootdir, "freetype/src/pshinter/pshinter.c"),
|
||||||
path.join(scriptdir, "freetype/src/psnames/psnames.c"),
|
path.join(rootdir, "freetype/src/psnames/psnames.c"),
|
||||||
path.join(scriptdir, "freetype/src/raster/raster.c"),
|
path.join(rootdir, "freetype/src/raster/raster.c"),
|
||||||
path.join(scriptdir, "freetype/src/sdf/sdf.c"),
|
path.join(rootdir, "freetype/src/sdf/sdf.c"),
|
||||||
path.join(scriptdir, "freetype/src/sfnt/sfnt.c"),
|
path.join(rootdir, "freetype/src/sfnt/sfnt.c"),
|
||||||
path.join(scriptdir, "freetype/src/smooth/smooth.c"),
|
path.join(rootdir, "freetype/src/smooth/smooth.c"),
|
||||||
path.join(scriptdir, "freetype/src/svg/svg.c"),
|
path.join(rootdir, "freetype/src/svg/svg.c"),
|
||||||
path.join(scriptdir, "freetype/src/truetype/truetype.c"),
|
path.join(rootdir, "freetype/src/truetype/truetype.c"),
|
||||||
path.join(scriptdir, "freetype/src/type1/type1.c"),
|
path.join(rootdir, "freetype/src/type1/type1.c"),
|
||||||
path.join(scriptdir, "freetype/src/type42/type42.c"),
|
path.join(rootdir, "freetype/src/type42/type42.c"),
|
||||||
path.join(scriptdir, "freetype/src/winfonts/winfnt.c"),
|
path.join(rootdir, "freetype/src/winfonts/winfnt.c"),
|
||||||
path.join(scriptdir, "freetype/src/base/ftdebug.c"), --fix linking errors related to FT_THROW, et)c
|
path.join(rootdir, "freetype/src/base/ftdebug.c"), --fix linking errors related to FT_THROW, et)c
|
||||||
}
|
}
|
||||||
|
|
||||||
filter "system:linux"
|
filter "system:linux"
|
||||||
|
|
@ -75,12 +75,12 @@ function m.generateproject(liboutdir, intdir)
|
||||||
filter"system:windows"
|
filter"system:windows"
|
||||||
files
|
files
|
||||||
{
|
{
|
||||||
path.join(scriptdir, "freetype/builds/windows/ftsystem.c"),
|
path.join(rootdir, "freetype/builds/windows/ftsystem.c"),
|
||||||
path.join(scriptdir, "freetype/builds/windows/ftdebug.c"),
|
path.join(rootdir, "freetype/builds/windows/ftdebug.c"),
|
||||||
}
|
}
|
||||||
|
|
||||||
filter"system:linux"
|
filter"system:linux"
|
||||||
files{path.join(scriptdir, "freetype/builds/unix/ftsystem.c")}
|
files{path.join(rootdir, "freetype/builds/unix/ftsystem.c")}
|
||||||
|
|
||||||
filter "configurations:Debug"
|
filter "configurations:Debug"
|
||||||
optimize"Speed"
|
optimize"Speed"
|
||||||
|
|
@ -89,7 +89,7 @@ function m.generateproject(liboutdir, intdir)
|
||||||
end
|
end
|
||||||
|
|
||||||
function m.link()
|
function m.link()
|
||||||
externalincludedirs{path.join(scriptdir, "freetype/include")}
|
externalincludedirs{path.join(rootdir, "freetype/include")}
|
||||||
links {"freetype"}
|
links {"freetype"}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue