CMakeLists.txt 993 Bytes
Newer Older
Ellen Dekkers's avatar
Ellen Dekkers committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
include (ACGCommon)

include_directories (
  ../../..
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${GLUT_INCLUDE_DIR}
  ${QT_INCLUDE_DIR}
)


# collect all header and source files
acg_append_files (headers "*.hh" .)
acg_append_files (sources "*.cc" .)

list (APPEND sources "../QtViewer/QGLViewerWidget.cc")
list (APPEND sources "../QtViewer/MeshViewerWidgetT.cc")

list (APPEND headers "../QtViewer/QGLViewerWidget.hh")
list (APPEND headers "../QtViewer/MeshViewerWidgetT.hh")

# remove template cc files from source file list
acg_drop_templates (sources)

if (WIN32)
25
  acg_add_executable( ProgViewer WIN32 ${sources} ${headers})
Ellen Dekkers's avatar
Ellen Dekkers committed
26
  # link to qtmain library to get WinMain function for a non terminal app
27
  target_link_libraries( ProgViewer ${QT_QTMAIN_LIBRARY})
Ellen Dekkers's avatar
Ellen Dekkers committed
28
else ()
29
  acg_add_executable( ProgViewer ${sources} ${headers})
Ellen Dekkers's avatar
Ellen Dekkers committed
30 31
endif ()

32
target_link_libraries ( ProgViewer
Ellen Dekkers's avatar
Ellen Dekkers committed
33 34 35 36 37 38 39
  OpenMeshCore
  OpenMeshTools
  ${QT_LIBRARIES}
  ${OPENGL_LIBRARIES}
  ${GLUT_LIBRARIES}
)