Revision: 6626
http://playerstage.svn.sourceforge.net/playerstage/?rev=6626&view=rev
Author: jeremy_asher
Date: 2008-06-17 13:32:31 -0700 (Tue, 17 Jun 2008)
Log Message:
-----------
Fixed Player version checking
Modified Paths:
--------------
code/stage/trunk/CMakeLists.txt
code/stage/trunk/libstageplugin/CMakeLists.txt
Modified: code/stage/trunk/CMakeLists.txt
===================================================================
--- code/stage/trunk/CMakeLists.txt 2008-06-17 19:25:03 UTC (rev 6625)
+++ code/stage/trunk/CMakeLists.txt 2008-06-17 20:32:31 UTC (rev 6626)
@@ -8,7 +8,7 @@
SET( APIVERSION ${V_MAJOR}.${V_MINOR} )
# minimum version of Player to build the plugin
-SET( MIN_PLAYER 2.2.0 ) # change once plugin is fixed
+SET( MIN_PLAYER 2.1.0 )
cmake_minimum_required( VERSION 2.4 FATAL_ERROR )
@@ -30,7 +30,25 @@
pkg_search_module( GLIB REQUIRED glib-2.0 )
find_package( OpenGL REQUIRED )
-pkg_search_module( PLAYER playercore )
+# Look for player v${MIN_PLAYER} or higher and set flags
+# built-ins don't work properly, so use pkg-config directly
+FIND_PROGRAM (PKGCONFIG NAMES pkg-config)
+IF (PKGCONFIG)
+ EXECUTE_PROCESS (COMMAND pkg-config --atleast-version=${MIN_PLAYER}
playercore --silence-errors
+ RESULT_VARIABLE PLAYER_NOT_FOUND)
+ IF (PLAYER_NOT_FOUND EQUAL 0)
+ # found the correct version
+ pkg_search_module( PLAYER playercore )
+ MESSAGE(STATUS " Player headers found in
${PLAYER_INCLUDE_DIRS}")
+ MESSAGE(STATUS " Player libs found in ${PLAYER_LIBRARY_DIRS}")
+ SET (PLAYER_FOUND TRUE)
+ ELSE (PLAYER_NOT_FOUND EQUAL 0)
+ MESSAGE(STATUS "Player >=v${MIN_PLAYER} not found, skipping
Player plugin")
+ SET (PLAYER_FOUND FALSE)
+ ENDIF (PLAYER_NOT_FOUND EQUAL 0)
+ELSE (PKGCONFIG)
+ MESSAGE (STATUS "pkg-config not found, skipping Player plugin")
+ENDIF (PKGCONFIG)
# find FLTK and set flags
@@ -79,12 +97,11 @@
# work through these subdirs
ADD_SUBDIRECTORY(libstage)
ADD_SUBDIRECTORY(examples)
+IF ( PLAYER_FOUND )
+ ADD_SUBDIRECTORY(libstageplugin)
+ENDIF ( PLAYER_FOUND )
-if( PLAYER_FOUND )
-ADD_SUBDIRECTORY(libstageplugin)
-endif( PLAYER_FOUND )
-
INSTALL(FILES rgb.txt stagelogo.png
DESTINATION share/stage
)
Modified: code/stage/trunk/libstageplugin/CMakeLists.txt
===================================================================
--- code/stage/trunk/libstageplugin/CMakeLists.txt 2008-06-17 19:25:03 UTC
(rev 6625)
+++ code/stage/trunk/libstageplugin/CMakeLists.txt 2008-06-17 20:32:31 UTC
(rev 6626)
@@ -1,7 +1,6 @@
link_directories( ${PLAYER_LIBDIR} )
include_directories( ${PLAYER_INCLUDE_DIRS})
-message( PLAYER INCLUDE ${PLAYER_INCLUDE_DIRS} )
add_library( stageplugin MODULE
p_driver.cc
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit