Ticket #32302: patch-CMakeLists.txt.diff

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

    old new  
    6060set(OGRE_TEMPLATES_DIR "${OGRE_SOURCE_DIR}/CMake/Templates")
    6161set(OGRE_WORK_DIR ${OGRE_BINARY_DIR})
    6262
     63####################
     64# MACPORTS variables
     65####################
     66
     67set(MACPORTS FALSE CACHE BOOL "Build OGRE for MacPorts")
     68set(MACPORTS_APP_DIR "/Applications/MacPorts" CACHE STRING
     69  "The MacPorts Applications directory")
     70set(MACPORTS_OGRE_APP_DIR "${MACPORTS_APP_DIR}/OGRE" CACHE STRING
     71  "The OGRE directory in MacPorts Applications")
     72set(MACPORTS_CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/cmake/modules"
     73  CACHE STRING
     74  "The path to MacPorts user-installed CMake modules")
     75set(MACPORTS_SAMPLES_DIR "${MACPORTS_OGRE_APP_DIR}/SDKSamples" CACHE STRING
     76  "The path to OGRE Samples directory in a MacPorts distribution")
     77set(MACPORTS_SAMPLES_SOURCE_DIR "${MACPORTS_SAMPLES_DIR}/Samples" CACHE STRING
     78  "The path where the sample source code will be installed")
     79set(MACPORTS_OGRE_DOCS_PATH "${MACPORTS_OGRE_APP_DIR}/Docs" CACHE STRING
     80  "The path where the Ogre Documentation will be installed")
     81set(MACPORTS_OGRE_TOOLS_PATH "${MACPORTS_OGRE_APP_DIR}/Tools" CACHE STRING
     82  "Where the Ogre Tools will go")
    6383
    6484#####################################################################
    6585# Set up the basic build environment
     
    168188    set(OGRE_STATIC TRUE)
    169189  else ()
    170190    include_directories("${OGRE_SOURCE_DIR}/OgreMain/include/OSX")
     191    # If OGRE_STATIC, force CMake to select static versions
     192    # of dependent libraries on MacOS X
     193    if(OGRE_STATIC)
     194      SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.framework")
     195    endif ()
    171196  endif ()
    172197endif (APPLE)
    173198
     
    215240elseif (APPLE AND NOT OGRE_BUILD_PLATFORM_IPHONE)
    216241
    217242  # Set 10.5 as the base SDK by default
    218   set(XCODE_ATTRIBUTE_SDKROOT macosx)
    219   set(CMAKE_OSX_SYSROOT macosx)
     243  #set(XCODE_ATTRIBUTE_SDKROOT macosx)
     244  #set(CMAKE_OSX_SYSROOT macosx)
    220245  set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
    221246
    222247  if (NOT CMAKE_OSX_ARCHITECTURES)
    223     set(CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_64_BIT))
     248    if (ARCHS_STANDARD_32_64_BIT)
     249      set(CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_64_BIT))
     250    endif()
    224251  endif()
    225252
    226253  # Make sure that the OpenGL render system is selected for non-iPhone Apple builds