CMakeLists.txt 3.76 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
27
28
29
30
# Source files of Common library
set( Common_SOURCES 
        mvdAboutDialog.cxx
        mvdAbstractImageModel.cxx
        mvdAbstractModelController.cxx
        mvdAbstractModel.cxx
        mvdAbstractViewManipulator.cxx
        mvdAlgorithm.cxx
        mvdColorBandDynamicsWidget.cxx
        mvdColorDynamicsController.cxx
        mvdColorDynamicsWidget.cxx
        mvdColorSetupController.cxx
        mvdColorSetupWidget.cxx
        mvdDatasetCreationProgressDialog.cxx
        mvdDatasetDescriptor.cxx
        mvdDatasetModel.cxx
        mvdGLImageWidget.cxx
        mvdGui.cxx
        mvdHistogramModel.cxx
        mvdI18nApplication.cxx
        mvdImageModelRenderer.cxx
        mvdImageViewManipulator.cxx
        mvdMath.cxx
        mvdQuicklookModel.cxx
        mvdQuicklookViewManipulator.cxx
        mvdStatusBarWidget.cxx
        mvdSystemError.cxx
        mvdTypes.cxx
        mvdVectorImageModel.cxx
Otmane Lahlou's avatar
Otmane Lahlou committed
31
        mvdApplicationsToolBox.cxx
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
)

# Headers for classes with Q_OBJECT macro (needs to go to Qt moc)
set( Common_HEADERS_MOC
        mvdAboutDialog.h
        mvdAbstractImageModel.h
        mvdAbstractModelController.h
        mvdAbstractModel.h
        mvdAbstractModelRenderer.h
        mvdAbstractViewManipulator.h
        mvdColorBandDynamicsWidget.h
        mvdColorDynamicsController.h
        mvdColorDynamicsWidget.h
        mvdColorSetupController.h
        mvdColorSetupWidget.h
        mvdDatasetCreationProgressDialog.h
        mvdDatasetDescriptor.h
        mvdDatasetModel.h
        mvdGLImageWidget.h
        mvdHistogramModel.h
        mvdI18nApplication.h
        mvdImageModelRenderer.h
        mvdImageViewManipulator.h
        mvdQuicklookModel.h
        mvdQuicklookViewManipulator.h
        mvdStatusBarWidget.h
        mvdVectorImageModel.h
Otmane Lahlou's avatar
Otmane Lahlou committed
59
        mvdApplicationsToolBox.h
60
61
62
63
64
65
66
67
68
69
70
71
)

# Qt designer UI files
set( Common_FORMS
        mvdAboutDialog.ui
        mvdColorBandDynamicsWidget.ui
        mvdColorDynamicsWidget.ui
        mvdColorSetupWidget.ui
        mvdDatasetCreationProgressDialog.ui
        mvdMyWidget.ui
        mvdStatusBarWidget.ui
        mvdVideoColorToolBox.ui
Otmane Lahlou's avatar
Otmane Lahlou committed
72
        mvdApplicationsToolBox.ui
73
74
75
76
77
)

# Qt resources
set( Common_RESOURCES
)
78

79
80
81
82
83
84
include_directories(
  ${Monteverdi2_BINARY_DIR}
  ${Monteverdi2_SOURCE_DIR}/Code/Common
  ${Monteverdi2_BINARY_DIR}/Code/Common
)

85
86
#############################################################################
# Qt4 wrapped files.
87
qt4_wrap_cpp( Common_SRC_MOC ${Common_HEADERS_MOC} )
88
89
qt4_wrap_ui( Common_FORMS_HEADERS ${Common_FORMS}  )
qt4_add_resources( Common_RESOURCES_RCC ${Common_RESOURCES} )
90

91
92
93
94
95
96
########################################################################
# Qt4 translations.

# Sources files to translate.
add_to_qt4_i18n_sources( 
  ${Common_SOURCES}
97
  ${Common_HEADERS_MOC}
98
  ${Common_FORMS}
99
100
)

101
#############################################################################
102
103
104
add_library(Monteverdi2_Common
  ${Common_SOURCES}
  ${Common_FORMS_HEADERS}
105
  ${Common_SRC_MOC}
106
  ${Common_RESOURCES_RCC}
107
108
109
)

#############################################################################
Stéphane Albert's avatar
Stéphane Albert committed
110
target_link_libraries(Monteverdi2_Common
111
  OTBIO
112
  ${OPENGL_LIBRARIES}
113
  ${QT_LIBRARIES}
114
115
116
117
  Qt4::QtCore
  Qt4::QtGui
  Qt4::QtOpenGL
  Qt4::QtXml
118
119
)

120
121
122
123
set_target_properties(Monteverdi2_Common
  PROPERTIES ${Monteverdi2_LIBRARY_PROPERTIES}
)

124
#############################################################################
125
# INSTALL Common application.
126
127
128
129
130
install(
  TARGETS Monteverdi2_Common
  RUNTIME DESTINATION ${Monteverdi2_INSTALL_BIN_DIR} COMPONENT Runtime
  LIBRARY DESTINATION ${Monteverdi2_INSTALL_LIB_DIR} COMPONENT Runtime
  ARCHIVE DESTINATION ${Monteverdi2_INSTALL_LIB_DIR} COMPONENT Development
131
132
133
)

#############################################################################