mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Updated main README with CMake support info and changed docs extension from .txt to .md
This commit is contained in:
parent
0d410ef3e6
commit
67925d384f
31 changed files with 154 additions and 98 deletions
|
|
@ -16,6 +16,38 @@ In addition to CMake you'll need a build toolchain for your platform, such as Xc
|
|||
|
||||
## Getting Started
|
||||
|
||||
### Using `add_subdirectory`
|
||||
|
||||
The simplest way to include JUCE in your project is to add JUCE as a
|
||||
subdirectory of your project, and to include the line `add_subdirectory(JUCE)`
|
||||
in your project CMakeLists.txt. This will make the JUCE targets and helper
|
||||
functions available for use by your custom targets.
|
||||
|
||||
### Using `find_package`
|
||||
|
||||
To install JUCE globally on your system, you'll need to tell CMake where to
|
||||
place the installed files.
|
||||
|
||||
# Go to JUCE directory
|
||||
cd /path/to/clone/JUCE
|
||||
# Configure build with library components only
|
||||
cmake -B cmake-build-install -DCMAKE_INSTALL_PREFIX=/path/to/JUCE/install
|
||||
# Run the installation
|
||||
cmake --build cmake-build-install --target install
|
||||
|
||||
In your project which consumes JUCE, make sure the project CMakeLists.txt contains the line
|
||||
`find_package(JUCE CONFIG REQUIRED)`. This will make the JUCE modules and CMake helper functions
|
||||
available for use in the rest of your build. Then, run the build like so:
|
||||
|
||||
# Go to project directory
|
||||
cd /path/to/my/project
|
||||
# Configure build, passing the JUCE install path you used earlier
|
||||
cmake -B cmake-build -DCMAKE_PREFIX_PATH=/path/to/JUCE/install
|
||||
# Build the project
|
||||
cmake --build cmake-build
|
||||
|
||||
### Example projects
|
||||
|
||||
In the JUCE/examples/CMake directory, you'll find example projects for a GUI app, a console app,
|
||||
and an audio plugin. You can simply copy one of these subdirectories out of the JUCE repo, add JUCE
|
||||
as a submodule, and uncomment the call to `add_subdirectory` where indicated in the CMakeLists.txt.
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
The JUCE Module Format
|
||||
======================
|
||||
# The JUCE Module Format
|
||||
|
||||
A JUCE module is a collection of header and source files which can be added to a project
|
||||
to provide a set of classes and libraries or related functionality.
|
||||
|
|
@ -9,8 +8,7 @@ user projects on many platforms, either via automated tools, or by manual inclus
|
|||
|
||||
Each module may have dependencies on other modules, but should be otherwise self-contained.
|
||||
|
||||
File structure
|
||||
==============
|
||||
## File structure
|
||||
|
||||
Each module lives inside a folder whose name is the same as the name of the module. The
|
||||
JUCE convention for naming modules is lower-case with underscores, e.g.
|
||||
|
|
@ -26,8 +24,7 @@ the user's' project will include. The module may have as many other internal sou
|
|||
it needs, but these must all be inside sub-folders!
|
||||
|
||||
|
||||
Master header file
|
||||
------------------
|
||||
### Master header file
|
||||
|
||||
In this root folder there must be ONE master header file, which includes all the necessary
|
||||
header files for the module. This header must have the same name as the module, with
|
||||
|
|
@ -46,8 +43,7 @@ This master header file must also contain a comment with a BEGIN_JUCE_MODULE_DEC
|
|||
block which defines the module's requirements - the syntax for this is described later on..
|
||||
|
||||
|
||||
Module CPP files
|
||||
----------------
|
||||
### Module CPP files
|
||||
|
||||
A module consists of a single header file and zero or more .cpp files. Fewer is better!
|
||||
|
||||
|
|
@ -94,8 +90,7 @@ 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
|
||||
|
||||
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
|
||||
|
|
@ -128,8 +123,7 @@ section).
|
|||
- libs/Android/{arch}, where {arch} is the architecture provided by the Android Studio variable
|
||||
"${ANDROID_ABI}" ("x86", "armeabi-v7a", "mips", for example).
|
||||
|
||||
The BEGIN_JUCE_MODULE_DECLARATION block
|
||||
=======================================
|
||||
## The BEGIN_JUCE_MODULE_DECLARATION block
|
||||
|
||||
This block of text needs to go inside the module's main header file. It should be commented-out
|
||||
and perhaps inside an `#if 0` block too, but the Introjucer will just scan the whole file for the
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
JUCE Documentation
|
||||
==================
|
||||
# JUCE Documentation
|
||||
|
||||
This directory contains files documenting the JUCE Module Format, and the JUCE
|
||||
CMake API.
|
||||
|
|
@ -15,11 +14,9 @@ online](https://juce.com/learn/documentation), or you can generate a local copy
|
|||
which can be used without an internet connection. For instructions on generating
|
||||
offline docs, see below.
|
||||
|
||||
Generating Offline HTML Documentation
|
||||
=====================================
|
||||
# Generating Offline HTML Documentation
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
## Dependencies
|
||||
|
||||
- doxygen
|
||||
- python
|
||||
|
|
@ -28,8 +25,7 @@ Dependencies
|
|||
|
||||
Make sure that all the dependencies can be found on your PATH.
|
||||
|
||||
Building
|
||||
--------
|
||||
## Building
|
||||
|
||||
- cd into the `doxygen` directory on the command line
|
||||
- run `make`
|
||||
|
|
@ -802,8 +802,8 @@ WARN_LOGFILE =
|
|||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = build \
|
||||
"../JUCE Module Format.txt" \
|
||||
"../CMake API.txt"
|
||||
"../JUCE Module Format.md" \
|
||||
"../CMake API.md"
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue