manta.cmake 1.85 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
add_external_project(
  manta
  DEPENDS libxml2 zlib
  CMAKE_ARGS
    -DBUILD_SHARED_LIBS:BOOL=OFF
    -DBUILD_TESTING:BOOL=OFF
    -DMANTA_ENABLE_X11:BOOL=OFF
    -DSCENE_0:BOOL=OFF
    -DSCENE_AREA_LIGHT:BOOL=OFF
    -DSCENE_BEACH:BOOL=OFF
    -DSCENE_COMPLEXITYTEST:BOOL=OFF
    -DSCENE_CUBE_WORLD:BOOL=OFF
    -DSCENE_EXTERNAL_OBJECT:BOOL=OFF
    -DSCENE_FENCE:BOOL=OFF
    -DSCENE_GALILEO:BOOL=OFF
    -DSCENE_GRIDISOVOL:BOOL=OFF
    -DSCENE_HDRI:BOOL=OFF
    -DSCENE_MACBETH:BOOL=OFF
    -DSCENE_OCTISOVOL:BOOL=OFF
    -DSCENE_PRIMTEST:BOOL=OFF
    -DSCENE_SOFT_SHADOW:BOOL=OFF
    -DSCENE_TEAPOT_ROOM:BOOL=OFF
    -DSCENE_TRIANGLESCENEVIEWER:BOOL=OFF
    -DSCENE_TYLENOL:BOOL=OFF
    -DSCENE_VALUE_COLORMAP:BOOL=OFF
    -DSCENE_VORPAL:BOOL=OFF
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
27 28

    # turn off SSE on 32-bit builds.
29
    -DMANTA_SSE:BOOL=${64bit_build}
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
30 31
  INSTALL_COMMAND
    ${CMAKE_COMMAND} -E copy_directory <BINARY_DIR>/lib <INSTALL_DIR>/lib
32
)
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

if (UNIX AND NOT APPLE)
  add_external_project_step(patch1
      COMMENT "Fixing missing include files."
      COMMAND ${CMAKE_COMMAND} -E copy_if_different
              "${SuperBuild_PROJECTS_DIR}/patches/manta.Core.Thread.Thread.cc"
              "<SOURCE_DIR>/Core/Thread/Thread.cc"
      DEPENDEES update
      DEPENDERS patch)

  add_external_project_step(patch2
      COMMENT "Fixing missing include files."
      COMMAND ${CMAKE_COMMAND} -E copy_if_different
              "${SuperBuild_PROJECTS_DIR}/patches/manta.Core.Containers.Array3.h"
              "<SOURCE_DIR>/Core/Containers/Array3.h"
      DEPENDEES update
      DEPENDERS patch)

  add_external_project_step(patch3
    COMMENT "Fixing missing target link libraries for 'dl'."
      COMMAND ${CMAKE_COMMAND} -E copy_if_different
              "${SuperBuild_PROJECTS_DIR}/patches/manta.Core.CMakeLists.txt"
              "<SOURCE_DIR>/Core/CMakeLists.txt"
      DEPENDEES update
      DEPENDERS patch)
endif()