Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cmake build works with modules & partially installs

  • Loading branch information...
commit 4f9d098902bbed23c8f0b6ae68c84e1b7054a243 1 parent 32950d4
rtv authored
View
4 CMakeLists.txt
@@ -1,5 +1,9 @@
PROJECT(Stage)
+SET (STAGE_VERSION 3.0.0 CACHE STRING "Stage distribution version")
+SET (STAGE_API_VERSION 3.0.0 CACHE STRING "Stage API version")
+MESSAGE (STATUS "${PROJECT_NAME} version ${STAGE_VERSION}")
+
include(FindPkgConfig)
pkg_check_modules( GLIB gdk-pixbuf-2.0 )
View
1  examples/ctrl/fasr.cc
@@ -82,7 +82,6 @@ int LaserUpdate( StgModel* mod, robot_t* robot )
stg_laser_sample_t* scan = robot->laser->GetSamples( &sample_count );
assert(scan);
- double newturnrate=0.0, newspeed=0.0;
bool obstruction = false;
bool stop = false;
View
2  examples/ctrl/lasernoise.cc
@@ -28,7 +28,7 @@ int LaserUpdate( StgModelLaser* mod, void* dummy )
stg_laser_sample_t* scan = mod->GetSamples( &sample_count );
if( scan )
- for( int i=0; i<sample_count; i++ )
+ for( unsigned int i=0; i<sample_count; i++ )
scan[i].range *= SimpleNormalDeviate( 1.0, DEVIATION );
return 0; // run again
View
19 libstage/CMakeLists.txt
@@ -12,6 +12,7 @@ add_library( stage SHARED
gl.cc
glcolorstack.cc
model.cc
+ model_blinkenlight.cc
model_callbacks.cc
model_fiducial.cc
model_laser.cc
@@ -20,6 +21,7 @@ add_library( stage SHARED
model_ranger.cc
model_blobfinder.cc
model_props.cc
+ resource.cc
stage.cc
typetable.cc
world.cc
@@ -27,9 +29,6 @@ add_library( stage SHARED
worldgui.cc
)
-add_executable( stage main.cc )
-
-
target_link_libraries( stage
${GLIB_LIBRARIES}
@@ -38,3 +37,17 @@ target_link_libraries( stage
ltdl
)
+add_executable( stagebinary main.cc
+)
+
+set_target_properties( stagebinary PROPERTIES
+ OUTPUT_NAME stage )
+
+target_link_libraries( stagebinary
+ stage
+)
+
+INSTALL(TARGETS stagebinary stage
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+)
View
2  libstage/canvas.cc
@@ -533,7 +533,7 @@ void StgCanvas::draw()
// find all the flags
- GList* flags = NULL;
+ //GList* flags = NULL;
}
void StgCanvas::resize(int X,int Y,int W,int H)
View
5 libstage/main.cc
@@ -5,9 +5,12 @@
*/
-#include "config.h"
+//#include "config.h"
#include "stage_internal.hh"
+const char* PACKAGE = "Stage";
+const char* VERSION = "3.dev";
+
int main( int argc, char* argv[] )
{
printf( "%s %s\n", PACKAGE, VERSION );
View
2  libstage/model.cc
@@ -985,7 +985,7 @@ void StgModel::DrawBlinkenlights()
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
- for( int i=0; i<blinkenlights->len; i++ )
+ for( unsigned int i=0; i<blinkenlights->len; i++ )
{
stg_blinkenlight_t* b =
(stg_blinkenlight_t*)g_ptr_array_index( blinkenlights, i );
View
12 libstage/model_blinkenlight.cc
@@ -49,12 +49,12 @@
//#define DEBUG 1
#include "stage_internal.hh"
-static gboolean blink( bool* enabled )
-{
- *enabled = ! *enabled;
- puts( "blink" );
- return true;
-}
+//static gboolean blink( bool* enabled )
+//{
+// *enabled = ! *enabled;
+// puts( "blink" );
+// return true;
+//}
StgModelBlinkenlight::StgModelBlinkenlight( StgWorld* world,
StgModel* parent,
View
5 libstage/model_load.cc
@@ -415,10 +415,13 @@ void StgModel::LoadControllerModule( char* lib )
}
else
{
+ printf( "Libtool error: %s. Can't open your plugin controller. Quitting\n",
+ lt_dlerror() ); // report the error from libtool
+
PRINT_ERR1( "Failed to open \"%s\". Check that it can be found by searching the directories in your STAGEPATH environment variable, or the current directory if STAGEPATH is not set.]\n", lib );
exit(-1);
}
-
+
fflush(stdout);
}
View
2  libstage/stage.cc
@@ -17,7 +17,7 @@
//#define DEBUG
#include "stage_internal.hh"
-#include "config.h" // results of autoconf's system configuration tests
+//#include "config.h" // results of autoconf's system configuration tests
static bool init_called = false;
static GHashTable* typetable = NULL;
View
4 libstage/worldgui.cc
@@ -95,7 +95,7 @@ debug menu that enables visualization of some of the innards of Stage.
*/
-#include "config.h" // for PACKAGE strings etc
+//#include "config.h" // for PACKAGE strings etc
#include "stage_internal.hh"
#include "region.hh"
@@ -116,6 +116,8 @@ static const char* MITEM_VIEW_FOOTPRINTS = "View/Trails/Footprints";
static const char* MITEM_VIEW_TRAILS = "View/Trails/Blocks";
static const char* MITEM_VIEW_ARROWS = "View/Trails/Arrows";
+// hack - get this from somewhere sensible
+const char* PACKAGE_STRING = "Stage-3.dev";
void dummy_cb(Fl_Widget*, void* v)
{
Please sign in to comment.
Something went wrong with that request. Please try again.