The purpose of this guide is to help developers that have been working in other platforms (i.e., Linux, Windows) using mainly C++ and are not familiar with XCode nor ObjectiveC, but have a lot of desire to work with Ogre3D in Mac OS X. Additionally it would help other developers that wish to work with QtCreator and CMake.


Prerequisites

  • You need to have a basic C++ background.
  • Basic knowledge about how to use a terminal in Mac OS X (create folders, list directory contents, run commands, etc.).
  • An Internet connection (this sounds obvious, but it’s better to clarify :-) ).
  • Have the following software installed (there are no specific restrictions regarding the versions used, but it's better to use the latest):
    • Xcode.
    • Mercurial.
    • QtCreator.
    • CMake.
  • When this tutorial refers to the terminal, it's refering to the Mac OS X Terminal.
  • When entering a command in the terminal, this tutorial refers to the current path location with the following notation:
$> cd /folder1/folder2
/folder1/folder2 $> pwd
/folder1/folder2

Building Ogre

First, create a folder where the whole Ogre3D project will live:

$> sudo mkdir -p /opt/dev

You can create this folder in another location if you wish. This is not a blocker. The important thing is that you keep in mind where the folder was created to use it from now on.

Downloading Ogre3D’s Dependencies

Create the folder where the dependencies will reside:

/opt/dev/ $> mkdir dependencies

Go to the following link and download ogre3D’s dependencies:

http://sourceforge.net/projects/ogre/files/ogre-dependencies-mac/1.9/OgreDependencies_OSX_libc%2B%2B_20130610.zip/download

Unzip the file you downloaded. This will contain a folder called Dependencies. Copy the content of that folder to the following location:

/opt/dev/dependencies

You should have something like this:
Finder screenshot about ogre3d dependencies downloaded
These dependencies include:

  • Boost: It’s a set of open source libraries that extend the functionality of C++.
  • Freeimage: it’s an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications.
  • Freetype: It’s is a freely available software library to render fonts.
  • OIS: It’s a code library for constructing a human-computer interface with input devices such as a keyboard, mouse or game controller.
  • zlib: It’s a software library used for data compression.
  • zziplib: it offers the ability to easily extract data from files archived in a single zip file.

The previous downloaded dependencies are static libraries (end up with the extension .a). Normally in other platforms when you build a library for 32 and 64 bits you end up with two different library files (one for 32 and other for 64). Here in Mac OS X, you can build for 32 AND 64 bits and you end up with a single file. That single file is what is called a “flat” binary or a “universal” binary. In order to check if a library is for 32 bits or 64 bits or both, just run the following command in a terminal:

/opt/dev/dependencies/lib/Release $> lipo -info libOIS.a
Architectures in the fat file: libOIS.a are: x86_64 i386

Downloading and Building Ogre3D

it’s always better to use the latest stable version from the project’s repository. To do that you should use Mercurial (Mercurial is a distributed version control system). To validate if Mercurial is installed correctly, in a terminal write:

$> hg
Mercurial Distributed SCM

basic commands:

 add           add the specified files on the next commit
 annotate      show changeset information by line for each file
 clone         make a copy of an existing repository
 commit        commit the specified files or all outstanding changes
 diff          diff repository (or selected files)
 export        dump the header and diffs for one or more changesets
 forget        forget the specified files on the next commit
 init          create a new repository in the given directory
 log           show revision history of entire repository or files
 merge         merge working directory with another revision
 pull          pull changes from the specified source
 push          push changes to the specified destination
 remove        remove the specified files on the next commit
 serve         start stand-alone webserver
 status        show changed files in the working directory
 summary       summarize working directory state
 update        update working directory (or switch revisions)

use "hg help" for the full list of commands or "hg -v" for details

To download the Ogre3D's code, write in a terminal:

$> cd /opt/dev
/opt/dev/ $> hg clone https://bitbucket.org/sinbad/ogre ogre3d-1.9.0

The last part of the previous command (ogre3d-1.9.0) will be the name of the folder where the source code will be downloaded. The download process will take something like 20 minutes (although it depends of your Internet connection).
If everything went okay, the folder should be around 460 MB:

opt/dev/$> du -sh /opt/dev/ogre3d-1.9.0/
461M	/opt/dev/ogre3d-1.9.0/

Now it's time to build Ogre3D statically (before running the cmake command, validate that your paths are consistent. After that, just build):

/opt/dev/ogre3d-1.9.0 $> mkdir build
/opt/dev/ogre3d-1.9.0 $> cd !$
/opt/dev/ogre3d-1.9.0/build $> cmake -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -v -stdlib=libc++ -std=c++11" -D BOOST_ROOT=/opt/dev/dependencies/include/boost -D BOOST_INCLUDEDIR=/opt/dev/dependencies/include/boost -D BOOST_LIBRARYDIR=/opt/dev/dependencies/lib -D OGRE_DEPENDENCIES_DIR=/opt/dev/dependencies -D OGRE_STATIC=1 -D OGRE_BUILD_SAMPLES=1 -G Xcode ..

Here is the explanation for every parameter:

Parameter Description
CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -v -stdlib=libc++ -std=c++11” Defines support for C++11.
BOOST_ROOT=/opt/dev/dependencies/include/boost Defines the location of the Boost base folder.
BOOST_INCLUDEDIR=/opt/dev/dependencies/include/boost Defines the location of the Boost’s include folder.
BOOST_LIBRARYDIR=/opt/dev/dependencies/lib Defines the location of the Boost’s library folder.
OGRE_DEPENDENCIES_DIR=/opt/dev/dependencies Defines the location of the Ogre3D’s dependencies folder.
OGRE_STATIC=1 Defines that Ogre3D will be built statically.
OGRE_BUILD_SAMPLES=1 Defines that the Ogre3D’s samples will be built.
-G Xcode Specify a makefile generator (Xcode in this case).
.. The couple of dots indicate the location of the CMakeLists.txt file (which is the file that cmake needs to create all the make files).

After building Ogre3D's makefiles with CMake, look for the OGRE.xcodeproj file:

/opt/dev/ogre3d-1.9.0/build $> ls -l OGRE.*
OGRE.build:
total 0
drwxr-xr-x  5 USER  wheel  170 Dec  8 19:14 Debug
drwxr-xr-x  6 USER  wheel  204 Dec  8 19:22 Release

OGRE.xcodeproj:
total 5400
-rw-r--r--  1 USER  wheel  2763182 Dec  8 19:05 project.pbxproj
drwxr-xr-x  4 USER  wheel      136 Dec  8 19:14 project.xcworkspace
drwxr-xr-x  3 USER  wheel      102 Dec  8 19:14 xcuserdata

The OGRE.xcodeproj file is the Xcode project configuration file for the Ogre3D’s construction. Go to Finder and double click over that file. This will open Xcode.

Note: This tutorial will use Xcode only to build Ogre3D. Afterwards you’re not going to use it anymore.

This is what you’re going to see when Xcode opens with the Ogre3D project:
First screen when you open the Ogre3D's Xcode project file
Go to ProductSchemeEdit Scheme.. and change the Build Configuration to Release:
Xcode build all release configuration
Select the install scheme and change the Build Configuration to Release:
Xcode install release configuration
Select again the ALL_BUILD scheme:
xcode build all configuration release
Close the dialog by clicking the Close button. Now in order to start the building process, in the main menu select ProductBuild or press Command + B.
To view the building log, select ViewNavigatorsShow Report Navigator. The building progress can be viewed in the blue progress bar in the Xcode’s top center window area:
xcode_progress_bar
The whole building process is going to take something like 20 minutes in a computer with Processor: 1.3 GHz Intel Core i5 and Memory: 4 GB 1600 MHz DDR3.
When the building process has finished, select ProductSchemeinstall. Then ProductBuild.
After installing Ogre3D, you should have the following folder:

/opt/dev/ogre3d-1.9.0/build/ $> cd sdk
/opt/dev/ogre3d-1.9.0/build/sdk $> ls -l
total 0
drwxr-xr-x  23 USER  wheel  782 Dec 11 19:09 CMake
drwxr-xr-x  13 USER  wheel  442 Dec 11 19:09 Docs
drwxr-xr-x  13 USER  wheel  442 Dec 11 19:09 Media
drwxr-xr-x   3 USER  wheel  102 Dec 11 19:09 bin
drwxr-xr-x  12 USER  wheel  408 Dec 11 19:09 include
drwxr-xr-x  26 USER  wheel  884 Dec 11 19:09 lib

Running the Ogre3D’s Samples

Now that the building process has finished you can run the Ogre3D’s samples. Open the following file in Finder:

/opt/dev/ogre3d-1.9.0/build/bin/Release/SampleBrowser.app

You should be able to see the sample browser application called SampleBrowser.app. Additionally, you can see the sample browser’s log file in the following path:

/Users/YOURUSERNAME/Library/Application Support/Ogre/Xalafu/ogre.log

Using QtCreator

Now that Ogre3D is finally compiled, let’s take a look at the IDE that we’re going to use during this tutorial: QtCreator. This IDE includes the following features:

  • Cross-platform.
  • Also used for projects non-related to Qt (Qt is a cross-platform application framework).
  • Visual Debugger.
  • Support for CMake.
  • Excellent Vim plugin.
  • Good integration with tools: Git, Subversion, Mercurial.
 Note
For this tutorial you don't need to download the whole Qt SDK, only the QtCreator application.

Before using QtCreator for the first time, you need to create a Build Kits in QtCreator (assuming that you just have installed QtCreator and don’t have any Build Kits configured). Open QtCreator's preferences or simply hit Command + . On the left panel select the Build and Run option:
QtCreator's Build kit configuration 1
Select the Add button (on the upper-right side). A sub-dialog will be shown, fill the Kits name information:
QtCreator build configuration 2

Creating a Project (that will use CMake)

From the File menu select the option New File or Project…. You will see a dialog like this:
Project Creation no-qtporject
Select the option Non-Qt Project from the Projects list and subsequently select the Plain C++ Project (CMake Build) option. Afterwards click the Choose… button (located at the bottom-right side of the dialog). Afterwards set the project’s name and location:
QtCreator setting projects name
The information used for this tutorial in the previous dialog (the folder ogreprojects was created beforehand):

Name: tutorial1
Create in: /opt/dev/ogreprojects

Then click the Continue button. In the following dialog select a version control if you are going to use one. This tutorial won't use any:
QtCreatot Version control configuration
Then click the Done button. You now need to define the Build Location folder in the following dialog:
Qtcreator build Cmake folder configuration

The information used for this tutorial in the previous dialog:
/opt/dev/ogreprojects/tutorial1/build

Click the Continue button. In the following dialog you will run the project’s cmake configuration file. Click the Run CMake button and you should see something like this:
QtCreator cmake run results

 Note
Validate that you’re not getting any RED warnings in the previous output dialog.
Now hit the Done button and you will see the template code that QtCreator has created for you:

Qtcreator first code
From the Build menu select the Build All option. The Compile Output window (located at the bottom) will tell you the building information. If everything went okay, from the Build menu select the Run option. You should see the programs output in the Application output (located at the bottom) window:
QtCreator output window

Integrating Ogre3D in your Project

Now that you have a basic C++ project running, the idea is to integrate the Ogre3D libraries inside the project.
Your project has two files:

  • CMakeLists.txt (project configuration file)
  • main.cpp (source code file)

Here is the current code for both:
CMakeLists.txt:

project(tutorial1)
cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})

main.cpp:

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello World" << endl;
    return 0;
}

Before changing anything in those files, let's reorganize the project files:

/opt/dev/ogreprojects/tutorial1 $> ls -l
total 40
-rw-r--r--  1 USER  wheel    329 Dec 10 21:10 CMakeLists.txt
drwxr-xr-x  9 USER  wheel    306 Dec 10 21:10 build
drwxr-xr-x  3 USER  wheel    102 Dec 10 21:09 main.cpp

/opt/dev/ogreprojects/tutorial1 $> mkdir src
/opt/dev/ogreprojects/tutorial1 $> mv main.cpp src/

Now, after performing some changes in the CMakeLists.txt file, this is how it looks like:

 Note
CMake is case insensitive
PROJECT(tutorial1)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++11")

MESSAGE(STATUS ${PROJECT_SOURCE_DIR}/src)

FILE(GLOB_RECURSE SRCS "${PROJECT_SOURCE_DIR}/src/*.cpp")
FILE(GLOB_RECURSE HDRS "${PROJECT_SOURCE_DIR}/src/*.h")

ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS} ${HDRS})
  • Line 4: This helps to activate the C++11 support.
  • Line 6: Printing the Project source dir path, only for informative purposes.
  • Line 8-9: This is the CMake way to include the source code files in your project. From now on every source code should go inside the src folder. CMake will search recursively inside this folder.
  • Line 11: This is the CMake way to say: "Create an executable using the project's source code...and name the executable file just like the project's name".
 Note
Whenever you perform a change in the CMakeLists.txt file, you should re-run the CMake command.

Run the CMake command, you should see something like this:

-- /opt/dev/ogreprojects/tutorial1
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/dev/ogreprojects/tutorial1/build

Build and run your project. You shouldn't get any errors.

Binaries and App Bundles

In the terminal do:

$> cd /opt/dev/ogreprojects/tutorial1/build
/opt/dev/ogreprojects/tutorial1/build $> ls -l
total 144
 0 drwxr-xr-x   9 USER  wheel    306 Dec 10 21:29 .
 0 drwxr-xr-x   7 USER  wheel    238 Dec 10 21:30 ..
16 -rw-r--r--@  1 USER  wheel   6148 Dec 10 21:30 .DS_Store
56 -rw-r--r--   1 USER  wheel  26419 Dec  9 20:11 CMakeCache.txt
 0 drwxr-xr-x  13 USER  wheel    442 Dec 10 21:30 CMakeFiles
16 -rw-r--r--   1 USER  wheel   5044 Dec 10 21:29 Makefile
 8 -rw-r--r--   1 USER  wheel   1441 Dec  9 20:11 cmake_install.cmake
32 -rwxr-xr-x   1 USER  wheel  15228 Dec 10 21:10 tutorial1
16 -rw-r--r--   1 USER  wheel   5350 Dec 10 21:29 tutorial1.cbp

Do you see the file called tutorial1?, that is the project's executable (or binary). In order to execute it, in the terminal run:

/opt/dev/ogreprojects/tutorial1/build $> ./tutorial1
Hello World

The project has now an executable and you're able to run it. But things need to change a little bit in order to adapt in the Mac OS X's way of handling executables. In the Mac OS X platform you usually use what is called an Application Bundle (a.k.a app bundle). An app Bundle is a (special) directory that allows related resources such as an application's executable and its graphics to be grouped together, appearing as a single file to the user.
In order for the project to create an app bundle instead of a plain binary, we need to change something in the CMakeLists.txt file. Change the line 11 in your CMakeLists.txt file for this one:

ADD_EXECUTABLE(${PROJECT_NAME} MACOSX_BUNDLE ${SRCS} ${HDRS})

The only difference is the addition of the MACOSX_BUNDLE flag to the ADD_EXECUTABLE command. Now run the CMake command, then Build and Run. In your build folder you should now see a new file called tutorial1.app:

/opt/dev/ogreprojects/tutorial1/build $> ls -l
total 144
 0 drwxr-xr-x   9 USER  wheel    306 Dec 10 21:29 .
 0 drwxr-xr-x   7 USER  wheel    238 Dec 10 21:30 ..
16 -rw-r--r--@  1 USER  wheel   6148 Dec 10 21:30 .DS_Store
56 -rw-r--r--   1 USER  wheel  26419 Dec  9 20:11 CMakeCache.txt
 0 drwxr-xr-x  13 USER  wheel    442 Dec 10 21:30 CMakeFiles
16 -rw-r--r--   1 USER  wheel   5044 Dec 10 21:29 Makefile
 8 -rw-r--r--   1 USER  wheel   1441 Dec  9 20:11 cmake_install.cmake
32 -rwxr-xr-x   1 USER  wheel  15228 Dec 10 21:10 tutorial1
 0 drwxr-xr-x   3 USER  wheel    102 Dec 10 21:47 tutorial1.app
16 -rw-r--r--   1 USER  wheel   5350 Dec 10 21:29 tutorial1.cbp

If you try to run the app bundle just like we run the binary previously, you will get the following error:

/opt/dev/ogreprojects/tutorial1/build $> ./tutorial1.app
-bash: ./tutorial1.app/: is a directory

If you want to run the binary from the terminal, you need to treat the app bundle as a directory (in fact it's a directory):

/opt/dev/ogreprojects/tutorial1/build $> cd tutorial1.app/
/opt/dev/ogreprojects/tutorial1/build/tutorial1.app $> pwd
/opt/dev/ogreprojects/tutorial1/build/tutorial1.app
/opt/dev/ogreprojects/tutorial1/build/tutorial1.app $> ls -l
total 0
drwxr-xr-x  4 USER  wheel  136 Dec 10 21:47 Contents
/opt/dev/ogreprojects/tutorial1/build/tutorial1.app $> cd Contents/; ls -l
total 8
-rw-r--r--  1 USER  wheel  986 Dec 10 21:47 Info.plist
drwxr-xr-x  3 USER  wheel  102 Dec 10 21:47 MacOS
/opt/dev/ogreprojects/tutorial1/build/tutorial1.app/Contents $> cd MacOS/; ls -l
total 32
-rwxr-xr-x  1 USER  wheel  15228 Dec 10 21:47 tutorial1
/opt/dev/ogreprojects/tutorial1/build/tutorial1.app/Contents/MacOS $> ./tutorial1
Hello World
 Note
Don't worry about doing all these steps in order to run your binary every time. Wether it's a binary or an app bundle, QtCreator will take care of this and will launch your application when you select the Run command from the Build menu.

Including Libraries in your Project

Currently this is the status of the main.cpp file:

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello World" << endl;
    return 0;
}

Let's add a Ogre::String in order to print something else:

#include <iostream>

using namespace std;

int main()
{
    Ogre::String variable = "My first string using Ogre3D";
    cout << "Hello World: " << variable << endl;
    return 0;
}

If you try to build the previous code, you will get an error:

/opt/dev/ogreprojects/tutorial1/src/main.cpp:9:5: error: use of undeclared identifier 'Ogre'
    Ogre::String variable = "My frist string using Ogre3D";
    ^
1 error generated.

This means that the compiler is not able to find the Ogre::String declaration in your code. In order to fix that we need to add the libraries of Ogre3D into the project.
This is the new CMakeLists.txt file:

PROJECT(tutorial1)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++11")

INCLUDE_DIRECTORIES(/opt/dev/ogre3d-1.9.0/build/sdk/include/OGRE)
LINK_DIRECTORIES(/opt/dev/ogre3d-1.9.0/build/sdk/lib)

FILE(GLOB_RECURSE SRCS "${PROJECT_SOURCE_DIR}/src/*.cpp")
FILE(GLOB_RECURSE HDRS "${PROJECT_SOURCE_DIR}/src/*.h")

ADD_EXECUTABLE(${PROJECT_NAME} MACOSX_BUNDLE ${SRCS} ${HDRS})

TARGET_LINK_LIBRARIES(
${PROJECT_NAME}
/opt/dev/ogre3d-1.9.0/build/sdk/lib/libOgreMainStatic.a
)

Changes:

  • The following line was deleted because is no longer necessary:
MESSAGE(STATUS ${PROJECT_SOURCE_DIR}/src)
  • Line 6: This line sets the location to the Ogre3D's include source code folder (this is the location where the compiler will find the definition of the Ogre::String).
  • Line 7: Sets the location of the Ogre3D's libraries for the Linker (after the compilation process is done, the output is not yet a binary, it's what is called an object file. After the object file is generated by the compilation process, a special program called the Linker "links" the libraries used by the source code to the compilation's output. After that process you end up with a binary file).
  • Line 14: This line allows you to link a target (the project we are creating) to the given libraries (in this case the libOgreMainStatic.a library).

If you want, you can polish a little bit more the CMakeLists.txt file:

PROJECT(tutorial1)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++11")

SET(OGRE_BASE_FOLDER "/opt/dev/ogre3d-1.9.0/")
SET(OGRE_INCLUDE_FOLDER "/opt/dev/ogre3d-1.9.0/build/sdk/include/OGRE")
SET(OGRE_LIB_FOLDER "/opt/dev/ogre3d-1.9.0/build/sdk/lib")

INCLUDE_DIRECTORIES(${OGRE_INCLUDE_FOLDER})
LINK_DIRECTORIES(${OGRE_LIB_FOLDER})

FILE(GLOB_RECURSE SRCS "${PROJECT_SOURCE_DIR}/src/*.cpp")
FILE(GLOB_RECURSE HDRS "${PROJECT_SOURCE_DIR}/src/*.h")

ADD_EXECUTABLE(${PROJECT_NAME} MACOSX_BUNDLE ${SRCS} ${HDRS})

TARGET_LINK_LIBRARIES(
${PROJECT_NAME}
${OGRE_LIB_FOLDER}/libOgreMainStatic.a
)

Now go the main.cpp and add this line after the inclusion of the iostream library :

#include <OgreString.h>

You should have a main.cpp file like this:

#include <iostream>
#include <OgreString.h>

using namespace std;

bool start();

int main()
{
    Ogre::String variable = "My first string using Ogre3D";
    cout << "Hello World: " << variable << endl;
    return 0;
}

When you included the previous line (#include ‹OgreString.h›), the QtCreator IDE should be able to find the definition of the Ogre::String. To validate if it's true, the Ogre::string type should be colored in a purple tone:
QTcreator Purple Variable
Now run the CMake command, then Build and Run. Everything should be working fine:
QtCreator applicaiton output

 Note
From the previous image you can tell that QtCreator is using the app bundle.

Ok. This first part ends here. In order to create a window and render something in it, continue to the following part: Using Ogre3D 1.9 Statically

<HR>
Creative Commons Copyright -- Some rights reserved.


THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

  • "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
  • "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
  • "Licensor" means the individual or entity that offers the Work under the terms of this License.
  • "Original Author" means the individual or entity who created the Work.
  • "Work" means the copyrightable work of authorship offered under the terms of this License.
  • "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
  • "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.

2. Fair Use Rights

Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant

Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

  • to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
  • to create and reproduce Derivative Works;
  • to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
  • to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
  • For the avoidance of doubt, where the work is a musical composition:
    • Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.
    • Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
    • Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).


The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions

The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

  • You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested.
  • You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License.
  • If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability.

EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

  • This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
  • Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

  • Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
  • Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
  • If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
  • No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
  • This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.