Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenlovegrove committed Dec 12, 2013
2 parents 2e97460 + 814506b commit b6b4660
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 4 deletions.
11 changes: 10 additions & 1 deletion CMakeModules/AndroidUtils.cmake
Expand Up @@ -93,9 +93,18 @@ void ANativeActivity_onCreate(ANativeActivity * app, void * ud, size_t udsize) {
endmacro()

macro( android_update android_project_name)
# Find which android platforms are available.
execute_process(
COMMAND android list targets -c
OUTPUT_VARIABLE android_target_list
)

# Pick first platform from this list.
string(REGEX MATCH "^.*[^\n]" android_target ${android_target_list} )

# Generate ant build scripts for making APK
execute_process(
COMMAND android update project --name ${android_project_name} --path . --target android-17 --subprojects
COMMAND android update project --name ${android_project_name} --path . --target ${android_target} --subprojects
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endmacro()
Expand Down
2 changes: 2 additions & 0 deletions include/pangolin/compat/boostd.h
Expand Up @@ -28,6 +28,8 @@
#ifndef PANGOLIN_COMPAT_BOOSTD_H
#define PANGOLIN_COMPAT_BOOSTD_H

#include <pangolin/platform.h>

#ifdef CPP11_NO_BOOST
namespace boostd = std;
#else
Expand Down
2 changes: 2 additions & 0 deletions include/pangolin/compat/function.h
Expand Up @@ -28,6 +28,8 @@
#ifndef PANGOLIN_COMPAT_FUNCTION_H
#define PANGOLIN_COMPAT_FUNCTION_H

#include <pangolin/platform.h>

#ifdef CPP11_NO_BOOST
#include <functional>
#else
Expand Down
2 changes: 2 additions & 0 deletions include/pangolin/compat/type_traits.h
Expand Up @@ -28,6 +28,8 @@
#ifndef PANGOLIN_COMPAT_TYPE_TRAITS_H
#define PANGOLIN_COMPAT_TYPE_TRAITS_H

#include <pangolin/platform.h>

#include <typeinfo>

#ifdef CPP11_NO_BOOST
Expand Down
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -88,6 +88,7 @@ if(BUILD_PANGOLIN_GUI)
list(APPEND LINK_LIBS "${OPENGL_LIBRARIES};${GLEW_LIBRARY}" )
else()
find_package(GLUES REQUIRED)
list(APPEND USER_INC "${GLUES_INCLUDE_DIR};" )
list(APPEND LINK_LIBS "${GLUES_LIBRARY}" )
list(APPEND LINK_LIBS "-lEGL;-lGLESv2;-lGLESv1_CM" )
endif()
Expand Down Expand Up @@ -152,6 +153,10 @@ if(NOT ANDROID)
message(STATUS "Glut Found and Enabled")
endif()
else() # NOT ANDROID
# Fix issue with thread local storage on android.
add_definitions(-fno-data-sections)

# Android specific display code
list(APPEND HEADERS ${INCDIR}/display_android.h )
list(APPEND SOURCES display_android.cpp )
set(HAVE_GLES 1)
Expand Down
1 change: 1 addition & 0 deletions src/display_android.cpp
Expand Up @@ -50,6 +50,7 @@
#include <sstream>
#include <algorithm>
#include <iterator>
#include <stdexcept>

#include <jni.h>

Expand Down
3 changes: 2 additions & 1 deletion src/plotter.cpp
Expand Up @@ -35,6 +35,7 @@
#include <fstream>
#include <sstream>
#include <iomanip>
#include <stdexcept>
#include <map>

using namespace std;
Expand Down Expand Up @@ -408,7 +409,7 @@ void Plotter::Render()
}else if( plot_mode==STACKED_HISTOGRAM ) {
DrawSequenceHistogram(*log);
}else {
assert(false);
throw std::logic_error("Unknown plot mode.");
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/view.cpp
Expand Up @@ -24,6 +24,8 @@
#endif // HAVE_TIFF
#endif // HAVE_BOOST_GIL

#include <stdexcept>

namespace pangolin
{

Expand Down Expand Up @@ -513,8 +515,7 @@ View& View::VisibleChild(size_t i)
}
}
// Shouldn't get here
assert(0);
return *this;
throw std::out_of_range("No such child.");
}

View* View::FindChild(int x, int y)
Expand Down

0 comments on commit b6b4660

Please sign in to comment.