Revision: 6786
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6786&view=rev
Author:   gerkey
Date:     2008-07-07 13:36:07 -0700 (Mon, 07 Jul 2008)

Log Message:
-----------
added hooks to build config.h and find rgb.txt

Modified Paths:
--------------
    code/stage/trunk/CMakeLists.txt
    code/stage/trunk/libstage/CMakeLists.txt
    code/stage/trunk/libstage/stage.cc

Added Paths:
-----------
    code/stage/trunk/config.h.in

Modified: code/stage/trunk/CMakeLists.txt
===================================================================
--- code/stage/trunk/CMakeLists.txt     2008-07-07 20:15:00 UTC (rev 6785)
+++ code/stage/trunk/CMakeLists.txt     2008-07-07 20:36:07 UTC (rev 6786)
@@ -28,6 +28,10 @@
 CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/stage.pc.in 
${CMAKE_CURRENT_BINARY_DIR}/stage.pc @ONLY)
 INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/stage.pc DESTINATION lib/pkgconfig/)
 
+# Create the config.h file
+SET(RGBFILE \"${CMAKE_INSTALL_PREFIX}/share/stage/rgb.txt\")
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in 
${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)
+
 # find the easy modules
 include(FindPkgConfig)
 pkg_search_module( GLIB REQUIRED glib-2.0 )

Added: code/stage/trunk/config.h.in
===================================================================
--- code/stage/trunk/config.h.in                                (rev 0)
+++ code/stage/trunk/config.h.in        2008-07-07 20:36:07 UTC (rev 6786)
@@ -0,0 +1,6 @@
+#ifndef _CONFIG_H
+#define _CONFIG_H
+
+#define RGBFILE @RGBFILE@
+
+#endif

Modified: code/stage/trunk/libstage/CMakeLists.txt
===================================================================
--- code/stage/trunk/libstage/CMakeLists.txt    2008-07-07 20:15:00 UTC (rev 
6785)
+++ code/stage/trunk/libstage/CMakeLists.txt    2008-07-07 20:36:07 UTC (rev 
6786)
@@ -41,6 +41,9 @@
                       ltdl
 )
 
+# for the config.h
+include_directories(${PROJECT_BINARY_DIR})
+
 # causes the shared library to have a version number
 set_target_properties( stage PROPERTIES
                       VERSION ${VERSION}

Modified: code/stage/trunk/libstage/stage.cc
===================================================================
--- code/stage/trunk/libstage/stage.cc  2008-07-07 20:15:00 UTC (rev 6785)
+++ code/stage/trunk/libstage/stage.cc  2008-07-07 20:36:07 UTC (rev 6786)
@@ -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 cmake's system configuration tests
 
 static bool init_called = false;
 
@@ -216,7 +216,8 @@
 
                        PRINT_ERR1("unable to open color database: %s",
                                        strerror(errno));
-                       fclose(file);
+                        // Can't fclose(NULL)
+                       //fclose(file);
                        exit(0);
                }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to