From b8841f211d3f146af94980ad0bd0afed59aad08e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 5 May 2007 16:24:07 +0000 Subject: [PATCH] Added preliminary Performer plugin support, note, still missing are a range of Performer database libs that will be required. --- CMakeLists.txt | 1 + CMakeModules/FindPerformer.cmake | 55 +++++++++++++++++++++++++++++++ src/osgPlugins/ToPortToCmake.txt | 3 +- src/osgPlugins/pfb/CMakeLists.txt | 15 +++++++++ 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 CMakeModules/FindPerformer.cmake create mode 100644 src/osgPlugins/pfb/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index aa6350322..c9d08feca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,6 +127,7 @@ FIND_PACKAGE(Jasper) FIND_PACKAGE(COLLADA) FIND_PACKAGE(Xine) FIND_PACKAGE(OpenVRML) +FIND_PACKAGE(Performer) # Platform specific: # (We can approach this one of two ways. We can try to FIND everything diff --git a/CMakeModules/FindPerformer.cmake b/CMakeModules/FindPerformer.cmake new file mode 100644 index 000000000..ea6ab83bd --- /dev/null +++ b/CMakeModules/FindPerformer.cmake @@ -0,0 +1,55 @@ +# Locate Performer +# This module defines +# PERFORMER_LIBRARY +# PERFORMER_FOUND, if false, do not try to link to gdal +# PERFORMER_INCLUDE_DIR, where to find the headers +# +# $PERFORMER_DIR is an environment variable that would +# correspond to the ./configure --prefix=$PERFORMER_DIR +# +# Created by Robert Osfield. + +FIND_PATH(PERFORMER_INCLUDE_DIR Performer/pfdu.h + $ENV{PERFORMER_DIR}/include + $ENV{PERFORMER_DIR} + $ENV{OSGDIR}/include + $ENV{OSGDIR} + $ENV{OSG_ROOT}/include + ~/Library/Frameworks + /Library/Frameworks + /usr/local/include + /usr/include + /sw/include # Fink + /opt/local/include # DarwinPorts + /opt/csw/include # Blastwave + /opt/include + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include + /usr/freeware/include +) + +FIND_LIBRARY(PERFORMER_LIBRARY + NAMES pf + PATHS + $ENV{PERFORMER_DIR}/lib + $ENV{PERFORMER_DIR} + $ENV{OSGDIR}/lib + $ENV{OSGDIR} + $ENV{OSG_ROOT}/lib + ~/Library/Frameworks + /Library/Frameworks + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib + /usr/freeware/lib64 +) + +SET(PERFORMER_FOUND "NO") +IF(PERFORMER_LIBRARY AND PERFORMER_INCLUDE_DIR) + SET(PERFORMER_FOUND "YES") +ENDIF(PERFORMER_LIBRARY AND PERFORMER_INCLUDE_DIR) + + diff --git a/src/osgPlugins/ToPortToCmake.txt b/src/osgPlugins/ToPortToCmake.txt index 068b6869f..c32344081 100644 --- a/src/osgPlugins/ToPortToCmake.txt +++ b/src/osgPlugins/ToPortToCmake.txt @@ -1,4 +1,3 @@ dae - ported but not linking properly -pfb -vrml +pfb - ported but will need many additional libs diff --git a/src/osgPlugins/pfb/CMakeLists.txt b/src/osgPlugins/pfb/CMakeLists.txt new file mode 100644 index 000000000..ad11a0d67 --- /dev/null +++ b/src/osgPlugins/pfb/CMakeLists.txt @@ -0,0 +1,15 @@ +INCLUDE_DIRECTORIES( ${PERFORMER_INCLUDE_DIR} ) + +SET(TARGET_SRC + ReaderWriterPFB.cpp + ConvertFromPerformer.cpp +) + +SET(TARGET_H + ConvertFromPerformer.h +) + +SET(TARGET_LIBRARIES_VARS PERFORMER_LIBRARY ) + +#### end var setup ### +SETUP_PLUGIN(pfb)