From: <gb...@us...> - 2009-08-11 03:44:53
|
Revision: 8191 http://playerstage.svn.sourceforge.net/playerstage/?rev=8191&view=rev Author: gbiggs Date: 2009-08-11 03:44:43 +0000 (Tue, 11 Aug 2009) Log Message: ----------- Fixes for building on Windows. Made the generated installer work, including installing example source that actually works. Modified Paths: -------------- code/player/trunk/CMakeLists.txt code/player/trunk/PlayerCPackOptions.cmake.in code/player/trunk/cmake/UsePlayerC++.cmake.in code/player/trunk/cmake/UsePlayerC.cmake.in code/player/trunk/cmake/UsePlayerPlugin.cmake.in code/player/trunk/cmake/internal/LibraryUtils.cmake code/player/trunk/cmake/internal/SearchForStuff.cmake code/player/trunk/config.h.in code/player/trunk/examples/libplayerc/CMakeLists.txt code/player/trunk/examples/libplayerc/CMakeLists.txt.example.in code/player/trunk/examples/libplayerc++/CMakeLists.txt code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt.example.in code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt.example.in code/player/trunk/examples/plugins/multidriver/CMakeLists.txt code/player/trunk/examples/plugins/multidriver/CMakeLists.txt.example.in code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt.example.in code/player/trunk/libplayercore/CMakeLists.txt code/player/trunk/libplayercore/plugins.cc code/player/trunk/libplayerinterface/CMakeLists.txt code/player/trunk/libplayerinterface/addr_util.c code/player/trunk/replace/CMakeLists.txt code/player/trunk/replace/nanosleep.c code/player/trunk/replace/usleep.c code/player/trunk/server/drivers/position/segwayrmp400/segwayrmp400.cc code/player/trunk/server/drivers/position/segwayrmp400/segwayrmp400.h Added Paths: ----------- code/player/trunk/cmake/internal/setdlldirectory.c Modified: code/player/trunk/CMakeLists.txt =================================================================== --- code/player/trunk/CMakeLists.txt 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/CMakeLists.txt 2009-08-11 03:44:43 UTC (rev 8191) @@ -55,7 +55,7 @@ SET (playerconfig_h_in "${CMAKE_CURRENT_SOURCE_DIR}/playerconfig.h.in") SET (playerconfig_h "${CMAKE_CURRENT_BINARY_DIR}/playerconfig.h") CONFIGURE_FILE (${playerconfig_h_in} ${playerconfig_h}) -INSTALL (FILES ${playerconfig_h} DESTINATION ${PLAYER_INCLUDE_INSTALL_DIR}) +INSTALL (FILES ${playerconfig_h} DESTINATION ${PLAYER_INCLUDE_INSTALL_DIR} COMPONENT headers) # Include some useful macros INCLUDE (${PLAYER_CMAKE_DIR}/internal/LibraryUtils.cmake) @@ -88,10 +88,7 @@ ADD_SUBDIRECTORY (replace) MESSAGE (STATUS "") -SET (PLAYERCORE_INT_LINK_LIBRARIES "" CACHE INTERNAL "Libs to link playercore to" FORCE) -SET (PLAYERCORE_EXTRA_LINK_LIBRARIES "" CACHE INTERNAL "Libs to link to with playercore" FORCE) -SET (PLAYERC_EXTRA_LINK_LIBRARIES "" CACHE INTERNAL "Libs to link to with playerc" FORCE) -SET (PLAYERCC_EXTRA_LINK_LIBRARIES "" CACHE INTERNAL "Libs to link to with playercc" FORCE) +PLAYER_CLEAR_CACHED_LISTS () # Create packages INCLUDE (InstallRequiredSystemLibraries) Modified: code/player/trunk/PlayerCPackOptions.cmake.in =================================================================== --- code/player/trunk/PlayerCPackOptions.cmake.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/PlayerCPackOptions.cmake.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -4,11 +4,11 @@ SET (CPACK_PACKAGE_VERSION_PATCH "@PLAYER_REVISION_VERSION@") SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Player robot server") SET (CPACK_PACKAGE_VENDOR "Killbots, Inc.") -SET (CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@ @PLAYER_VERSION@") +SET (CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@") SET (CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME@-@PLAYER_VERSION@") SET (CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING") -SET (CPACK_COMPONENTS_ALL applications libraries headers pkgconfig cmakestuff samplecfg) +SET (CPACK_COMPONENTS_ALL applications libraries headers pkgconfig cmakestuff samplecfg examples) SET (CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Application files") SET (CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "Executable application files for the server and utilities.") SET (CPACK_COMPONENT_APPLICATIONS_DEPENDS libraries) @@ -26,6 +26,9 @@ SET (CPACK_COMPONENT_SAMPLECFG_DISPLAY_NAME "Sample configuration files") SET (CPACK_COMPONENT_SAMPLECFG_DESCRIPTION "Sample configuration files for use with the server.") SET (CPACK_COMPONENT_SAMPLECFG_DEPENDS applications) +SET (CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples") +SET (CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Example clients and plugins, including source code.") +SET (CPACK_COMPONENT_EXAMPLES_DEPENDS applications libraries headers) IF (WIN32) SET (CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\player.ico") Modified: code/player/trunk/cmake/UsePlayerC++.cmake.in =================================================================== --- code/player/trunk/cmake/UsePlayerC++.cmake.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/cmake/UsePlayerC++.cmake.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -10,7 +10,7 @@ IF (NOT PKG_CONFIG_FOUND) SET (PLAYERCPP_CFLAGS "") SET (PLAYERCPP_INCLUDE_DIRS @PLAYERCC_EXTRA_INCLUDE_DIRS@) - LIST (APPEND PLAYERCPP_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/player@PLAYER_MAJOR_VERSION@.@PLAYER_MINOR_VERSION@") + LIST (APPEND PLAYERCPP_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/player-@PLAYER_MAJOR_VERSION@.@PLAYER_MINOR_VERSION@") SET (PLAYERCPP_LINK_LIBS @PLAYERCC_EXTRA_LINK_LIBRARIES@) LIST (APPEND PLAYERCPP_LINK_LIBS "playerc++") SET (PLAYERCPP_LIBRARY_DIRS @PLAYERCC_EXTRA_LINK_DIRS@) Modified: code/player/trunk/cmake/UsePlayerC.cmake.in =================================================================== --- code/player/trunk/cmake/UsePlayerC.cmake.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/cmake/UsePlayerC.cmake.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -10,7 +10,7 @@ IF (NOT PKG_CONFIG_FOUND) SET (PLAYERC_CFLAGS "") SET (PLAYERC_INCLUDE_DIRS @PLAYERC_EXTRA_INCLUDE_DIRS@) - LIST (APPEND PLAYERC_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/player@PLAYER_MAJOR_VERSION@.@PLAYER_MINOR_VERSION@") + LIST (APPEND PLAYERC_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/player-@PLAYER_MAJOR_VERSION@.@PLAYER_MINOR_VERSION@") SET (PLAYERC_LINK_LIBS @PLAYERC_EXTRA_LINK_LIBRARIES@) LIST (APPEND PLAYERC_LINK_LIBS "playerc") SET (PLAYERC_LIBRARY_DIRS @PLAYERC_EXTRA_LINK_DIRS@) Modified: code/player/trunk/cmake/UsePlayerPlugin.cmake.in =================================================================== --- code/player/trunk/cmake/UsePlayerPlugin.cmake.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/cmake/UsePlayerPlugin.cmake.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -10,7 +10,7 @@ IF (NOT PKG_CONFIG_FOUND) SET (PLUGIN_PLAYERC_CFLAGS "") SET (PLUGIN_PLAYERC_INCLUDE_DIRS @PLAYERC_EXTRA_INCLUDE_DIRS@) - LIST (APPEND PLUGIN_PLAYERC_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/player@PLAYER_MAJOR_VERSION@.@PLAYER_MINOR_VERSION@") + LIST (APPEND PLUGIN_PLAYERC_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/player-@PLAYER_MAJOR_VERSION@.@PLAYER_MINOR_VERSION@") SET (PLUGIN_PLAYERC_LINK_LIBS @PLAYERC_EXTRA_LINK_LIBRARIES@) LIST (APPEND PLUGIN_PLAYERC_LINK_LIBS "playerc") SET (PLUGIN_PLAYERC_LIBRARY_DIRS @PLAYERC_EXTRA_LINK_DIRS@) @@ -37,7 +37,7 @@ IF (NOT PKG_CONFIG_FOUND) SET (PLAYERCORE_CFLAGS "") SET (PLAYERCORE_INCLUDE_DIRS @PLAYERCORE_EXTRA_INCLUDE_DIRS@) - LIST (APPEND PLAYERCORE_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/player@PLAYER_MAJOR_VERSION@.@PLAYER_MINOR_VERSION@") + LIST (APPEND PLAYERCORE_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/player-@PLAYER_MAJOR_VERSION@.@PLAYER_MINOR_VERSION@") SET (PLAYERCORE_LINK_LIBS @PLAYERCORE_EXTRA_LINK_LIBRARIES@) LIST (APPEND PLAYERCORE_LINK_LIBS "playercore") SET (PLAYERCORE_LIBRARY_DIRS @PLAYERCORE_EXTRA_LINK_DIRS@) Modified: code/player/trunk/cmake/internal/LibraryUtils.cmake =================================================================== --- code/player/trunk/cmake/internal/LibraryUtils.cmake 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/cmake/internal/LibraryUtils.cmake 2009-08-11 03:44:43 UTC (rev 8191) @@ -203,3 +203,26 @@ DESTINATION ${PLAYER_INCLUDE_INSTALL_DIR}/lib${_subdir} COMPONENT headers) ENDMACRO (PLAYER_INSTALL_HEADERS) + + +############################################################################### +# PLAYER_CLEAR_CACHED_LISTS () +# Clears all the cached lists (prevents accumulation of the same value over and +# over). +MACRO (PLAYER_CLEAR_CACHED_LISTS) + SET (PLAYER_EXTRA_INCLUDE_DIRS "" CACHE INTERNAL "Extra include directories" FORCE) + SET (PLAYER_EXTRA_LINK_DIRS "" CACHE INTERNAL "Library directories to link in" FORCE) + SET (PLAYERCORE_INT_INCLUDE_DIRS "" CACHE INTERNAL "Extra include directories for playercore" FORCE) + SET (PLAYERCORE_INT_LINK_DIRS "" CACHE INTERNAL "Library directories to link playercore to" FORCE) + SET (PLAYERCORE_INT_LINK_LIBRARIES "" CACHE INTERNAL "Libs to link playercore to" FORCE) + SET (PLAYERCORE_EXTRA_INCLUDE_DIRS "" CACHE INTERNAL "Extra include directories with playercore" FORCE) + SET (PLAYERCORE_EXTRA_LINK_DIRS "" CACHE INTERNAL "Library directories to link in with playercore" FORCE) + SET (PLAYERCORE_EXTRA_LINK_LIBRARIES "" CACHE INTERNAL "Libs to link to with playercore" FORCE) + SET (PLAYERC_EXTRA_INCLUDE_DIRS "" CACHE INTERNAL "Extra include directories when using playerc" FORCE) + SET (PLAYERC_EXTRA_LINK_DIRS "" CACHE INTERNAL "Library directories to link in when using playerc" FORCE) + SET (PLAYERC_EXTRA_LINK_LIBRARIES "" CACHE INTERNAL "Libs to link to with playerc" FORCE) + SET (PLAYERCC_EXTRA_INCLUDE_DIRS "" CACHE INTERNAL "Extra include directories when using playercc" FORCE) + SET (PLAYERCC_EXTRA_LINK_DIRS "" CACHE INTERNAL "Library directories to link in when using playercc" FORCE) + SET (PLAYERCC_EXTRA_LINK_LIBRARIES "" CACHE INTERNAL "Libs to link to with playercc" FORCE) +ENDMACRO (PLAYER_CLEAR_CACHED_LISTS) + Modified: code/player/trunk/cmake/internal/SearchForStuff.cmake =================================================================== --- code/player/trunk/cmake/internal/SearchForStuff.cmake 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/cmake/internal/SearchForStuff.cmake 2009-08-11 03:44:43 UTC (rev 8191) @@ -194,10 +194,10 @@ MESSAGE (FATAL_ERROR "Set PTHREAD_DIR to the directory in which you have installed pthreads-win32, then re-run CMake.") ENDIF (PTHREAD_DIR STREQUAL "") SET (PTHREAD_INCLUDE_DIR "${PTHREAD_DIR}/include" CACHE PATH "Include directory for a POSIX threads implementation providing pthread.h.") - SET (PTHREAD_LIB_DIR "${PTHREAD_DIR}/lib" CACHE PATH "Library directory for a POSIX threads implementation providing pthread.lib (if using pthreads for Win32, rename the .lib and .dll you have chosen).") + SET (PTHREAD_LIB_DIR "${PTHREAD_DIR}/lib" CACHE PATH "Library directory for a POSIX threads implementation providing pthread.lib.") ELSE (PLAYER_OS_WIN) SET (PTHREAD_INCLUDE_DIR "" CACHE PATH "Include directory for a POSIX threads implementation providing pthread.h.") - SET (PTHREAD_LIB_DIR "" CACHE PATH "Library directory for a POSIX threads implementation providing pthread.lib (if using pthreads for Win32, rename the .lib and .dll you have chosen).") + SET (PTHREAD_LIB_DIR "" CACHE PATH "Library directory for a POSIX threads implementation providing pthread.lib.") ENDIF (PLAYER_OS_WIN) MARK_AS_ADVANCED (PTHREAD_INCLUDE_DIR) IF (NOT PTHREAD_INCLUDE_DIR STREQUAL "") @@ -226,3 +226,9 @@ ENDIF (HAVE_PTHREAD_H) SET (CMAKE_REQUIRED_INCLUDES) +IF (PLAYER_OS_WIN) + TRY_COMPILE (HAVE_SETDLLDIRECTORY + ${CMAKE_CURRENT_BINARY_DIR}/test_have_setdlldirectory + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/internal/setdlldirectory.c) +ENDIF (PLAYER_OS_WIN) + Added: code/player/trunk/cmake/internal/setdlldirectory.c =================================================================== --- code/player/trunk/cmake/internal/setdlldirectory.c (rev 0) +++ code/player/trunk/cmake/internal/setdlldirectory.c 2009-08-11 03:44:43 UTC (rev 8191) @@ -0,0 +1,14 @@ +#define _WIN32_WINNT 0x0502 +#include <windows.h> + +#ifdef __CLASSIC_C__ +int main(){ + int ac; + char*av[]; +#else +int main(int ac, char*av[]){ +#endif + SetDllDirectory("blag"); + return 0; +} + Modified: code/player/trunk/config.h.in =================================================================== --- code/player/trunk/config.h.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/config.h.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -14,4 +14,5 @@ #cmakedefine HAVE_SYS_FILIO_H 1 #cmakedefine HAVE_IEEEFP_H 1 #cmakedefine WORDS_BIGENDIAN 1 +#cmakedefine HAVE_SETDLLDIRECTORY 1 Modified: code/player/trunk/examples/libplayerc/CMakeLists.txt =================================================================== --- code/player/trunk/examples/libplayerc/CMakeLists.txt 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/libplayerc/CMakeLists.txt 2009-08-11 03:44:43 UTC (rev 8191) @@ -18,6 +18,6 @@ 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) +INSTALL (FILES ${exampleCMakeLists} DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc RENAME CMakeLists.txt COMPONENT examples) SET (exampleSrcs vmap.c simple.c speech_c_client.c service_discovery.c README) -INSTALL (FILES ${exampleSrcs} DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc) +INSTALL (FILES ${exampleSrcs} DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc COMPONENT examples) Modified: code/player/trunk/examples/libplayerc/CMakeLists.txt.example.in =================================================================== --- code/player/trunk/examples/libplayerc/CMakeLists.txt.example.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/libplayerc/CMakeLists.txt.example.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -2,7 +2,7 @@ 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) +SET (CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/share/cmake/Modules") INCLUDE (UsePlayerC) PLAYER_ADD_PLAYERC_CLIENT (simple SOURCES simple.c) Modified: code/player/trunk/examples/libplayerc++/CMakeLists.txt =================================================================== --- code/player/trunk/examples/libplayerc++/CMakeLists.txt 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/libplayerc++/CMakeLists.txt 2009-08-11 03:44:43 UTC (rev 8191) @@ -37,7 +37,7 @@ PLAYERCPP_ADD_EXAMPLE (speech speech.cc) PLAYERCPP_ADD_EXAMPLE (wallfollow wallfollow.cc) - INSTALL (FILES ${exampleSrcs} DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc++) + INSTALL (FILES ${exampleSrcs} DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc++ COMPONENT examples) IF (BUILD_PLAYERCC_BOOST) IF (HAVE_BOOST_THREAD AND HAVE_BOOST_SIGNALS) @@ -45,12 +45,12 @@ 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++) + INSTALL (FILES ${exampleBoostSrcs} DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc++ COMPONENT examples) ENDIF (HAVE_BOOST_THREAD AND HAVE_BOOST_SIGNALS) IF (HAVE_BOOST_SIGNALS) PLAYERCPP_ADD_EXAMPLE (example2 example2.cc) - INSTALL (FILES ${exampleBoostSigSrcs} DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc++) + INSTALL (FILES ${exampleBoostSigSrcs} DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc++ COMPONENT examples) ENDIF (HAVE_BOOST_SIGNALS) ENDIF (BUILD_PLAYERCC_BOOST) @@ -58,8 +58,8 @@ 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) - INSTALL (FILES README DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc++) + INSTALL (FILES ${exampleCMakeLists} DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc++ RENAME CMakeLists.txt COMPONENT examples) + INSTALL (FILES README DESTINATION share/${PROJECT_NAME_LOWER}/examples/libplayerc++ COMPONENT examples) ELSE (BUILD_PLAYERCC) MESSAGE (STATUS "playerc++ examples will not be built - playerc++ client library is disabled") ENDIF (BUILD_PLAYERCC) Modified: code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in =================================================================== --- code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -2,7 +2,7 @@ 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) +SET (CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/share/cmake/Modules") INCLUDE (UsePlayerC++) SET (HAVE_GETOPT @HAVE_GETOPT@) Modified: code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt =================================================================== --- code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt 2009-08-11 03:44:43 UTC (rev 8191) @@ -1,3 +1,5 @@ +INCLUDE_DIRECTORIES (${PLAYERCORE_EXTRA_INCLUDE_DIRS}) +LINK_DIRECTORIES (${PLAYERCORE_EXTRA_LINK_DIRS}) ADD_LIBRARY (exampledriver SHARED exampledriver.cc) TARGET_LINK_LIBRARIES (exampledriver playercore) @@ -5,5 +7,5 @@ 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}) +INSTALL (FILES ${exampleCMakeLists} DESTINATION ${exampleDestDir} RENAME CMakeLists.txt COMPONENT examples) +INSTALL (FILES exampledriver.cc example.cfg README DESTINATION ${exampleDestDir} COMPONENT examples) Modified: code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt.example.in =================================================================== --- code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt.example.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/plugins/exampledriver/CMakeLists.txt.example.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -2,7 +2,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) +SET (CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/share/cmake/Modules") INCLUDE (UsePlayerPlugin) PLAYER_ADD_PLUGIN_DRIVER (exampledriver SOURCES exampledriver.cc) Modified: code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt =================================================================== --- code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt 2009-08-11 03:44:43 UTC (rev 8191) @@ -1,3 +1,5 @@ +INCLUDE_DIRECTORIES (${PLAYERCORE_EXTRA_INCLUDE_DIRS}) +LINK_DIRECTORIES (${PLAYERCORE_EXTRA_LINK_DIRS}) INCLUDE (FindPythonInterp) IF (NOT PYTHONINTERP_FOUND) MESSAGE (FATAL_ERROR "No Python interpreter found. Cannot continue.") @@ -43,6 +45,6 @@ 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 ${exampleCMakeLists} DESTINATION ${exampleDestDir} RENAME CMakeLists.txt COMPONENT examples) INSTALL (FILES 128_example.def eginterf_client.c eginterf_client.h eginterf_driver.cc example.cfg example_client.c README - DESTINATION ${exampleDestDir}) + DESTINATION ${exampleDestDir} COMPONENT examples) Modified: code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt.example.in =================================================================== --- code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt.example.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/plugins/exampleinterface/CMakeLists.txt.example.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -2,7 +2,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) +SET (CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/share/cmake/Modules") INCLUDE (UsePlayerPlugin) INCLUDE (UsePlayerC) Modified: code/player/trunk/examples/plugins/multidriver/CMakeLists.txt =================================================================== --- code/player/trunk/examples/plugins/multidriver/CMakeLists.txt 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/plugins/multidriver/CMakeLists.txt 2009-08-11 03:44:43 UTC (rev 8191) @@ -1,3 +1,5 @@ +INCLUDE_DIRECTORIES (${PLAYERCORE_EXTRA_INCLUDE_DIRS}) +LINK_DIRECTORIES (${PLAYERCORE_EXTRA_LINK_DIRS}) ADD_LIBRARY (multidriver SHARED multidriver.cc) TARGET_LINK_LIBRARIES (multidriver playercore) @@ -5,5 +7,5 @@ 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}) +INSTALL (FILES ${exampleCMakeLists} DESTINATION ${exampleDestDir} RENAME CMakeLists.txt COMPONENT examples) +INSTALL (FILES multidriver.cc multi.cfg README DESTINATION ${exampleDestDir} COMPONENT examples) Modified: code/player/trunk/examples/plugins/multidriver/CMakeLists.txt.example.in =================================================================== --- code/player/trunk/examples/plugins/multidriver/CMakeLists.txt.example.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/plugins/multidriver/CMakeLists.txt.example.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -2,7 +2,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) +SET (CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/share/cmake/Modules") INCLUDE (UsePlayerPlugin) PLAYER_ADD_PLUGIN_DRIVER (multidriver SOURCES multidriver.cc) Modified: code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt =================================================================== --- code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt 2009-08-11 03:44:43 UTC (rev 8191) @@ -1,3 +1,5 @@ +INCLUDE_DIRECTORIES (${PLAYERCORE_EXTRA_INCLUDE_DIRS}) +LINK_DIRECTORIES (${PLAYERCORE_EXTRA_LINK_DIRS}) ADD_LIBRARY (opaquedriver SHARED opaquedriver.cc) TARGET_LINK_LIBRARIES (opaquedriver playercore) @@ -9,5 +11,6 @@ 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 README DESTINATION ${exampleDestDir}) +INSTALL (FILES ${exampleCMakeLists} DESTINATION ${exampleDestDir} RENAME CMakeLists.txt COMPONENT examples) +INSTALL (FILES opaquedriver.cc opaque.cfg opaque.c sharedstruct.h README DESTINATION ${exampleDestDir} COMPONENT examples) + Modified: code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt.example.in =================================================================== --- code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt.example.in 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/examples/plugins/opaquedriver/CMakeLists.txt.example.in 2009-08-11 03:44:43 UTC (rev 8191) @@ -2,7 +2,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) +SET (CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/share/cmake/Modules") INCLUDE (UsePlayerPlugin) INCLUDE (UsePlayerC) Modified: code/player/trunk/libplayercore/CMakeLists.txt =================================================================== --- code/player/trunk/libplayercore/CMakeLists.txt 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/libplayercore/CMakeLists.txt 2009-08-11 03:44:43 UTC (rev 8191) @@ -68,12 +68,10 @@ LIST_TO_STRING_WITH_PREFIX (pkgconfigLinkDirs "-L" ${PLAYERCORE_EXTRA_LINK_DIRS}) LIST_TO_STRING_WITH_PREFIX (pkgconfigLinkLibs "-l" ${PLAYERCORE_EXTRA_LINK_LIBRARIES}) PLAYER_MAKE_PKGCONFIG ("playercore" "Player core library - part of the Player Project" - "playerinterface playercommon" "" "${pkgconfigCFLags}" + "playerinterface playercommon" "" "${pkgconfigCFlags}" "${pkgconfigLinkDirs} ${pkgconfigLinkLibs}") CONFIGURE_FILE (${PLAYER_CMAKE_DIR}/UsePlayerPlugin.cmake.in ${CMAKE_BINARY_DIR}/cmake/UsePlayerPlugin.cmake @ONLY) - - PLAYER_INSTALL_HEADERS (playercore configfile.h device.h devicetable.h Modified: code/player/trunk/libplayercore/plugins.cc =================================================================== --- code/player/trunk/libplayercore/plugins.cc 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/libplayercore/plugins.cc 2009-08-11 03:44:43 UTC (rev 8191) @@ -40,7 +40,11 @@ #include <string.h> #include <stdlib.h> -#if defined WIN32 +#if defined (WIN32) + #if defined (HAVE_SETDLLDIRECTORY) + #define _WIN32_WINNT 0x0502 + #endif + #include <windows.h> #include <direct.h> #include <vector> #include <string> @@ -55,7 +59,6 @@ #include <libplayercore/drivertable.h> #include <libplayercore/globals.h> #include <libplayercommon/playercommon.h> -#include <libplayercommon/playercommon.h> #include <replace/replace.h> @@ -159,9 +162,9 @@ } else { +#if defined (HAVE_SETDLLDIRECTORY) // Add the various search paths to the list - - // start with $PLAYERPATH, if set + // Start with $PLAYERPATH, if set char playerpath[PATH_MAX]; size_t size = PATH_MAX; errno_t err; @@ -218,6 +221,19 @@ return handle; } return NULL; +#else // defined (HAVE_SETDLLDIRECTORY) + lt_dlhandle handle = LoadLibrary( pluginname ); + if (handle == NULL) + { + LPVOID buffer = NULL; + FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, + GetLastError(), 0, reinterpret_cast<LPTSTR> (&buffer), 0, NULL ); + PLAYER_ERROR2( "Failed to load plugin: %s\n", reinterpret_cast<LPTSTR> (buffer) ); + LocalFree( buffer ); + return NULL; + } + return handle; +#endif // defined (HAVE_SETDLLDIRECTORY) } #else PLAYER_ERROR("Sorry, no support for shared libraries, so can't load plugins."); Modified: code/player/trunk/libplayerinterface/CMakeLists.txt =================================================================== --- code/player/trunk/libplayerinterface/CMakeLists.txt 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/libplayerinterface/CMakeLists.txt 2009-08-11 03:44:43 UTC (rev 8191) @@ -124,9 +124,11 @@ INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/playerxdrgen.py RENAME playerxdrgen DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + COMPONENT applications) INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/playerinterfacegen.py RENAME playerinterfacegen DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ - GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + COMPONENT applications) Modified: code/player/trunk/libplayerinterface/addr_util.c =================================================================== --- code/player/trunk/libplayerinterface/addr_util.c 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/libplayerinterface/addr_util.c 2009-08-11 03:44:43 UTC (rev 8191) @@ -79,7 +79,6 @@ int retval; struct addrinfo* addr = NULL; #else - struct sockaddr_in saddr; struct hostent* entp; #endif char host[256]; Modified: code/player/trunk/replace/CMakeLists.txt =================================================================== --- code/player/trunk/replace/CMakeLists.txt 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/replace/CMakeLists.txt 2009-08-11 03:44:43 UTC (rev 8191) @@ -1,8 +1,8 @@ INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/replace) IF (PLAYER_OS_WIN) - INSTALL (FILES rpc/xdr.h rpc/types.h DESTINATION ${PLAYER_INCLUDE_INSTALL_DIR}/rpc) - INSTALL (FILES replace.h DESTINATION ${PLAYER_INCLUDE_INSTALL_DIR}) + INSTALL (FILES rpc/xdr.h rpc/types.h DESTINATION ${PLAYER_INCLUDE_INSTALL_DIR}/rpc COMPONENT headers) + INSTALL (FILES replace.h DESTINATION ${PLAYER_INCLUDE_INSTALL_DIR} COMPONENT headers) ENDIF (PLAYER_OS_WIN) IF (NOT HAVE_XDR) Modified: code/player/trunk/replace/nanosleep.c =================================================================== --- code/player/trunk/replace/nanosleep.c 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/replace/nanosleep.c 2009-08-11 03:44:43 UTC (rev 8191) @@ -28,6 +28,7 @@ #if defined (WIN32) +#define _WIN32_WINNT 0x0500 #include <windows.h> #include "replace.h" Modified: code/player/trunk/replace/usleep.c =================================================================== --- code/player/trunk/replace/usleep.c 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/replace/usleep.c 2009-08-11 03:44:43 UTC (rev 8191) @@ -28,6 +28,7 @@ #if defined (WIN32) +#define _WIN32_WINNT 0x0500 #include <windows.h> #include "replace.h" Modified: code/player/trunk/server/drivers/position/segwayrmp400/segwayrmp400.cc =================================================================== --- code/player/trunk/server/drivers/position/segwayrmp400/segwayrmp400.cc 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/server/drivers/position/segwayrmp400/segwayrmp400.cc 2009-08-11 03:44:43 UTC (rev 8191) @@ -187,7 +187,7 @@ counter = 0; // Check config file for additional options - this->fullspeed = cf->ReadInt(section, "fullspeed_data", 1); + this->fullspeed = cf->ReadInt(section, "fullspeed_data", 1) == 0 ? false : true; } Modified: code/player/trunk/server/drivers/position/segwayrmp400/segwayrmp400.h =================================================================== --- code/player/trunk/server/drivers/position/segwayrmp400/segwayrmp400.h 2009-08-11 02:07:09 UTC (rev 8190) +++ code/player/trunk/server/drivers/position/segwayrmp400/segwayrmp400.h 2009-08-11 03:44:43 UTC (rev 8191) @@ -28,11 +28,13 @@ #include <stdio.h> #include <pthread.h> -#include <unistd.h> -#include <netinet/in.h> #include <string.h> #include <stdlib.h> #include <math.h> +#if !defined (WIN32) + #include <unistd.h> + #include <netinet/in.h> +#endif #include <libplayercore/playercore.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |