Permalink
Browse files

Merge

  • Loading branch information...
2 parents 2e97460 + 814506b commit b6b46605bd409ce0fcce10b4448d2baf963e0906 @stevenlovegrove committed Dec 12, 2013
@@ -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()
@@ -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
@@ -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
@@ -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
View
@@ -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()
@@ -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)
View
@@ -50,6 +50,7 @@
#include <sstream>
#include <algorithm>
#include <iterator>
+#include <stdexcept>
#include <jni.h>
View
@@ -35,6 +35,7 @@
#include <fstream>
#include <sstream>
#include <iomanip>
+#include <stdexcept>
#include <map>
using namespace std;
@@ -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.");
}
}
View
@@ -24,6 +24,8 @@
#endif // HAVE_TIFF
#endif // HAVE_BOOST_GIL
+#include <stdexcept>
+
namespace pangolin
{
@@ -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)

0 comments on commit b6b4660

Please sign in to comment.