CMakeLists.txt 1.2 KB
Newer Older
Jan Möbius's avatar
 
Jan Möbius committed
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
list(REMOVE_DUPLICATES CURRENT_PLUGIN_DEPS )

21 22 23 24 25 26
# use Qwt6 for QT5
if (NOT FORCE_QT4 AND QT5_FOUND)
  find_package(Qwt6)

  if (QWT6_FOUND)
    add_definitions(-DWITH_QWT)
27 28 29
    openflipper_plugin( DEPS ${CURRENT_PLUGIN_DEPS}
			INCDIRS ${QWT6_INCLUDE_DIRS} 
			LIBRARIES ${QWT6_LIBRARIES})
30
  else()
31
    openflipper_plugin( DEPS ${CURRENT_PLUGIN_DEPS})
32
  endif()
33
else()
34 35 36 37
  find_package(Qwt5)

  if(Qwt5_Qt4_FOUND)
    add_definitions(-DWITH_QWT)
38 39 40
    openflipper_plugin( DEPS ${CURRENT_PLUGIN_DEPS}
		        INCDIRS ${Qwt5_INCLUDE_DIR} 
			LIBRARIES ${Qwt5_Qt4_LIBRARY})
41
  else()
42
    openflipper_plugin(DEPS ${CURRENT_PLUGIN_DEPS})
43
  endif()
44
endif()