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
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -93,9 +93,18 @@ void ANativeActivity_onCreate(ANativeActivity * app, void * ud, size_t udsize) {
endmacro() endmacro()


macro( android_update android_project_name) 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 # Generate ant build scripts for making APK
execute_process( 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} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
) )
endmacro() endmacro()
Expand Down
2 changes: 2 additions & 0 deletions include/pangolin/compat/boostd.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#ifndef PANGOLIN_COMPAT_BOOSTD_H #ifndef PANGOLIN_COMPAT_BOOSTD_H
#define PANGOLIN_COMPAT_BOOSTD_H #define PANGOLIN_COMPAT_BOOSTD_H


#include <pangolin/platform.h>

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


#include <pangolin/platform.h>

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


#include <pangolin/platform.h>

#include <typeinfo> #include <typeinfo>


#ifdef CPP11_NO_BOOST #ifdef CPP11_NO_BOOST
Expand Down
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ if(BUILD_PANGOLIN_GUI)
list(APPEND LINK_LIBS "${OPENGL_LIBRARIES};${GLEW_LIBRARY}" ) list(APPEND LINK_LIBS "${OPENGL_LIBRARIES};${GLEW_LIBRARY}" )
else() else()
find_package(GLUES REQUIRED) find_package(GLUES REQUIRED)
list(APPEND USER_INC "${GLUES_INCLUDE_DIR};" )
list(APPEND LINK_LIBS "${GLUES_LIBRARY}" ) list(APPEND LINK_LIBS "${GLUES_LIBRARY}" )
list(APPEND LINK_LIBS "-lEGL;-lGLESv2;-lGLESv1_CM" ) list(APPEND LINK_LIBS "-lEGL;-lGLESv2;-lGLESv1_CM" )
endif() endif()
Expand Down Expand Up @@ -152,6 +153,10 @@ if(NOT ANDROID)
message(STATUS "Glut Found and Enabled") message(STATUS "Glut Found and Enabled")
endif() endif()
else() # NOT ANDROID 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 HEADERS ${INCDIR}/display_android.h )
list(APPEND SOURCES display_android.cpp ) list(APPEND SOURCES display_android.cpp )
set(HAVE_GLES 1) set(HAVE_GLES 1)
Expand Down
1 change: 1 addition & 0 deletions src/display_android.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include <sstream> #include <sstream>
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
#include <stdexcept>


#include <jni.h> #include <jni.h>


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


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


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


#include <stdexcept>

namespace pangolin namespace pangolin
{ {


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


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

0 comments on commit b6b4660

Please sign in to comment.