Revision: 6406
http://playerstage.svn.sourceforge.net/playerstage/?rev=6406&view=rev
Author: gbiggs
Date: 2008-05-09 01:43:45 -0700 (Fri, 09 May 2008)
Log Message:
-----------
Added installed CMake modules for compiling playerc clients, playerc++ clients,
plugin drivers and plugin interfaces. The interfaces don't compile yet.
Modified Paths:
--------------
code/player/trunk/CMakeLists.txt
code/player/trunk/config/CMakeLists.txt
code/player/trunk/examples/CMakeLists.txt
code/player/trunk/examples/libplayerc/CMakeLists.txt
code/player/trunk/examples/libplayerc++/CMakeLists.txt
code/player/trunk/examples/libplayerc++/goto.cc
code/player/trunk/examples/libplayerc++/speech_cpp_client.cc
code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt
code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt
code/player/trunk/examples/plugins/multidriver/CMakeLists.txt
code/player/trunk/examples/plugins/multidriver/multi.cfg
code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt
Added Paths:
-----------
code/player/trunk/cmake/CMakeLists.txt
code/player/trunk/cmake/UsePlayerC++.cmake
code/player/trunk/cmake/UsePlayerC.cmake
code/player/trunk/cmake/UsePlayerPlugin.cmake
code/player/trunk/examples/libplayerc/CMakeLists.txt.example.in
code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in
code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt.example.in
code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt.example.in
code/player/trunk/examples/plugins/multidriver/CMakeLists.txt.example.in
code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt.example.in
Modified: code/player/trunk/CMakeLists.txt
===================================================================
--- code/player/trunk/CMakeLists.txt 2008-05-09 00:28:33 UTC (rev 6405)
+++ code/player/trunk/CMakeLists.txt 2008-05-09 08:43:45 UTC (rev 6406)
@@ -2,6 +2,7 @@
# Set the project name (helps Visual Studio, mainly)
PROJECT (Player)
+STRING (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
# Set the package version
SET (PLAYER_VERSION 2.2.0 CACHE STRING "Player distribution version")
SET (PLAYER_API_VERSION 2.2 CACHE STRING "Player API version")
@@ -21,7 +22,7 @@
INCLUDE (${PLAYER_CMAKE_DIR}/internal/UninstallTarget.cmake)
# Some options to control the build
-OPTION (PLAYER_BUILT_TESTS "Enables compilation of the test suites" ON)
+OPTION (PLAYER_BUILD_TESTS "Enables compilation of the test suites" ON)
# Look for various needed things
INCLUDE (${PLAYER_CMAKE_DIR}/internal/SearchForStuff.cmake)
@@ -52,6 +53,7 @@
ADD_SUBDIRECTORY (utils)
ADD_SUBDIRECTORY (doc)
ENDIF (NOT PLAYER_OS_WIN)
+ADD_SUBDIRECTORY (cmake)
MESSAGE (STATUS "")
SET (PLAYER_EXTRA_LINK_LIBRARIES "" CACHE INTERNAL "Libs to link to" FORCE)
Added: code/player/trunk/cmake/CMakeLists.txt
===================================================================
--- code/player/trunk/cmake/CMakeLists.txt (rev 0)
+++ code/player/trunk/cmake/CMakeLists.txt 2008-05-09 08:43:45 UTC (rev
6406)
@@ -0,0 +1,7 @@
+SET (playerModules UsePlayerC.cmake
+ UsePlayerPlugin.cmake)
+INSTALL (FILES ${playerModules} DESTINATION share/cmake/Modules/)
+
+IF (BUILD_PLAYERCC)
+ INSTALL (FILES UsePlayerC++.cmake DESTINATION share/cmake/Modules/)
+ENDIF (BUILD_PLAYERCC)
Added: code/player/trunk/cmake/UsePlayerC++.cmake
===================================================================
--- code/player/trunk/cmake/UsePlayerC++.cmake (rev 0)
+++ code/player/trunk/cmake/UsePlayerC++.cmake 2008-05-09 08:43:45 UTC (rev
6406)
@@ -0,0 +1,55 @@
+CMAKE_MINIMUM_REQUIRED (VERSION 2.4 FATAL_ERROR)
+
+INCLUDE (UsePkgConfig)
+PKGCONFIG (playerc++ PLAYERCPP_INC_DIR PLAYERCPP_LINK_DIR PLAYERCPP_LINK_FLAGS
PLAYERCPP_CFLAGS)
+IF (NOT PLAYERCPP_CFLAGS)
+ MESSAGE (FATAL_ERROR "playerc++ pkg-config not found")
+ENDIF (NOT PLAYERCPP_CFLAGS)
+
+# Get the lib dir from pkg-config to use as the rpath
+FIND_PROGRAM (PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/local/bin)
+EXECUTE_PROCESS (COMMAND ${PKGCONFIG_EXECUTABLE} --variable=libdir playerc++
+ OUTPUT_VARIABLE PLAYERCPP_LIBDIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+
+###############################################################################
+# Macro to build a simple client. Pass all source files as extra arguments.
+# _clientName: The name of the executable to create
+# _includeDirs, _libDirs, _linkFlags, _cFlags: extra include directories, lib
+# directories, global link flags and global compile flags necessary to compile
+# the client.
+MACRO (PLAYER_ADD_PLAYERCPP_CLIENT _clientName _includeDirs _libDirs
_linkFlags _cFLags)
+ IF (NOT ${ARGC} GREATER 5)
+ MESSAGE (FATAL_ERROR "No sources specified to
PLAYER_ADD_PLAYERCPP_CLIENT. Did you remember to include blank strings for
unused arguments?")
+ ENDIF (NOT ${ARGC} GREATER 5)
+
+ IF (_includeDirs OR PLAYERCPP_INC_DIR)
+ INCLUDE_DIRECTORIES (${_includeDirs} ${PLAYERC_INC_DIR})
+ ENDIF (_includeDirs OR PLAYERCPP_INC_DIR)
+ IF (_libDirs OR PLAYERCPP_LINK_DIR)
+ LINK_DIRECTORIES (${_libDirs} ${PLAYERC_LINK_DIR})
+ ENDIF (_libDirs OR PLAYERCPP_LINK_DIR)
+
+ ADD_EXECUTABLE (${_clientName} ${ARGN})
+ SET_TARGET_PROPERTIES (${_clientName} PROPERTIES
+ LINK_FLAGS ${PLAYERCPP_LINK_FLAGS} ${_linkFlags}
+ INSTALL_RPATH ${PLAYERCPP_LIBDIR}
+ BUILD_WITH_INSTALL_RPATH TRUE)
+
+ # Get the current cflags for each source file, and add the global ones
+ # (this allows the user to specify individual cflags for each source file
+ # without the global ones overriding them).
+ IF (PLAYERCPP_CFLAGS OR _cFLags)
+ FOREACH (_file ${ARGN})
+ GET_SOURCE_FILE_PROPERTY (_fileCFlags ${_file} COMPILE_FLAGS)
+ IF (_fileCFlags STREQUAL NOTFOUND)
+ SET (_newCFlags "${PLAYERCPP_CFLAGS} ${_cFlags}")
+ ELSE (_fileCFlags STREQUAL NOTFOUND)
+ SET (_newCFlags "${_fileCFlags} ${PLAYERCPP_CFLAGS}
${_cFlags}")
+ ENDIF (_fileCFlags STREQUAL NOTFOUND)
+ SET_SOURCE_FILES_PROPERTIES (${_file} PROPERTIES
+ COMPILE_FLAGS ${_newCFlags})
+ ENDFOREACH (_file)
+ ENDIF (PLAYERCPP_CFLAGS OR _cFLags)
+ENDMACRO (PLAYER_ADD_PLAYERCPP_CLIENT)
Added: code/player/trunk/cmake/UsePlayerC.cmake
===================================================================
--- code/player/trunk/cmake/UsePlayerC.cmake (rev 0)
+++ code/player/trunk/cmake/UsePlayerC.cmake 2008-05-09 08:43:45 UTC (rev
6406)
@@ -0,0 +1,55 @@
+CMAKE_MINIMUM_REQUIRED (VERSION 2.4 FATAL_ERROR)
+
+INCLUDE (UsePkgConfig)
+PKGCONFIG (playerc PLAYERC_INC_DIR PLAYERC_LINK_DIR PLAYERC_LINK_FLAGS
PLAYERC_CFLAGS)
+IF (NOT PLAYERC_CFLAGS)
+ MESSAGE (FATAL_ERROR "playerc pkg-config not found")
+ENDIF (NOT PLAYERC_CFLAGS)
+
+# Get the lib dir from pkg-config to use as the rpath
+FIND_PROGRAM (PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/local/bin)
+EXECUTE_PROCESS (COMMAND ${PKGCONFIG_EXECUTABLE} --variable=libdir playerc
+ OUTPUT_VARIABLE PLAYERC_LIBDIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+
+###############################################################################
+# Macro to build a simple client. Pass all source files as extra arguments.
+# _clientName: The name of the executable to create
+# _includeDirs, _libDirs, _linkFlags, _cFlags: extra include directories, lib
+# directories, global link flags and global compile flags necessary to compile
+# the client.
+MACRO (PLAYER_ADD_PLAYERC_CLIENT _clientName _includeDirs _libDirs _linkFlags
_cFLags)
+ IF (NOT ${ARGC} GREATER 5)
+ MESSAGE (FATAL_ERROR "No sources specified to
PLAYER_ADD_PLAYERC_CLIENT. Did you remember to include blank strings for unused
arguments?")
+ ENDIF (NOT ${ARGC} GREATER 5)
+
+ IF (_includeDirs OR PLAYERC_INC_DIR)
+ INCLUDE_DIRECTORIES (${_includeDirs} ${PLAYERC_INC_DIR})
+ ENDIF (_includeDirs OR PLAYERC_INC_DIR)
+ IF (_libDirs OR PLAYERC_LINK_DIR)
+ LINK_DIRECTORIES (${_libDirs} ${PLAYERC_LINK_DIR})
+ ENDIF (_libDirs OR PLAYERC_LINK_DIR)
+
+ ADD_EXECUTABLE (${_clientName} ${ARGN})
+ SET_TARGET_PROPERTIES (${_clientName} PROPERTIES
+ LINK_FLAGS ${PLAYERC_LINK_FLAGS} ${_linkFlags}
+ INSTALL_RPATH ${PLAYERC_LIBDIR}
+ BUILD_WITH_INSTALL_RPATH TRUE)
+
+ # Get the current cflags for each source file, and add the global ones
+ # (this allows the user to specify individual cflags for each source file
+ # without the global ones overriding them).
+ IF (PLAYERC_CFLAGS OR _cFLags)
+ FOREACH (_file ${ARGN})
+ GET_SOURCE_FILE_PROPERTY (_fileCFlags ${_file} COMPILE_FLAGS)
+ IF (_fileCFlags STREQUAL NOTFOUND)
+ SET (_newCFlags "${PLAYERC_CFLAGS} ${_cFlags}")
+ ELSE (_fileCFlags STREQUAL NOTFOUND)
+ SET (_newCFlags "${_fileCFlags} ${PLAYERC_CFLAGS} ${_cFlags}")
+ ENDIF (_fileCFlags STREQUAL NOTFOUND)
+ SET_SOURCE_FILES_PROPERTIES (${_file} PROPERTIES
+ COMPILE_FLAGS ${_newCFlags})
+ ENDFOREACH (_file)
+ ENDIF (PLAYERC_CFLAGS OR _cFLags)
+ENDMACRO (PLAYER_ADD_PLAYERC_CLIENT)
Added: code/player/trunk/cmake/UsePlayerPlugin.cmake
===================================================================
--- code/player/trunk/cmake/UsePlayerPlugin.cmake
(rev 0)
+++ code/player/trunk/cmake/UsePlayerPlugin.cmake 2008-05-09 08:43:45 UTC
(rev 6406)
@@ -0,0 +1,138 @@
+CMAKE_MINIMUM_REQUIRED (VERSION 2.4 FATAL_ERROR)
+
+INCLUDE (UsePkgConfig)
+PKGCONFIG (playerc PLUGIN_PLAYERC_INC_DIR PLUGIN_PLAYERC_LINK_DIR
PLUGIN_PLAYERC_LINK_FLAGS PLUGIN_PLAYERC_CFLAGS)
+IF (NOT PLUGIN_PLAYERC_CFLAGS)
+ MESSAGE (FATAL_ERROR "playerc pkg-config not found")
+ENDIF (NOT PLUGIN_PLAYERC_CFLAGS)
+
+INCLUDE (UsePkgConfig)
+PKGCONFIG (playercore PLAYERCORE_INC_DIR PLAYERCORE_LINK_DIR
PLAYERCORE_LINK_FLAGS PLAYERCORE_CFLAGS)
+IF (NOT PLAYERCORE_CFLAGS)
+ MESSAGE (FATAL_ERROR "playercore pkg-config not found")
+ENDIF (NOT PLAYERCORE_CFLAGS)
+
+# Get the lib dir from pkg-config to use as the rpath
+FIND_PROGRAM (PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/local/bin)
+EXECUTE_PROCESS (COMMAND ${PKGCONFIG_EXECUTABLE} --variable=libdir playerc++
+ OUTPUT_VARIABLE PLAYERCORE_LIBDIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+# This is slightly different from the one used by the Player build system
itself.
+# It takes a single file instead of a directory. It also expects
playerinterfacegen.py
+# to have been installed in the system path (as it should have been with
Player).
+MACRO (PROCESS_INTERFACES _options _file _outputFile)
+ ADD_CUSTOM_COMMAND (OUTPUT ${_outputFile}
+ COMMAND playerinterfacegen.py ${_options} ${_file} > ${_outputFile}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ DEPENDS ${_file} ${ARGN}
+ )
+ENDMACRO (PROCESS_INTERFACES)
+
+MACRO (PROCESS_XDR _interfaceH _xdrH _xdrC)
+ ADD_CUSTOM_COMMAND (OUTPUT ${_xdrH} ${_xdrC}
+ COMMAND playerxdrgen.py ${_interfaceH} ${_xdrH} ${_xdrC}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS ${_interfaceH})
+ENDMACRO (PROCESS_XDR)
+
+
+###############################################################################
+# Macro to build a plugin driver. Pass all source files as extra arguments.
+# _driverName: The name of the driver library to create
+# _includeDirs, _libDirs, _linkFlags, _cFlags: extra include directories, lib
+# directories, global link flags and global compile flags necessary to compile
+# the driver.
+MACRO (PLAYER_ADD_PLUGIN_DRIVER _driverName _includeDirs _libDirs _linkFlags
_cFLags)
+ IF (NOT ${ARGC} GREATER 5)
+ MESSAGE (FATAL_ERROR "No sources specified to
PLAYER_ADD_PLUGIN_DRIVER. Did you remember to include blank strings for unused
arguments?")
+ ENDIF (NOT ${ARGC} GREATER 5)
+
+ IF (_includeDirs OR PLAYERCORE_INC_DIR)
+ INCLUDE_DIRECTORIES (${_includeDirs} ${PLAYERC_INC_DIR})
+ ENDIF (_includeDirs OR PLAYERCORE_INC_DIR)
+ IF (_libDirs OR PLAYERCORE_LINK_DIR)
+ LINK_DIRECTORIES (${_libDirs} ${PLAYERC_LINK_DIR})
+ ENDIF (_libDirs OR PLAYERCORE_LINK_DIR)
+
+ ADD_LIBRARY (${_driverName} SHARED ${ARGN})
+ SET_TARGET_PROPERTIES (${_driverName} PROPERTIES
+ LINK_FLAGS ${PLAYERCORE_LINK_FLAGS} ${_linkFlags}
+ INSTALL_RPATH ${PLAYERCORE_LIBDIR}
+ BUILD_WITH_INSTALL_RPATH TRUE)
+
+ # Get the current cflags for each source file, and add the global ones
+ # (this allows the user to specify individual cflags for each source file
+ # without the global ones overriding them).
+ IF (PLAYERCORE_CFLAGS OR _cFLags)
+ FOREACH (_file ${ARGN})
+ GET_SOURCE_FILE_PROPERTY (_fileCFlags ${_file} COMPILE_FLAGS)
+ IF (_fileCFlags STREQUAL NOTFOUND)
+ SET (_newCFlags "${PLAYERCORE_CFLAGS} ${_cFlags}")
+ ELSE (_fileCFlags STREQUAL NOTFOUND)
+ SET (_newCFlags "${_fileCFlags} ${PLAYERCORE_CFLAGS}
${_cFlags}")
+ ENDIF (_fileCFlags STREQUAL NOTFOUND)
+ SET_SOURCE_FILES_PROPERTIES (${_file} PROPERTIES
+ COMPILE_FLAGS ${_newCFlags})
+ ENDFOREACH (_file)
+ ENDIF (PLAYERCORE_CFLAGS OR _cFLags)
+ENDMACRO (PLAYER_ADD_PLUGIN_DRIVER)
+
+
+###############################################################################
+# Macro to build a plugin interface. Pass all source files as extra arguments.
+# This macro will create generated sources prefixed with the
+# _interfName: The name of the interface library (not the interface itself!)
+# to create
+# _interfDef: The interface definition file
+# _includeDirs, _libDirs, _linkFlags, _cFlags: extra include directories, lib
+# directories, global link flags and global compile flags necessary to compile
+# the driver.
+INCLUDE (FindPythonInterp)
+MACRO (PLAYER_ADD_PLUGIN_INTERFACE _interfName _interfDef _includeDirs
_libDirs _linkFlags _cFLags)
+ IF (NOT PYTHONINTERP_FOUND)
+ MESSAGE (FATAL_ERROR "No Python interpreter found. Cannot continue.")
+ ENDIF (NOT PYTHONINTERP_FOUND)
+
+ IF (NOT ${ARGC} GREATER 6)
+ MESSAGE (FATAL_ERROR "No sources specified to
PLAYER_ADD_PLUGIN_INTERFACE. Did you remember to include blank strings for
unused arguments?")
+ ENDIF (NOT ${ARGC} GREATER 6)
+
+ IF (_includeDirs OR PLAYERC_INC_DIR)
+ INCLUDE_DIRECTORIES (${_includeDirs} ${PLAYERC_INC_DIR}
${CMAKE_CURRENT_BINARY_DIR})
+ ENDIF (_includeDirs OR PLAYERC_INC_DIR)
+ IF (_libDirs OR PLAYERC_LINK_DIR)
+ LINK_DIRECTORIES (${_libDirs} ${PLAYERC_LINK_DIR})
+ ENDIF (_libDirs OR PLAYERC_LINK_DIR)
+
+ # Have to generate some source files
+ SET (interface_h ${CMAKE_CURRENT_BINARY_DIR}/${_interfName}_interface.h)
+ PROCESS_INTERFACES ("--plugin" ${_interfDef} ${interface_h})
+ SET (functiontable_c
${CMAKE_CURRENT_BINARY_DIR}/${_interfName}_functiontable.c)
+ PROCESS_INTERFACES ("--plugin --functiontable" ${_interfDef}
${functiontable_c})
+ SET (xdr_h ${CMAKE_CURRENT_BINARY_DIR}/${_interfName}_xdr.h)
+ SET (xdr_c ${CMAKE_CURRENT_BINARY_DIR}/${_interfName}_xdr.c)
+ PROCESS_XDR (${interface_h} ${xdr_h} ${xdr_c})
+
+ ADD_LIBRARY (${_interfName} SHARED ${interface_h} ${functiontable_c}
${xdr_h} ${xdr_c} ${ARGN})
+ SET_TARGET_PROPERTIES (${_interfName} PROPERTIES
+ LINK_FLAGS ${PLAYERC_LINK_FLAGS} ${_linkFlags}
+ INSTALL_RPATH ${PLAYERC_LIBDIR}
+ BUILD_WITH_INSTALL_RPATH TRUE)
+
+ # Get the current cflags for each source file, and add the global ones
+ # (this allows the user to specify individual cflags for each source file
+ # without the global ones overriding them).
+ IF (PLAYERCORE_CFLAGS OR _cFLags)
+ FOREACH (_file ${ARGN})
+ GET_SOURCE_FILE_PROPERTY (_fileCFlags ${_file} COMPILE_FLAGS)
+ IF (_fileCFlags STREQUAL NOTFOUND)
+ SET (_newCFlags "${PLUGIN_PLAYERC_CFLAGS} ${_cFlags}")
+ ELSE (_fileCFlags STREQUAL NOTFOUND)
+ SET (_newCFlags "${_fileCFlags} ${PLUGIN_PLAYERC_CFLAGS}
${_cFlags}")
+ ENDIF (_fileCFlags STREQUAL NOTFOUND)
+ SET_SOURCE_FILES_PROPERTIES (${_file} PROPERTIES
+ COMPILE_FLAGS ${_newCFlags})
+ ENDFOREACH (_file)
+ ENDIF (PLAYERCORE_CFLAGS OR _cFLags)
+ENDMACRO (PLAYER_ADD_PLUGIN_INTERFACE)
Modified: code/player/trunk/config/CMakeLists.txt
===================================================================
--- code/player/trunk/config/CMakeLists.txt 2008-05-09 00:28:33 UTC (rev
6405)
+++ code/player/trunk/config/CMakeLists.txt 2008-05-09 08:43:45 UTC (rev
6406)
@@ -36,4 +36,4 @@
writelog.cfg
wsn.cfg)
-INSTALL (FILES ${sampleConfigFiles} DESTINATION "share/player/config")
\ No newline at end of file
+INSTALL (FILES ${sampleConfigFiles} DESTINATION
"share/${PROJECT_NAME_LOWER}/config")
\ No newline at end of file
Modified: code/player/trunk/examples/CMakeLists.txt
===================================================================
--- code/player/trunk/examples/CMakeLists.txt 2008-05-09 00:28:33 UTC (rev
6405)
+++ code/player/trunk/examples/CMakeLists.txt 2008-05-09 08:43:45 UTC (rev
6406)
@@ -1,3 +1,4 @@
+MESSAGE (STATUS "===== Examples =====")
OPTION (BUILD_EXAMPLES "Build the libplayerc, libplayerc++ and plugin
examples" ON)
IF (BUILD_EXAMPLES)
@@ -4,4 +5,5 @@
ADD_SUBDIRECTORY (plugins)
ADD_SUBDIRECTORY (libplayerc)
ADD_SUBDIRECTORY (libplayerc++)
-ENDIF (BUILD_EXAMPLES)
\ No newline at end of file
+ENDIF (BUILD_EXAMPLES)
+MESSAGE (STATUS "")
Modified: code/player/trunk/examples/libplayerc/CMakeLists.txt
===================================================================
--- code/player/trunk/examples/libplayerc/CMakeLists.txt 2008-05-09
00:28:33 UTC (rev 6405)
+++ code/player/trunk/examples/libplayerc/CMakeLists.txt 2008-05-09
08:43:45 UTC (rev 6406)
@@ -12,4 +12,12 @@
IF (HAVE_PLAYERSD)
ADD_EXECUTABLE (service_discovery service_discovery.c)
TARGET_LINK_LIBRARIES (service_discovery playerc playerxdr playererror
playersd playerutils ${PLAYERC_EXTRA_LINK_LIBRARIES})
-ENDIF (HAVE_PLAYERSD)
\ No newline at end of file
+ENDIF (HAVE_PLAYERSD)
+
+# Install the example source
+SET (exampleCMakeLists_in
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.example.in)
+SET (exampleCMakeLists ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt.example)
+CONFIGURE_FILE (${exampleCMakeLists_in} ${exampleCMakeLists} @ONLY)
+INSTALL (FILES ${exampleCMakeLists} DESTINATION
share/${PROJECT_NAME_LOWER}/examples/libplayerc RENAME CMakeLists.txt)
+SET (exampleSrcs vmap.c simple.c speech_c_client.c service_discovery.c)
+INSTALL (FILES ${exampleSrcs} DESTINATION
share/${PROJECT_NAME_LOWER}/examples/libplayerc)
Added: code/player/trunk/examples/libplayerc/CMakeLists.txt.example.in
===================================================================
--- code/player/trunk/examples/libplayerc/CMakeLists.txt.example.in
(rev 0)
+++ code/player/trunk/examples/libplayerc/CMakeLists.txt.example.in
2008-05-09 08:43:45 UTC (rev 6406)
@@ -0,0 +1,11 @@
+PROJECT (playerc_examples)
+
+# Include this CMake module to get most of the settings needed to build
+SET (CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules)
+INCLUDE (UsePlayerC)
+
+PLAYER_ADD_PLAYERC_CLIENT (simple "" "" "" "" simple.c)
+
+PLAYER_ADD_PLAYERC_CLIENT (vmap "" "" "" "" vmap.c)
+
+PLAYER_ADD_PLAYERC_CLIENT (speech_c_client "" "" "" "" speech_c_client.c)
\ No newline at end of file
Modified: code/player/trunk/examples/libplayerc++/CMakeLists.txt
===================================================================
--- code/player/trunk/examples/libplayerc++/CMakeLists.txt 2008-05-09
00:28:33 UTC (rev 6405)
+++ code/player/trunk/examples/libplayerc++/CMakeLists.txt 2008-05-09
08:43:45 UTC (rev 6406)
@@ -1,6 +1,12 @@
IF (BUILD_PLAYERCC)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/client_libs)
+ SET (exampleSrcs args.h camera.cc example0.cc example4.cc grip.cc
clientgraphics.cc
+ clientgraphics3d.cc laserobstacleavoid.cc ptz.cc
randomwalk.cc
+ sonarobstacleavoid.cc speech.cc wallfollow.cc)
+ SET (exampleBoostSrcs example1.cc example3.cc goto.cc speech_cpp_client.cc)
+ SET (exampleBoostSigSrcs example2.cc)
+
ADD_DEFINITIONS (${PLAYERCC_DEFINITIONS})
MACRO (PLAYERCPP_ADD_EXAMPLE _name)
ADD_EXECUTABLE (${_name} ${ARGN})
@@ -20,18 +26,28 @@
PLAYERCPP_ADD_EXAMPLE (speech speech.cc)
PLAYERCPP_ADD_EXAMPLE (wallfollow wallfollow.cc)
+ INSTALL (FILES ${exampleSrcs} DESTINATION
share/${PROJECT_NAME_LOWER}/examples/libplayerc++)
+
IF (BUILD_PLAYERCC_BOOST)
IF (USE_BOOST_THREADS OR USE_BOOST_SIGNALS)
PLAYERCPP_ADD_EXAMPLE (example1 example1.cc)
PLAYERCPP_ADD_EXAMPLE (example3 example3.cc)
PLAYERCPP_ADD_EXAMPLE (goto goto.cc)
PLAYERCPP_ADD_EXAMPLE (speech_cpp_client speech_cpp_client.cc)
+ INSTALL (FILES ${exampleBoostSrcs} DESTINATION
share/${PROJECT_NAME_LOWER}/examples/libplayerc++)
ENDIF (USE_BOOST_THREADS OR USE_BOOST_SIGNALS)
-
+
IF (USE_BOOST_SIGNALS)
PLAYERCPP_ADD_EXAMPLE (example2 example2.cc)
+ INSTALL (FILES ${exampleBoostSigSrcs} DESTINATION
share/${PROJECT_NAME_LOWER}/examples/libplayerc++)
ENDIF (USE_BOOST_SIGNALS)
ENDIF (BUILD_PLAYERCC_BOOST)
+
+ # Install the example CMakeLists.txt
+ SET (exampleCMakeLists_in
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.example.in)
+ SET (exampleCMakeLists ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt.example)
+ CONFIGURE_FILE (${exampleCMakeLists_in} ${exampleCMakeLists} @ONLY)
+ INSTALL (FILES ${exampleCMakeLists} DESTINATION
share/${PROJECT_NAME_LOWER}/examples/libplayerc++ RENAME CMakeLists.txt)
ELSE (BUILD_PLAYERCC)
- MESSAGE (STATUS "playerprint will not be built - playerc++ client library
is disabled")
+ MESSAGE (STATUS "playerc++ examples will not be built - playerc++ client
library is disabled")
ENDIF (BUILD_PLAYERCC)
Added: code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in
===================================================================
--- code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in
(rev 0)
+++ code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in
2008-05-09 08:43:45 UTC (rev 6406)
@@ -0,0 +1,32 @@
+PROJECT (playerc++_examples)
+
+# Include this CMake module to get most of the settings needed to build
+SET (CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules)
+INCLUDE (UsePlayerC++)
+
+PLAYER_ADD_PLAYERCPP_CLIENT (camera "" "" "" "" camera.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (example0 "" "" "" "" example0.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (example4 "" "" "" "" example4.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (grip "" "" "" "" grip.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (clientgraphics "" "" "" "" clientgraphics.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (clientgraphics3d "" "" "" "" clientgraphics3d.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (laserobstacleavoid "" "" "" ""
laserobstacleavoid.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (ptz "" "" "" "" ptz.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (randomwalk "" "" "" "" randomwalk.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (sonarobstacleavoid "" "" "" ""
sonarobstacleavoid.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (speed "" "" "" "" speech.cc)
+PLAYER_ADD_PLAYERCPP_CLIENT (wallfollow "" "" "" "" wallfollow.cc)
+
+SET (HAVE_BOOST_THREADS @USE_BOOST_THREADS@)
+SET (HAVE_BOOST_SIGNALS @USE_BOOST_SIGNALS@)
+
+IF (HAVE_BOOST_THREADS OR HAVE_BOOST_SIGNALS)
+ PLAYER_ADD_PLAYERCPP_CLIENT (example1 "" "" "" "" example1.cc)
+ PLAYER_ADD_PLAYERCPP_CLIENT (example3 "" "" "" "" example3.cc)
+ PLAYER_ADD_PLAYERCPP_CLIENT (goto "" "" "" "-DHAVE_BOOST_THREAD
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DHAVE_BOOST_SIGNALS" goto.cc)
+ PLAYER_ADD_PLAYERCPP_CLIENT (speech_cpp_client "" "" "" ""
speech_cpp_client.cc)
+ENDIF (HAVE_BOOST_THREADS OR HAVE_BOOST_SIGNALS)
+
+IF (HAVE_BOOST_SIGNALS)
+ PLAYER_ADD_PLAYERCPP_CLIENT (example2 "" "" "" "" example2.cc)
+ENDIF (HAVE_BOOST_SIGNALS)
\ No newline at end of file
Modified: code/player/trunk/examples/libplayerc++/goto.cc
===================================================================
--- code/player/trunk/examples/libplayerc++/goto.cc 2008-05-09 00:28:33 UTC
(rev 6405)
+++ code/player/trunk/examples/libplayerc++/goto.cc 2008-05-09 08:43:45 UTC
(rev 6406)
@@ -15,6 +15,9 @@
#include <math.h>
#include <string>
+#include <boost/signal.hpp>
+#include <boost/bind.hpp>
+
#define USAGE \
"USAGE: goto [-x <x>] [-y <y>] [-h <host>] [-p <port>] [-m]\n" \
" -x <x>: set the X coordinate of the target to <x>\n"\
Modified: code/player/trunk/examples/libplayerc++/speech_cpp_client.cc
===================================================================
--- code/player/trunk/examples/libplayerc++/speech_cpp_client.cc
2008-05-09 00:28:33 UTC (rev 6405)
+++ code/player/trunk/examples/libplayerc++/speech_cpp_client.cc
2008-05-09 08:43:45 UTC (rev 6406)
@@ -1,6 +1,8 @@
#include <libplayerc++/playerc++.h>
#include <iostream>
#include <unistd.h>
+#include <boost/signal.hpp>
+#include <boost/bind.hpp>
using namespace PlayerCc;
Modified: code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt
===================================================================
--- code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt
2008-05-09 00:28:33 UTC (rev 6405)
+++ code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt
2008-05-09 08:43:45 UTC (rev 6406)
@@ -1,2 +1,9 @@
ADD_LIBRARY (exampledriver SHARED exampledriver.cc)
TARGET_LINK_LIBRARIES (exampledriver playercore)
+
+SET (exampleCMakeLists_in
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.example.in)
+SET (exampleCMakeLists ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt.example)
+SET (exampleDestDir share/${PROJECT_NAME_LOWER}/examples/plugins/exampledriver)
+CONFIGURE_FILE (${exampleCMakeLists_in} ${exampleCMakeLists} @ONLY)
+INSTALL (FILES ${exampleCMakeLists} DESTINATION ${exampleDestDir} RENAME
CMakeLists.txt)
+INSTALL (FILES exampledriver.cc example.cfg README DESTINATION
${exampleDestDir})
Added:
code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt.example.in
===================================================================
--- code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt.example.in
(rev 0)
+++ code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt.example.in
2008-05-09 08:43:45 UTC (rev 6406)
@@ -0,0 +1,7 @@
+PROJECT (playerplugin_examples)
+
+# Include this CMake module to get most of the settings needed to build
+SET (CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules)
+INCLUDE (UsePlayerPlugin)
+
+PLAYER_ADD_PLUGIN_DRIVER (exampledriver "" "" "" "" exampledriver.cc)
\ No newline at end of file
Modified: code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt
===================================================================
--- code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt
2008-05-09 00:28:33 UTC (rev 6405)
+++ code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt
2008-05-09 08:43:45 UTC (rev 6406)
@@ -31,3 +31,11 @@
TARGET_LINK_LIBRARIES (eginterfdriver playercore)
ADD_EXECUTABLE (example_client example_client.c ${example_interface_h})
TARGET_LINK_LIBRARIES (example_client playerc playerxdr playererror
${PLAYERC_EXTRA_LINK_LIBRARIES} eginterf)
+
+SET (exampleCMakeLists_in
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.example.in)
+SET (exampleCMakeLists ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt.example)
+SET (exampleDestDir
share/${PROJECT_NAME_LOWER}/examples/plugins/exampleinterface)
+CONFIGURE_FILE (${exampleCMakeLists_in} ${exampleCMakeLists} @ONLY)
+INSTALL (FILES ${exampleCMakeLists} DESTINATION ${exampleDestDir} RENAME
CMakeLists.txt)
+INSTALL (FILES 128_example.def eginterf_client.c eginterf_client.h
eginterf_driver.cc example.cfg example_client.c README
+ DESTINATION ${exampleDestDir})
Added:
code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt.example.in
===================================================================
---
code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt.example.in
(rev 0)
+++
code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt.example.in
2008-05-09 08:43:45 UTC (rev 6406)
@@ -0,0 +1,11 @@
+PROJECT (playerplugin_examples)
+
+# Include this CMake module to get most of the settings needed to build
+SET (CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules)
+INCLUDE (UsePlayerPlugin)
+INCLUDE (UsePlayerC)
+
+PLAYER_ADD_PLUGIN_INTERFACE (eginterf 128_example.def "" "" "" ""
eginterf_client.c)
+# Note the use of files generated during the PLAYER_ADD_PLUGIN_INTERFACE step
+PLAYER_ADD_PLUGIN_DRIVER (eginterf_driver "" "" "" "" eginterf_driver.cc
eginterf_interface.h eginterf_xdr.h)
+PLAYER_ADD_PLAYERC_CLIENT (example_client "" "" "" "" example_client.c
eginterf_interface.h)
\ No newline at end of file
Modified: code/player/trunk/examples/plugins/multidriver/CMakeLists.txt
===================================================================
--- code/player/trunk/examples/plugins/multidriver/CMakeLists.txt
2008-05-09 00:28:33 UTC (rev 6405)
+++ code/player/trunk/examples/plugins/multidriver/CMakeLists.txt
2008-05-09 08:43:45 UTC (rev 6406)
@@ -1,2 +1,9 @@
ADD_LIBRARY (multidriver SHARED multidriver.cc)
TARGET_LINK_LIBRARIES (multidriver playercore)
+
+SET (exampleCMakeLists_in
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.example.in)
+SET (exampleCMakeLists ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt.example)
+SET (exampleDestDir share/${PROJECT_NAME_LOWER}/examples/plugins/multidriver)
+CONFIGURE_FILE (${exampleCMakeLists_in} ${exampleCMakeLists} @ONLY)
+INSTALL (FILES ${exampleCMakeLists} DESTINATION ${exampleDestDir} RENAME
CMakeLists.txt)
+INSTALL (FILES multidriver.cc multi.cfg README DESTINATION ${exampleDestDir})
Added: code/player/trunk/examples/plugins/multidriver/CMakeLists.txt.example.in
===================================================================
--- code/player/trunk/examples/plugins/multidriver/CMakeLists.txt.example.in
(rev 0)
+++ code/player/trunk/examples/plugins/multidriver/CMakeLists.txt.example.in
2008-05-09 08:43:45 UTC (rev 6406)
@@ -0,0 +1,7 @@
+PROJECT (playerplugin_examples)
+
+# Include this CMake module to get most of the settings needed to build
+SET (CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules)
+INCLUDE (UsePlayerPlugin)
+
+PLAYER_ADD_PLUGIN_DRIVER (multidriver "" "" "" "" multidriver.cc)
\ No newline at end of file
Modified: code/player/trunk/examples/plugins/multidriver/multi.cfg
===================================================================
--- code/player/trunk/examples/plugins/multidriver/multi.cfg 2008-05-09
00:28:33 UTC (rev 6405)
+++ code/player/trunk/examples/plugins/multidriver/multi.cfg 2008-05-09
08:43:45 UTC (rev 6406)
@@ -9,9 +9,9 @@
driver
(
- name "multidriver"
+ name "multidriver"
plugin "libmultidriver"
- provides ["position:0" "laser:1"]
+ provides ["position2d:0" "laser:1"]
requires ["laser:0"]
)
Modified: code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt
===================================================================
--- code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt
2008-05-09 00:28:33 UTC (rev 6405)
+++ code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt
2008-05-09 08:43:45 UTC (rev 6406)
@@ -4,3 +4,10 @@
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/client_libs)
ADD_EXECUTABLE (opaque_client opaque.c)
TARGET_LINK_LIBRARIES (opaque_client playerc playerxdr playererror
${PLAYERC_EXTRA_LINK_LIBRARIES})
+
+SET (exampleCMakeLists_in
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.example.in)
+SET (exampleCMakeLists ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt.example)
+SET (exampleDestDir share/${PROJECT_NAME_LOWER}/examples/plugins/opaquedriver)
+CONFIGURE_FILE (${exampleCMakeLists_in} ${exampleCMakeLists} @ONLY)
+INSTALL (FILES ${exampleCMakeLists} DESTINATION ${exampleDestDir} RENAME
CMakeLists.txt)
+INSTALL (FILES opaquedriver.cc opaque.cfg opaque.c sharedstruct.h DESTINATION
${exampleDestDir})
Added: code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt.example.in
===================================================================
--- code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt.example.in
(rev 0)
+++ code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt.example.in
2008-05-09 08:43:45 UTC (rev 6406)
@@ -0,0 +1,9 @@
+PROJECT (playerplugin_examples)
+
+# Include this CMake module to get most of the settings needed to build
+SET (CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules)
+INCLUDE (UsePlayerPlugin)
+INCLUDE (UsePlayerC)
+
+PLAYER_ADD_PLUGIN_DRIVER (opaquedriver "" "" "" "" opaquedriver.cc)
+PLAYER_ADD_PLAYERC_CLIENT (opaque "" "" "" "" opaque.c)
\ No newline at end of file
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 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit