CMakeLists.txt 1.19 KB
Newer Older
1 2
include(plugin)

3 4
SET( CURRENT_PLUGIN_DEPS "")

5 6 7
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/PolyhedralMesh)
    add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT)
    add_definitions (-DENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT)
8 9

    list( APPEND CURRENT_PLUGIN_DEPS OpenVolumeMesh )
10 11 12 13
endif()

if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/HexahedralMesh)
    add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT)
14 15 16
    add_definitions (-DENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT)    

    list( APPEND CURRENT_PLUGIN_DEPS OpenVolumeMesh )
17
endif()
18

19 20 21 22
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/BSplineSurface)
    add_definitions (-DENABLE_BSPLINESURFACE_SUPPORT)
endif()

23 24
list(REMOVE_DUPLICATES CURRENT_PLUGIN_DEPS )

25 26 27 28 29 30
# use Qwt6 for QT5
if (NOT FORCE_QT4 AND QT5_FOUND)
  find_package(Qwt6)

  if (QWT6_FOUND)
    add_definitions(-DWITH_QWT)
Jan Möbius's avatar
Jan Möbius committed
31
    openflipper_plugin( DEPS ${CURRENT_PLUGIN_DEPS} Qwt6)
32
  else()
33
    openflipper_plugin( DEPS ${CURRENT_PLUGIN_DEPS})
34
  endif()
35
else()
36 37 38 39
  find_package(Qwt5)

  if(Qwt5_Qt4_FOUND)
    add_definitions(-DWITH_QWT)
Jan Möbius's avatar
Jan Möbius committed
40
    openflipper_plugin( DEPS ${CURRENT_PLUGIN_DEPS} Qwt5)
41
  else()
42
    openflipper_plugin(DEPS ${CURRENT_PLUGIN_DEPS})
43
  endif()
44
endif()