Revision: 6888
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6888&view=rev
Author:   jeremy_asher
Date:     2008-07-18 18:18:17 +0000 (Fri, 18 Jul 2008)

Log Message:
-----------
stage: applied gbiggs's patch to fix '[ 2021110 ] Stage 3 doesn't use 
fltk-config output', several other build tweaks

Modified Paths:
--------------
    code/stage/trunk/CMakeLists.txt
    code/stage/trunk/examples/ctrl/CMakeLists.txt
    code/stage/trunk/libstage/CMakeLists.txt
    code/stage/trunk/worlds/benchmark/CMakeLists.txt

Modified: code/stage/trunk/CMakeLists.txt
===================================================================
--- code/stage/trunk/CMakeLists.txt     2008-07-18 17:42:14 UTC (rev 6887)
+++ code/stage/trunk/CMakeLists.txt     2008-07-18 18:18:17 UTC (rev 6888)
@@ -68,7 +68,7 @@
         OUTPUT_VARIABLE FLTK_CFLAGS
         OUTPUT_STRIP_TRAILING_WHITESPACE)
     EXECUTE_PROCESS (COMMAND fltk-config --ldflags --use-gl --use-images
-        OUTPUT_VARIABLE FLTK_LIBRARIES
+        OUTPUT_VARIABLE FLTK_LDFLAGS
         OUTPUT_STRIP_TRAILING_WHITESPACE)
     MESSAGE (STATUS "Found FLTK")
     SET (FLTK_FOUND TRUE)
@@ -89,9 +89,9 @@
 include_directories( . 
                     libstage 
                     replace 
-                         /opt/local/include/
-                    ${GLIB_INCLUDE_DIRS} 
-           ${LIBPNG_INCLUDE_DIRS}
+                    /opt/local/include/
+                    ${GLIB_INCLUDE_DIRS}
+                    ${LIBPNG_INCLUDE_DIRS}
                     ${CMAKE_INCLUDE_PATH}
 )
 
@@ -99,7 +99,7 @@
 # all targets need these library directories
 link_directories(${GLIB_LIBRARY_DIRS}
                  ${LIBPNG_LIBRARY_DIRS}
-                          ${OPENGL_LIBRARY_DIRS}
+                 ${OPENGL_LIBRARY_DIRS}
 )
 
 # work through these subdirs

Modified: code/stage/trunk/examples/ctrl/CMakeLists.txt
===================================================================
--- code/stage/trunk/examples/ctrl/CMakeLists.txt       2008-07-18 17:42:14 UTC 
(rev 6887)
+++ code/stage/trunk/examples/ctrl/CMakeLists.txt       2008-07-18 18:18:17 UTC 
(rev 6888)
@@ -1,9 +1,9 @@
 
-SET( PLUGINS 
-     fasr 
-     lasernoise 
-     sink 
-     source 
+SET( PLUGINS
+     fasr
+     lasernoise
+     sink
+     source
      wander
 )
 

Modified: code/stage/trunk/libstage/CMakeLists.txt
===================================================================
--- code/stage/trunk/libstage/CMakeLists.txt    2008-07-18 17:42:14 UTC (rev 
6887)
+++ code/stage/trunk/libstage/CMakeLists.txt    2008-07-18 18:18:17 UTC (rev 
6888)
@@ -1,46 +1,52 @@
-
-add_library(stage SHARED
-       ancestor.cc 
-       block.cc 
+set( stageSrcs ancestor.cc
+       block.cc
        camera.cc
-       canvas.cc 
+       canvas.cc
        file_manager.cc
        file_manager.hh
-       gl.cc 
-       glcolorstack.cc 
-       model.cc 
+       gl.cc
+       glcolorstack.cc
+       model.cc
        model_blinkenlight.cc
-       model_blobfinder.cc 
-       model_callbacks.cc 
-       model_camera.cc 
-       model_fiducial.cc 
-       model_laser.cc 
-       model_load.cc 
-       model_position.cc 
-       model_props.cc 
-       model_ranger.cc 
+       model_blobfinder.cc
+       model_callbacks.cc
+       model_camera.cc
+       model_fiducial.cc
+       model_laser.cc
+       model_load.cc
+       model_position.cc
+       model_props.cc
+       model_ranger.cc
        option.cc
        option.hh
        options_dlg.cc
        options_dlg.hh
        resource.cc
-       stage.cc 
+       stage.cc
        stage.hh
        texture_manager.cc
-       typetable.cc 
-       world.cc 
-       worldfile.cc 
+       typetable.cc
+       world.cc
+       worldfile.cc
        worldgui.cc
 )
 
+add_library(stage SHARED ${stageSrcs})
+
 target_link_libraries( stage
                       ${GLIB_LIBRARIES}
                       ${OPENGL_LIBRARIES}
-                      ${FLTK_LIBRARIES} 
                       ${APPLE_LIBRARIES}
                       ltdl
 )
 
+# When linking stage, pass LDFLAGS from fltk-config
+#   use quotes to prevent spaces being parsed as a list of properties
+set_target_properties( stage PROPERTIES LINK_FLAGS "${FLTK_LDFLAGS}" )
+
+# When compiling stageSrcs, pass CFLAGS from fltk-config
+set_source_files_properties( ${stageSrcs} PROPERTIES COMPILE_FLAGS 
"${FLTK_CFLAGS}" )
+
 # for the config.h
 include_directories(${PROJECT_BINARY_DIR})
 
@@ -49,26 +55,27 @@
                       VERSION ${VERSION}
 )
 
+set( stagebinarySrcs main.cc )
 
-add_executable( stagebinary main.cc )
+add_executable( stagebinary ${stagebinarySrcs} )
 
+# When compiling stagebinarySrcs, pass CFLAGS from fltk-config
+set_source_files_properties( ${stagebinarySrcs} PROPERTIES COMPILE_FLAGS 
"${FLTK_CFLAGS}" )
+
 set_target_properties( stagebinary PROPERTIES
-                      OUTPUT_NAME stage 
+                      OUTPUT_NAME stage
 )
 
+target_link_libraries( stagebinary stage )
 
-set_target_properties( stagebinary PROPERTIES
-                      OUTPUT_NAME stage 
-)
+set( stagetestSrcs test.cc )
 
-target_link_libraries( stagebinary stage ) 
-
-add_executable( stagetest test.cc )
+add_executable( stagetest ${stagetestSrcs} )
 target_link_libraries( stagetest stage )
 
 
 INSTALL(TARGETS stagebinary stage
-       RUNTIME DESTINATION bin 
+       RUNTIME DESTINATION bin
        LIBRARY DESTINATION lib
 )
 

Modified: code/stage/trunk/worlds/benchmark/CMakeLists.txt
===================================================================
--- code/stage/trunk/worlds/benchmark/CMakeLists.txt    2008-07-18 17:42:14 UTC 
(rev 6887)
+++ code/stage/trunk/worlds/benchmark/CMakeLists.txt    2008-07-18 18:18:17 UTC 
(rev 6888)
@@ -1,4 +1,5 @@
-ADD_LIBRARY( expand MODULE expand.cc )
+SET( expandSrcs expand.cc )
+ADD_LIBRARY( expand MODULE ${expandSrcs} )
 TARGET_LINK_LIBRARIES( expand stage )
 SET_TARGET_PROPERTIES( expand PROPERTIES PREFIX "" )
 INSTALL( TARGETS expand DESTINATION lib)


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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to