CMakeLists.txt 1.55 KB
Newer Older
Jan Möbius's avatar
   
Jan Möbius committed
1
include (ACGCommon)
Jan Möbius's avatar
   
Jan Möbius committed
2
3
4

include_directories (
  ..
Jan Möbius's avatar
   
Jan Möbius committed
5
  ${CMAKE_SOURCE_DIR}/OpenMesh/src
Jan Möbius's avatar
   
Jan Möbius committed
6
7
8
9
10
11
12
13
14
15
16
17
  ${CMAKE_SOURCE_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${OPENGL_INCLUDE_DIR}
  ${GLEW_INCLUDE_DIR}
  ${GLUT_INCLUDE_DIR}
)

link_directories (
  ${GLEW_LIBRARY_DIR}
)

Jan Möbius's avatar
Jan Möbius committed
18
# source code directories
Jan Möbius's avatar
   
Jan Möbius committed
19
20
21
22
23
24
25
26
27
set (directories 
  ../BasePlugin 
  ../ACGHelper 
  ../common 
  ../common/bsp  
  ../INIFile 
  ../widgets/glWidget
)

Jan Möbius's avatar
Jan Möbius committed
28
# generate dllexport macros on windows
Jan Möbius's avatar
   
Jan Möbius committed
29
30
31
32
33
34
if (WIN32)
  add_definitions (
    -DPLUGINLIBDLL
  )
endif ()

Jan Möbius's avatar
   
Jan Möbius committed
35
36
# define core version
add_definitions (
Jan Möbius's avatar
Jan Möbius committed
37
    -DCORE_VERSION="${OPENFLIPPER_VERSION}"
Jan Möbius's avatar
   
Jan Möbius committed
38
39
)

Jan Möbius's avatar
Jan Möbius committed
40
# collect all header,source and ui files
Jan Möbius's avatar
   
Jan Möbius committed
41
42
43
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (ui "*.ui" ${directories})
Jan Möbius's avatar
   
Jan Möbius committed
44

Jan Möbius's avatar
Jan Möbius committed
45
# add additional object type sources
Jan Möbius's avatar
   
Jan Möbius committed
46
47
acg_append_files_recursive (headers "*.hh" ${CMAKE_SOURCE_DIR}/ObjectTypes)
acg_append_files_recursive (sources "*.cc" ${CMAKE_SOURCE_DIR}/ObjectTypes)
Jan Möbius's avatar
   
Jan Möbius committed
48

Jan Möbius's avatar
Jan Möbius committed
49
# remove template cc files from source file list
Jan Möbius's avatar
   
Jan Möbius committed
50
acg_drop_templates (sources)
Jan Möbius's avatar
   
Jan Möbius committed
51

Jan Möbius's avatar
Jan Möbius committed
52
# genereate uic and moc targets
Jan Möbius's avatar
   
Jan Möbius committed
53
54
acg_qt4_autouic (uic_targets ${ui})
acg_qt4_automoc (moc_targets ${headers})
Jan Möbius's avatar
   
Jan Möbius committed
55

Jan Möbius's avatar
   
Jan Möbius committed
56
acg_add_library (PluginLib SHARED ${uic_targets} ${sources} ${headers} ${moc_targets})
Jan Möbius's avatar
   
Jan Möbius committed
57

Jan Möbius's avatar
Jan Möbius committed
58
59
60
61
set (trans_files ${sources})
list (APPEND trans_files ${ui})
list (APPEND trans_files ${headers})
acg_add_translations (PluginLib "de_DE" "${trans_files}")
62

Jan Möbius's avatar
   
Jan Möbius committed
63
64
65
66
67
68
69
70
71
72
target_link_libraries (PluginLib
  OpenMeshCore
  OpenMeshTools
  ACG
  ${QT_LIBRARIES}
  ${OPENGL_LIBRARIES}
  ${GLEW_LIBRARY}
  ${GLUT_LIBRARIES}
  ${FTGL_LIBS}
)