$OpenBSD: patch-PlugIns_OctreeZone_CMakeLists_txt,v 1.2 2012/10/07 19:53:05 dcoppa Exp $

Shared modules cannot be linked into another target

--- PlugIns/OctreeZone/CMakeLists.txt.orig	Sat Jan 14 18:40:39 2012
+++ PlugIns/OctreeZone/CMakeLists.txt	Sun Oct  7 20:16:59 2012
@@ -24,6 +24,22 @@ set (HEADER_FILES
 )
 
 set (SOURCE_FILES
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgreAntiPortal.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgreCapsule.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgreDefaultZone.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePCPlane.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePCZCamera.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePCZFrustum.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePCZLight.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePCZone.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePCZoneFactory.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePCZPlugin.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePCZSceneManager.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePCZSceneNode.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePCZSceneQuery.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePortal.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgrePortalBase.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../PCZSceneManager/src/OgreSegment.cpp
   src/OgreHeightmapTerrainZonePageSource.cpp
   src/OgreOctreeZone.cpp
   src/OgreOctreeZoneDll.cpp
@@ -41,18 +57,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../PCZ
 add_definitions(-D_USRDLL)
 
 add_library(Plugin_OctreeZone ${OGRE_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES})
-target_link_libraries(Plugin_OctreeZone OgreMain Plugin_PCZSceneManager)
+target_link_libraries(Plugin_OctreeZone OgreMain)
 if (NOT OGRE_STATIC)
   set_property(TARGET Plugin_OctreeZone PROPERTY
     COMPILE_DEFINITIONS OGRE_OCTREEZONEPLUGIN_EXPORTS)
-endif ()
-
-# need to include the plugins directory in the RPATH for OctreeZone to be able
-# to find the PCZSceneManager library
-if (UNIX)
-  set_property(TARGET Plugin_OctreeZone APPEND PROPERTY
-    INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE
-  )
 endif ()
 
 if (APPLE AND NOT OGRE_BUILD_PLATFORM_IPHONE)
