1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added documentation for including static libraries in JUCE modules

This commit is contained in:
tpoole 2017-04-26 22:06:43 +01:00 committed by hogliux
parent 7ed37f8600
commit 496e55c988

View file

@ -3,7 +3,7 @@
======================
A JUCE module is a collection of header and source files which can be added to a project
to provide a set of classes or related functionality.
to provide a set of classes and libraries or related functionality.
Their structure is designed to make it as simple as possible for modules to be added to
user projects on many platforms, either via automated tools, or by manual inclusion.
@ -94,6 +94,35 @@ both a .mm and a .cpp file whose names are otherwise identical, then on OSX/iOS
will be used and the cpp ignored. (And vice-versa for other platforms, of course).
Precompiled libraries
---------------------
Precompiled libraries can be included in a module by placing them in a libs/ subdirectory.
The following directories are automatically added to the library search paths, and libraries
placed in these directories can be linked with projects via the OSXLibs, iOSLibs,
windowsLibs, linuxLibs and mingwLibs keywords in the module declaration (see the following
section).
OS X:
libs/MacOSX/{arch}, where {arch} is the architecture you are targeting in Xcode ("x86_64" or
"i386", for example).
Visual Studio:
VisualStudio{year}/{arch}/{run-time}, where {year} is the four digit year of the Visual Studio
release, arch is the target architecture in Visual Studio ("x64" or "Win32", for example), and
{runtime} is the type of the run-time library indicated by the corresponding compiler flag
("MD", "MDd", "MT", "MTd").
Linux:
libs/Linux/{arch}, where {arch} is the architecture you are targeting with the compiler. Some
common examples of {arch} are "x86_64", "i386" and "armv6".
MinGW:
libs/MinGW/{arch}, where {arch} can take the same values as Linux.
iOS:
libs/iOS/{arch}, where {arch} is the architecture you are targeting in Xcode ("arm64" or
"x86_64", for example).
The BEGIN_JUCE_MODULE_DECLARATION block
=======================================
@ -133,12 +162,18 @@ Possible values:
OSXFrameworks: (Optional) A list (space or comma-separated) of OSX frameworks that are needed
by this module
iOSFrameworks: (Optional) Like OSXFrameworks, but for iOS targets
linuxLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in a
linux build (these are passed to the linker via the -l flag)
linuxPackages: (Optional) A list (space or comma-separated) pkg-config packages that should be used to pass
compiler (CFLAGS) and linker (LDFLAGS) flags
linuxLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in a
linux build (these are passed to the linker via the -l flag)
mingwLibs: (Optional) A list (space or comma-separated) of static libs that should be linked in a
win32 mingw build (these are passed to the linker via the -l flag)
OSXLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in an
OS X build (these are passed to the linker via the -l flag)
iOSLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in an
iOS build (these are passed to the linker via the -l flag)
windowsLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in a
Visual Studio build (without the .lib suffixes)
Here's an example block: