Revision: 6872
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6872&view=rev
Author:   gbiggs
Date:     2008-07-15 18:26:03 -0700 (Tue, 15 Jul 2008)

Log Message:
-----------
Added missing check for jpeg presense to python bindings linking. Added options 
for setting locations of needed libraries.

Modified Paths:
--------------
    code/player/trunk/CMakeLists.txt
    code/player/trunk/client_libs/libplayerc/bindings/python/CMakeLists.txt
    code/player/trunk/cmake/internal/SearchForStuff.cmake
    code/player/trunk/config.h.in
    code/player/trunk/server/drivers/camera/compress/CMakeLists.txt

Modified: code/player/trunk/CMakeLists.txt
===================================================================
--- code/player/trunk/CMakeLists.txt    2008-07-15 22:51:29 UTC (rev 6871)
+++ code/player/trunk/CMakeLists.txt    2008-07-16 01:26:03 UTC (rev 6872)
@@ -52,18 +52,16 @@
 ADD_SUBDIRECTORY (client_libs)
 ADD_SUBDIRECTORY (libplayercore)
 ADD_SUBDIRECTORY (libplayerxdr)
-IF (NOT PLAYER_OS_WIN)
-    ADD_SUBDIRECTORY (config)           # Example config files
-    ADD_SUBDIRECTORY (libplayerjpeg)
-    ADD_SUBDIRECTORY (libplayertcp)
-    ADD_SUBDIRECTORY (libplayersd)
-    ADD_SUBDIRECTORY (rtk2)
-    ADD_SUBDIRECTORY (server)
-    ADD_SUBDIRECTORY (examples)
-    ADD_SUBDIRECTORY (utils)
-    ADD_SUBDIRECTORY (doc)
-ENDIF (NOT PLAYER_OS_WIN)
-ADD_SUBDIRECTORY (cmake)
+ADD_SUBDIRECTORY (config)           # Example config files
+ADD_SUBDIRECTORY (libplayerjpeg)
+ADD_SUBDIRECTORY (libplayertcp)
+ADD_SUBDIRECTORY (libplayersd)
+ADD_SUBDIRECTORY (rtk2)
+ADD_SUBDIRECTORY (server)
+ADD_SUBDIRECTORY (examples)
+ADD_SUBDIRECTORY (utils)
+ADD_SUBDIRECTORY (doc)
+ADD_SUBDIRECTORY (cmake)            # CMake modules for Player libraries
 MESSAGE (STATUS "")
 
 SET (PLAYER_EXTRA_LINK_LIBRARIES "" CACHE INTERNAL "Libs to link to" FORCE)

Modified: 
code/player/trunk/client_libs/libplayerc/bindings/python/CMakeLists.txt
===================================================================
--- code/player/trunk/client_libs/libplayerc/bindings/python/CMakeLists.txt     
2008-07-15 22:51:29 UTC (rev 6871)
+++ code/player/trunk/client_libs/libplayerc/bindings/python/CMakeLists.txt     
2008-07-16 01:26:03 UTC (rev 6872)
@@ -35,7 +35,10 @@
             SWIG_ADD_MODULE (playerc python ${playerc_i})
             SWIG_LINK_LIBRARIES (playerc ${PYTHON_LIBRARIES})
             ADD_DEPENDENCIES (${SWIG_MODULE_playerc_REAL_NAME} 
playerc_oo_i_target)
-            TARGET_LINK_LIBRARIES (${SWIG_MODULE_playerc_REAL_NAME} playerxdr 
playerc playerjpeg jpeg playererror)
+            TARGET_LINK_LIBRARIES (${SWIG_MODULE_playerc_REAL_NAME} playerxdr 
playerc playererror)
+            IF (HAVE_JPEG)
+                TARGET_LINK_LIBRARIES (${SWIG_MODULE_playerc_REAL_NAME} 
playerjpeg)
+            ENDIF (HAVE_JPEG)
 
             # Generate the set up script
 #             CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/setup.py.cmake 
${CMAKE_CURRENT_BINARY_DIR}/setup.py)

Modified: code/player/trunk/cmake/internal/SearchForStuff.cmake
===================================================================
--- code/player/trunk/cmake/internal/SearchForStuff.cmake       2008-07-15 
22:51:29 UTC (rev 6871)
+++ code/player/trunk/cmake/internal/SearchForStuff.cmake       2008-07-16 
01:26:03 UTC (rev 6872)
@@ -26,40 +26,52 @@
 
 CHECK_FUNCTION_EXISTS (cfmakeraw HAVE_CFMAKERAW)
 CHECK_FUNCTION_EXISTS (dirname HAVE_DIRNAME)
-CHECK_LIBRARY_EXISTS (ltdl lt_dlopenext "" HAVE_LIBLTDL)
 CHECK_INCLUDE_FILES (linux/joystick.h HAVE_LINUX_JOYSTICK_H)
 CHECK_FUNCTION_EXISTS (poll HAVE_POLL)
 CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H)
 CHECK_INCLUDE_FILES (strings.h HAVE_STRINGS_H)
 CHECK_INCLUDE_FILES (dns_sd.h HAVE_DNS_SD)
 IF (HAVE_DNS_SD)
-    CHECK_LIBRARY_EXISTS (dns_sd DNSServiceRefDeallocate "" HAVE_DNS_SD)
+    SET (DNS_SD_LOCATION "" CACHE STRING "Location where dns_sd is installed.")
+    MARK_AS_ADVANCED (DNS_SD_LOCATION)
+    CHECK_LIBRARY_EXISTS (dns_sd DNSServiceRefDeallocate "${DNS_SD_LOCATION}" 
HAVE_DNS_SD)
 ENDIF (HAVE_DNS_SD)
 
+SET (LIBLTDL_LOCATION "" CACHE STRING "Location where libltdl is installed.")
+MARK_AS_ADVANCED (LIBLTDL_LOCATION)
+CHECK_LIBRARY_EXISTS (ltdl lt_dlopenext "${LIBLTDL_LOCATION}" HAVE_LIBLTDL)
+
 SET (CMAKE_REQUIRED_INCLUDES math.h)
 SET (CMAKE_REQUIRED_LIBRARIES m)
 CHECK_FUNCTION_EXISTS (round HAVE_ROUND)
 SET (CMAKE_REQUIRED_INCLUDES)
 SET (CMAKE_REQUIRED_LIBRARIES)
 
-CHECK_LIBRARY_EXISTS (jpeg jpeg_read_header "" HAVE_LIBJPEG)
+SET (LIBJPEG_LOCATION "" CACHE STRING "Location where libjpeg is installed.")
+MARK_AS_ADVANCED (LIBJPEG_LOCATION)
+CHECK_LIBRARY_EXISTS (jpeg jpeg_read_header "${LIBJPEG_LOCATION}" HAVE_LIBJPEG)
 CHECK_INCLUDE_FILES ("stdio.h;jpeglib.h" HAVE_JPEGLIB_H)
 IF (HAVE_LIBJPEG AND HAVE_JPEGLIB_H)
     SET (HAVE_JPEG TRUE)
 ENDIF (HAVE_LIBJPEG AND HAVE_JPEGLIB_H)
+
 SET (CMAKE_REQUIRED_INCLUDES zlib.h)
 SET (CMAKE_REQUIRED_LIBRARIES z)
 CHECK_FUNCTION_EXISTS (compressBound HAVE_COMPRESSBOUND)
 SET (CMAKE_REQUIRED_INCLUDES)
 SET (CMAKE_REQUIRED_LIBRARIES)
 
-CHECK_LIBRARY_EXISTS (z compress2 "" HAVE_LIBZ)
+SET (LIBZ_LOCATION "" CACHE STRING "Location where libz is installed.")
+MARK_AS_ADVANCED (LIBZ_LOCATION)
+CHECK_LIBRARY_EXISTS (z compress2 "${LIBZ_LOCATION}" HAVE_LIBZ)
 CHECK_INCLUDE_FILES (zlib.h HAVE_ZLIB_H)
 IF (HAVE_LIBZ AND HAVE_ZLIB_H)
     SET (HAVE_Z TRUE)
 ENDIF (HAVE_LIBZ AND HAVE_ZLIB_H)
 
-CHECK_LIBRARY_EXISTS (rt clock_gettime "" HAVE_LIBRT)
+SET (LIBRT_LOCATION "" CACHE STRING "Location where librt is installed.")
+MARK_AS_ADVANCED (LIBRT_LOCATION)
+CHECK_LIBRARY_EXISTS (rt clock_gettime "${LIBRT_LOCATION}" HAVE_LIBRT)
 SET (CMAKE_REQUIRED_LIBRARIES rt)
 CHECK_FUNCTION_EXISTS (clock_gettime HAVE_CLOCK_GETTIME_FUNC)
 SET (CMAKE_REQUIRED_LIBRARIES)

Modified: code/player/trunk/config.h.in
===================================================================
--- code/player/trunk/config.h.in       2008-07-15 22:51:29 UTC (rev 6871)
+++ code/player/trunk/config.h.in       2008-07-16 01:26:03 UTC (rev 6872)
@@ -10,8 +10,6 @@
 #cmakedefine ENABLE_TCP_NODELAY 1
 
 #cmakedefine HAVE_GETADDRINFO 1
-//#cmakedefine HAVE_JPEGLIB_H 1
-//#cmakedefine HAVE_LIBJPEG 1
 #cmakedefine HAVE_JPEG 1
 #cmakedefine HAVE_LIBZ 1
 #cmakedefine HAVE_LINUX_JOYSTICK_H 1

Modified: code/player/trunk/server/drivers/camera/compress/CMakeLists.txt
===================================================================
--- code/player/trunk/server/drivers/camera/compress/CMakeLists.txt     
2008-07-15 22:51:29 UTC (rev 6871)
+++ code/player/trunk/server/drivers/camera/compress/CMakeLists.txt     
2008-07-16 01:26:03 UTC (rev 6872)
@@ -1,7 +1,12 @@
-PLAYERDRIVER_OPTION (cameracompress build_cameracompress ON)
-PLAYERDRIVER_REQUIRE_HEADER (cameracompress build_cameracompress jpeglib.h 
stdio.h)
-PLAYERDRIVER_ADD_DRIVER (cameracompress build_cameracompress LINKFLAGS 
"-ljpeg" SOURCES cameracompress.cc)
+IF (HAVE_JPEG)
+    PLAYERDRIVER_OPTION (cameracompress build_cameracompress ON)
+    PLAYERDRIVER_REQUIRE_HEADER (cameracompress build_cameracompress jpeglib.h 
stdio.h)
+    PLAYERDRIVER_ADD_DRIVER (cameracompress build_cameracompress LINKFLAGS 
"-ljpeg" SOURCES cameracompress.cc)
 
-PLAYERDRIVER_OPTION (camerauncompress build_camerauncompress ON)
-PLAYERDRIVER_REQUIRE_HEADER (camerauncompress build_camerauncompress jpeglib.h 
stdio.h)
-PLAYERDRIVER_ADD_DRIVER (camerauncompress build_camerauncompress LINKFLAGS 
"-ljpeg" SOURCES camerauncompress.cc)
+    PLAYERDRIVER_OPTION (camerauncompress build_camerauncompress ON)
+    PLAYERDRIVER_REQUIRE_HEADER (camerauncompress build_camerauncompress 
jpeglib.h stdio.h)
+    PLAYERDRIVER_ADD_DRIVER (camerauncompress build_camerauncompress LINKFLAGS 
"-ljpeg" SOURCES camerauncompress.cc)
+ELSE (HAVE_JPEG)
+    PLAYERDRIVER_OPTION (cameracompress build_cameracompress OFF "playerjpeg 
is not available.")
+    PLAYERDRIVER_OPTION (camerauncompress build_camerauncompress OFF 
"playerjpeg is not available.")
+ENDIF (HAVE_JPEG)


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