0024469: cmake mfcsample project skippes ParamsFacesPage
[occt.git] / samples / mfc / standard / mfcsample / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2
3 project (mfcsample)
4
5 add_definitions(-DWINVER=0x0500 -D_AFXEXT)
6
7 # mfcsample
8 set (mfcsample_SOURCE_FILES ${MFC_STANDARD_SAMPLES_DIR}/mfcsample/src/mfcsample.cpp
9                             ${MFC_STANDARD_SAMPLES_DIR}/mfcsample/src/StdAfx.cpp )
10
11 SET (MFC_STANDARD_COMMON_SAMPLES_DIR "${MFC_STANDARD_SAMPLES_DIR}/Common")
12 set (COMMON_SOURCE_FILES ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AISDialogs.cpp
13                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_2dDoc.cpp
14                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_2dChildFrame.cpp
15                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_2dView.cpp
16                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_3dBaseDoc.cpp
17                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_App.cpp
18                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_3dDoc.cpp
19                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_3dChildFrame.cpp
20                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_3dView.cpp
21                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_BaseDoc.cpp
22                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_BaseChildFrame.cpp
23                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_BaseView.cpp
24                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_MainFrame.cpp
25                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ParamsFacesPage.cpp
26                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ResultDialog.cpp
27                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/User_Cylinder.cxx
28                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ColoredMeshDlg.cpp
29                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/DimensionDlg.cpp
30                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsEdgePage.cpp
31                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsVerticesPage.cpp
32                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/RadiusParamsPage.cpp
33                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsEdgesPage.cpp
34                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsVerticesPage.cpp
35                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AngleParamsVerticesPage.cpp)
36
37 # Common ImportExport
38 set (COMMON_IE_DIR          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ImportExport)
39 set (COMMON_IE_HEADER_FILES ${COMMON_IE_DIR}/ImportExport.h
40                             ${COMMON_IE_DIR}/SaveCSFDBDlg.h
41                             ${COMMON_IE_DIR}/SaveSTEPDlg.h )
42 set (COMMON_IE_SOURCE_FILES ${COMMON_IE_DIR}/ImportExport.cpp
43                             ${COMMON_IE_DIR}/SaveCSFDBDlg.cpp
44                             ${COMMON_IE_DIR}/SaveSTEPDlg.cpp )
45
46 # Common ISession2D
47 set (COMMON_ISESSION2D_DIR          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ISession2D)
48 set (COMMON_ISESSION2D_HEADER_FILES ${COMMON_ISESSION2D_DIR}/ISession2D_Shape.h )
49 set (COMMON_ISESSION2D_SOURCE_FILES ${COMMON_ISESSION2D_DIR}/ISession2D_Shape.cpp )
50
51 # Common Primitive
52 set (COMMON_PRIMITIVE_DIR          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/Primitive)
53 set (COMMON_PRIMITIVE_HEADER_FILES ${COMMON_PRIMITIVE_DIR}/Sample2D_Face.h
54                                    ${COMMON_PRIMITIVE_DIR}/Sample2D_Image.h
55                                    ${COMMON_PRIMITIVE_DIR}/Sample2D_Markers.h
56                                    ${COMMON_PRIMITIVE_DIR}/Sample2D_Text.h )
57 set (COMMON_PRIMITIVE_SOURCE_FILES ${COMMON_PRIMITIVE_DIR}/Sample2D_Face.cpp
58                                    ${COMMON_PRIMITIVE_DIR}/Sample2D_Image.cpp
59                                    ${COMMON_PRIMITIVE_DIR}/Sample2D_Markers.cpp
60                                    ${COMMON_PRIMITIVE_DIR}/Sample2D_Text.cpp )
61
62 # Common Resource2D
63 set (COMMON_RESOURCE2D_DIR          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/Resource2D)
64 set (COMMON_RESOURCE2D_HEADER_FILES ${COMMON_RESOURCE2D_DIR}/CircularGrid.h
65                                     ${COMMON_RESOURCE2D_DIR}/RectangularGrid.h )
66 set (COMMON_RESOURCE2D_SOURCE_FILES ${COMMON_RESOURCE2D_DIR}/CircularGrid.cpp
67                                     ${COMMON_RESOURCE2D_DIR}/RectangularGrid.cpp )
68
69 # Common headers
70 set (COMMON_HEADER_FILES ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AISDialogs.h
71                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_2dDoc.h
72                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_2dChildFrame.h
73                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_2dView.h
74                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_3dBaseDoc.h
75                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_App.h
76                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_3dDoc.h
77                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_3dChildFrame.h
78                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_3dView.h
79                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_BaseDoc.h
80                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_BaseChildFrame.h
81                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_BaseView.h
82                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_MainFrame.h
83                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ParamsFacesPage.h
84                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ResultDialog.h
85                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/User_Cylinder.hxx
86                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ColoredMeshDlg.h
87                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/DimensionDlg.h
88                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsEdgePage.h
89                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsVerticesPage.h
90                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/RadiusParamsPage.h
91                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsEdgesPage.h
92                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsVerticesPage.h
93                          ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AngleParamsVerticesPage.h)
94
95
96 # Common resources
97 set (COMMON_RESOURCE_DIR   ${MFC_STANDARD_COMMON_SAMPLES_DIR}/res)
98 set (COMMON_RESOURCE_FILES ${COMMON_RESOURCE_DIR}/2dChildFrameTB.bmp
99                            ${COMMON_RESOURCE_DIR}/2dType.ico
100                            ${COMMON_RESOURCE_DIR}/3dChildFrameTB.bmp
101                            ${COMMON_RESOURCE_DIR}/3dType.ico
102                            ${COMMON_RESOURCE_DIR}/AIS_TB.bmp
103                            ${COMMON_RESOURCE_DIR}/coloredm.bmp
104                            ${COMMON_RESOURCE_DIR}/MainFrame.ico
105                            ${COMMON_RESOURCE_DIR}/occ_logo.bmp
106                            ${COMMON_RESOURCE_DIR}/OCC_Resource.rc)
107
108 # groups in the VS solution
109 source_group ( "Header Files" FILES   ${COMMON_HEADER_FILES}
110                                       ${COMMON_IE_HEADER_FILES}
111                                       ${COMMON_PRIMITIVE_HEADER_FILES}
112                                       ${COMMON_RESOURCE2D_HEADER_FILES}
113                                       ${COMMON_ISESSION2D_HEADER_FILES})
114
115 source_group ("Source Files" FILES    ${mfcsample_SOURCE_FILES}
116                                       ${COMMON_SOURCE_FILES}
117                                       ${COMMON_IE_SOURCE_FILES}
118                                       ${COMMON_PRIMITIVE_SOURCE_FILES}
119                                       ${COMMON_RESOURCE2D_SOURCE_FILES}
120                                       ${COMMON_ISESSION2D_SOURCE_FILES})
121
122 source_group ( "Resource Files" FILES ${COMMON_RESOURCE_FILES})
123
124 # mfcsample library
125 add_library ( mfcsample SHARED ${mfcsample_SOURCE_FILES}
126                                ${COMMON_HEADER_FILES}
127                                ${COMMON_SOURCE_FILES}
128                                ${COMMON_IE_HEADER_FILES}
129                                ${COMMON_IE_SOURCE_FILES}
130                                ${COMMON_PRIMITIVE_HEADER_FILES}
131                                ${COMMON_PRIMITIVE_SOURCE_FILES}
132                                ${COMMON_RESOURCE2D_HEADER_FILES}
133                                ${COMMON_RESOURCE2D_SOURCE_FILES}
134                                ${COMMON_ISESSION2D_HEADER_FILES}
135                                ${COMMON_ISESSION2D_SOURCE_FILES}
136                                ${COMMON_RESOURCE_FILES})
137
138 set_property (TARGET mfcsample PROPERTY FOLDER Samples)
139
140 install (TARGETS mfcsample RUNTIME DESTINATION "${INSTALL_DIR}/bin"
141                            ARCHIVE DESTINATION "${INSTALL_DIR}/lib"
142                            LIBRARY DESTINATION "${INSTALL_DIR}/lib")
143
144 include_directories( ${OCCT_ROOT}/inc
145                      ${MFC_STANDARD_COMMON_SAMPLES_DIR}
146                      ${COMMON_IE_DIR}
147                      ${COMMON_ISESSION2D_DIR}
148                      ${COMMON_PRIMITIVE_DIR}
149                      ${COMMON_RESOURCE2D_DIR})
150
151 # OCCT libraries for using
152 set (mfcsample_USED_LIBS  TKVRML
153                           TKSTL
154                           TKBRep
155                           TKIGES
156                           TKShHealing
157                           TKSTEP
158                           TKXSBase
159                           TKShapeSchema
160                           FWOSPlugin
161                           PTKernel
162                           TKBool
163                           TKCAF
164                           TKCDF
165                           TKernel
166                           TKFeat
167                           TKFillet
168                           TKG2d
169                           TKG3d
170                           TKGeomAlgo
171                           TKGeomBase
172                           TKHLR
173                           TKMath
174                           TKOffset
175                           TKOpenGl
176                           TKPCAF
177                           TKPrim
178                           TKPShape
179                           TKService
180                           TKTopAlgo
181                           TKMesh
182                           TKV3d)
183
184 target_link_libraries (mfcsample ${mfcsample_USED_LIBS})