--- Samples/CMakeLists.txt.orig	2011-11-09 19:25:59.000000000 +0100
+++ Samples/CMakeLists.txt	2011-11-12 18:36:57.000000000 +0100
@@ -156,14 +156,24 @@
   
 # Install sample sources
 if (OGRE_INSTALL_SAMPLES_SOURCE)
-  if (WIN32 OR APPLE)
+  if (WIN32)
     set(OGRE_SAMPLES_DIR Samples)
+  elseif(APPLE)
+    if (NOT MACPORTS)
+      set(OGRE_SAMPLES_DIR Samples)
+    else()
+      set(OGRE_SAMPLES_DIR ${MACPORTS_SAMPLES_SOURCE_DIR})
+    endif()
   elseif (UNIX)
     set(OGRE_SAMPLES_DIR share/OGRE/Samples)
   endif ()
   install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${OGRE_SAMPLES_DIR}
     REGEX "^CMakeLists.txt$" EXCLUDE
+    PATTERN "SDK_CMakeLists.txt" EXCLUDE
+    PATTERN "cmake_install.cmake" EXCLUDE
+    PATTERN "CMakeFiles" EXCLUDE
     PATTERN "Makefile.am" EXCLUDE
+    PATTERN "Makefile" EXCLUDE
     PATTERN "Media" EXCLUDE
     PATTERN "bin" EXCLUDE
     PATTERN "setup" EXCLUDE
@@ -172,10 +182,10 @@
 	PATTERN "scripts" EXCLUDE
   )
   # install a new CMakeLists.txt file to allow building of samples
-  configure_file(${OGRE_TEMPLATES_DIR}/SDK_CMakeLists.txt.in ${CMAKE_CURRENT_BINARY_DIR}/../CMakeLists.txt @ONLY)
-  configure_file(${OGRE_TEMPLATES_DIR}/SDK_Samples_CMakeLists.txt.in ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt @ONLY)
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../CMakeLists.txt DESTINATION ${OGRE_SAMPLES_DIR}/../)
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt DESTINATION ${OGRE_SAMPLES_DIR})
+  configure_file(${OGRE_TEMPLATES_DIR}/SDK_CMakeLists.txt.in ${CMAKE_CURRENT_BINARY_DIR}/../SDK_CMakeLists.txt @ONLY)
+  configure_file(${OGRE_TEMPLATES_DIR}/SDK_Samples_CMakeLists.txt.in ${CMAKE_CURRENT_BINARY_DIR}/SDK_CMakeLists.txt @ONLY)
+  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../SDK_CMakeLists.txt DESTINATION ${OGRE_SAMPLES_DIR}/../ RENAME CMakeLists.txt)
+  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/SDK_CMakeLists.txt DESTINATION ${OGRE_SAMPLES_DIR}/ RENAME CMakeLists.txt)
 endif ()
 
 # Install sample headers, some people rely on these
