Ticket #32302: patch-Samples_CMakeLists.txt.diff

File patch-Samples_CMakeLists.txt.diff, 2.0 KB (added by marin.saric@…, 13 years ago)
  • Samples/CMakeLists.txt

    old new  
    156156 
    157157# Install sample sources
    158158if (OGRE_INSTALL_SAMPLES_SOURCE)
    159   if (WIN32 OR APPLE)
     159  if (WIN32)
    160160    set(OGRE_SAMPLES_DIR Samples)
     161  elseif(APPLE)
     162    if (NOT MACPORTS)
     163      set(OGRE_SAMPLES_DIR Samples)
     164    else()
     165      set(OGRE_SAMPLES_DIR ${MACPORTS_SAMPLES_SOURCE_DIR})
     166    endif()
    161167  elseif (UNIX)
    162168    set(OGRE_SAMPLES_DIR share/OGRE/Samples)
    163169  endif ()
    164170  install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${OGRE_SAMPLES_DIR}
    165171    REGEX "^CMakeLists.txt$" EXCLUDE
     172    PATTERN "SDK_CMakeLists.txt" EXCLUDE
     173    PATTERN "cmake_install.cmake" EXCLUDE
     174    PATTERN "CMakeFiles" EXCLUDE
    166175    PATTERN "Makefile.am" EXCLUDE
     176    PATTERN "Makefile" EXCLUDE
    167177    PATTERN "Media" EXCLUDE
    168178    PATTERN "bin" EXCLUDE
    169179    PATTERN "setup" EXCLUDE
     
    172182        PATTERN "scripts" EXCLUDE
    173183  )
    174184  # install a new CMakeLists.txt file to allow building of samples
    175   configure_file(${OGRE_TEMPLATES_DIR}/SDK_CMakeLists.txt.in ${CMAKE_CURRENT_BINARY_DIR}/../CMakeLists.txt @ONLY)
    176   configure_file(${OGRE_TEMPLATES_DIR}/SDK_Samples_CMakeLists.txt.in ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt @ONLY)
    177   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../CMakeLists.txt DESTINATION ${OGRE_SAMPLES_DIR}/../)
    178   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt DESTINATION ${OGRE_SAMPLES_DIR})
     185  configure_file(${OGRE_TEMPLATES_DIR}/SDK_CMakeLists.txt.in ${CMAKE_CURRENT_BINARY_DIR}/../SDK_CMakeLists.txt @ONLY)
     186  configure_file(${OGRE_TEMPLATES_DIR}/SDK_Samples_CMakeLists.txt.in ${CMAKE_CURRENT_BINARY_DIR}/SDK_CMakeLists.txt @ONLY)
     187  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../SDK_CMakeLists.txt DESTINATION ${OGRE_SAMPLES_DIR}/../ RENAME CMakeLists.txt)
     188  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/SDK_CMakeLists.txt DESTINATION ${OGRE_SAMPLES_DIR}/ RENAME CMakeLists.txt)
    179189endif ()
    180190
    181191# Install sample headers, some people rely on these