Re: [osg-users] OSG 2.5 and cmake

2008-05-25 Thread Robert Osfield
H Philip,

On Sat, May 24, 2008 at 3:19 PM, Philip Lowman [EMAIL PROTECTED] wrote:
 FIND_PACKAGE(PkgConfig)

 IF(PKG_CONFIG_FOUND)
# use pkg_check_modules()
 ENDIF(PKG_CONFIG_FOUND)

I've just gone ahead and implement this approach, it's now checked into SVN.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG 2.5 and cmake

2008-05-24 Thread Philip Lowman
On Wed, May 21, 2008 at 10:50 AM, [EMAIL PROTECTED] wrote:


 Sorry if this has come up before...
 I'm attempting to compile OSG 2.5 and when I do the ./configure, I get:
 CMake Error: Error in cmake code at
 /OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/CMakeLists.txt:214:
 INCLUDE Could not find include file: FindPkgConfig
 Current CMake stack:
 /OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/CMakeLists.txt;/OSG_PATH/cmake-2.4.6-Linux-i386/share/cmake-2.4/Modules/CMakeCInformation.cmake;/OSG_PATH/cmake-2.4.6-Linux-i386/share/cmake-2.4/Modules/CMakeCXXInformation.cmake;/OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/FindPkgConfig
 CMake Error: Error in cmake code at
 /OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/CMakeLists.txt:216:
 Unknown CMake command PKG_CHECK_MODULES.
 -- Configuring done
 When I look in the cmake 2.4.6 directory, I don't see a file called
 FindPkgConfig... However, if I look in CMAKE 2.6, I see such a file...  The
 readme for OSG says it needs 2.4.6 or newer.. Did this requirement change.
 It seems that a change was made to CMakeLists.txt in early May which causes
 this include to now be used.


This is a bug in OSG's build scripts.

Since OSG is now using PKG_CHECK_MODULES (which was introduced in CMake
2.4.7) someone should either:

  1. Bump CMAKE_MINIMUM_REQUIRED() to 2.4.7 at the top of the root
CMakeLists.txt file to provide a more friendly warning for users that they
need a newer version, or
  2. Add checks around the usage of PKG_CHECK_MODULES.  People using the
older versions of CMake prior to 2.4.7 would not be able to link against the
new dependencies but they would still be able to configure and build without
error.

FIND_PACKAGE(PkgConfig)

IF(PKG_CONFIG_FOUND)
   # use pkg_check_modules()
ENDIF(PKG_CONFIG_FOUND)

-- 
Philip Lowman
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG 2.5 and cmake

2008-05-21 Thread paul1492

Sorry if this has come up before...
I'm attempting to compile OSG 2.5 and when I do the ./configure, I get:
CMake Error: Error in cmake code at
/OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/CMakeLists.txt:214:
INCLUDE Could not find include file: FindPkgConfig
Current CMake stack: 
/OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/CMakeLists.txt;/OSG_PATH/cmake-2.4.6-Linux-i386/share/cmake-2.4/Modules/CMakeCInformation.cmake;/OSG_PATH/cmake-2.4.6-Linux-i386/share/cmake-2.4/Modules/CMakeCXXInformation.cmake;/OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/FindPkgConfig
CMake Error: Error in cmake code at
/OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/CMakeLists.txt:216:
Unknown CMake command PKG_CHECK_MODULES.
-- Configuring done
When I look in the cmake 2.4.6 directory, I don't see a file called 
FindPkgConfig... However, if I look in CMAKE 2.6, I see such a file...  The 
readme for OSG says it needs 2.4.6 or newer.. Did this requirement change. It 
seems that a change was made to CMakeLists.txt in early May which causes this 
include to now be used.
Paul


  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org