I have simple console application project for live video streaming using cross-platform libs on to some TCP server. I have it ported manually to Linux and Mac OS X from Windows. So now I have 3 projects using same code each of them created manually and tested. Now I am trying to create a premake lua projects creation file to automate process of updating project files.
I started creating a lua file
I have an array of lib links in my premake lua build file I have an array of lib links required for my project.
Some of them kind of repeat some of them do not (because for example there is "openal32" on Windows (even on Windows 7 64 bit version) and much simpler name "openal" on Linux and "OpenAL.framework" on Mac OS X (and its the only option on mac os to include openAL)
I have a linkdirs property set - one for all systems
libdirs {
"/opt/local/lib",
"/System/Libarary/Frameworks",
"/Library/Frameworks",
"/usr/lib",
"/usr/local/lib" }
That links to dirs will probably work for Mac OS X (because we use Mac Ports that installs by default into /opt/local/lib
) and Linux (where we mostly use app-get analogs that auto install all into usr/lib
, and sometimes into /usr/local/lib
). But on windows you never know where ffmpeg is or where is boost installed (probably each programmer has his own idea where to keep windows Libs and Headers...) so we need a simple thing from premake:
Action to add a user defined librarys directorys that will be included into libdirs
array and same thing for includedirs
array. It shall ba capable to add more than one directory.
How to enable such thing?
I tried to create an "option based system" like
newoption {
trigger = "libsPath",
value = "PATH",
description = "Choose a particular directory for general libs search"
}
if not _OPTIONS["libsPath"] then
_OPTIONS["libsPath"] = NULL
end
libdirs {
"/opt/local/lib",
"/System/Libarary/Frameworks",
"/Library/Frameworks",
"/usr/lib",
"/usr/local/lib",
_OPTIONS["libsPath"]
}
but it seems not to work on windows... what shall I do?