Skip to content

Commit

Permalink
Merge pull request #41 from cameronwhite/submodules
Browse files Browse the repository at this point in the history
Fix #40 - Use submodules for third-party libraries.
  • Loading branch information
cameronwhite committed Jul 26, 2014
2 parents c285e5e + fbb43c0 commit 4572ce8
Show file tree
Hide file tree
Showing 39 changed files with 155 additions and 27,626 deletions.
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "external/Catch"]
path = external/Catch
url = git://github.com/philsquared/Catch.git
[submodule "external/rtmidi"]
path = external/rtmidi
url = git://github.com/thestk/rtmidi.git
[submodule "external/rapidjson"]
path = external/rapidjson
url = git://github.com/miloyip/rapidjson.git
[submodule "external/pugixml"]
path = external/pugixml
url = git://github.com/zeux/pugixml.git
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ else()
endif()
endif()

# Configure backends for RtMidi.
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions(-D__LINUX_ALSA__)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_definitions(-D__MACOSX_AU__)
add_definitions(-D__MACOSX_CORE__)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_definitions(-D__WINDOWS_MM__)
endif()

# Run moc automatically when needed.
set(CMAKE_AUTOMOC ON)

Expand All @@ -54,6 +64,9 @@ endif()

include_directories(${Boost_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/source)
include_directories(${PROJECT_SOURCE_DIR}/external/rapidjson/include)
include_directories(${PROJECT_SOURCE_DIR}/external/pugixml/src)

add_subdirectory(external)
add_subdirectory(source)
add_subdirectory(test)
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
[![Build Status](https://travis-ci.org/powertab/powertabeditor.svg?branch=master)](https://travis-ci.org/powertab/powertabeditor)

### Compiling
####Getting the code:

Use `git clone --recursive` to initialize submodules in the `external` folder:

`git clone --recursive git://github.com/powertab/powertabeditor.git`

####Dependencies:
* [CMake](http://www.cmake.org/) >= 2.8.9
* [Boost 1.55](http://www.boost.org/)
Expand Down Expand Up @@ -68,4 +74,4 @@
* Run:
* `./bin/powertabeditor`
* `./bin/pte_tests` to run the unit tests.


14 changes: 14 additions & 0 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 2.8.9)

add_library(rtmidi
rtmidi/RtMidi.cpp

rtmidi/RtError.h
rtmidi/RtMidi.h
)

add_library(pugixml
pugixml/src/pugixml.cpp

pugixml/src/pugixml.hpp
)
1 change: 1 addition & 0 deletions external/Catch
Submodule Catch added at 6880a0
1 change: 1 addition & 0 deletions external/pugixml
Submodule pugixml added at 9f92ee
1 change: 1 addition & 0 deletions external/rapidjson
Submodule rapidjson added at a7dca0
1 change: 1 addition & 0 deletions external/rtmidi
Submodule rtmidi added at e408de
1 change: 1 addition & 0 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ target_link_libraries(powertabeditor
pteformats
pteactions
ptescore
pugixml
${Boost_LIBRARIES}
${ZLIB_LIBRARIES}
)
Expand Down
2 changes: 0 additions & 2 deletions source/app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 2.8.9)

include_directories(.)

# Get a version number.
include(FindGit)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --long OUTPUT_VARIABLE MY_WC_REVISION)
Expand Down
4 changes: 2 additions & 2 deletions source/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.8.9)

include_directories(${PROJECT_SOURCE_DIR}/external/rtmidi)

add_library(pteaudio
bendevent.cpp
letringevent.cpp
Expand Down Expand Up @@ -30,5 +32,3 @@ add_library(pteaudio

qt5_use_modules(pteaudio Widgets)
cotire(pteaudio)

add_subdirectory(rtmidi)
2 changes: 1 addition & 1 deletion source/audio/midioutputdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "midioutputdevice.h"

#include "rtmidi/RtMidi.h"
#include <RtMidi.h>
#include <score/dynamic.h>
#include <score/generalmidi.h>

Expand Down
17 changes: 0 additions & 17 deletions source/audio/rtmidi/CMakeLists.txt

This file was deleted.

60 changes: 0 additions & 60 deletions source/audio/rtmidi/RtError.h

This file was deleted.

Loading

0 comments on commit 4572ce8

Please sign in to comment.