0024469: cmake mfcsample project skippes ParamsFacesPage
[occt.git] / samples / mfc / standard / 01_Geometry / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2
3 project (Geometry)
4
5 add_definitions(-DWINVER=0x0500)
6
7 set (Geometry_SRC_DIR      ${MFC_STANDARD_SAMPLES_DIR}/01_Geometry/src)
8 set (Geometry_HEADER_FILES ${Geometry_SRC_DIR}/ChildFrm.h
9                            ${Geometry_SRC_DIR}/ChildFrm2d.h
10                            ${Geometry_SRC_DIR}/GeoAlgo_Sol.hxx
11                            ${Geometry_SRC_DIR}/GeometryApp.h
12                            ${Geometry_SRC_DIR}/GeometryDoc.h
13                            ${Geometry_SRC_DIR}/GeometryView.h
14                            ${Geometry_SRC_DIR}/GeometryView2D.h
15                            ${Geometry_SRC_DIR}/GeomSources.h
16                            ${Geometry_SRC_DIR}/MainFrm.h
17                            ${Geometry_SRC_DIR}/StdAfx.h )
18 set (Geometry_SOURCE_FILES ${Geometry_SRC_DIR}/ChildFrm.cpp
19                            ${Geometry_SRC_DIR}/ChildFrm2d.cpp
20                            ${Geometry_SRC_DIR}/GeoAlgo_Sol.cxx
21                            ${Geometry_SRC_DIR}/GeometryApp.cpp
22                            ${Geometry_SRC_DIR}/GeometryDoc.cpp
23                            ${Geometry_SRC_DIR}/GeometryView.cpp
24                            ${Geometry_SRC_DIR}/GeometryView2D.cpp
25                            ${Geometry_SRC_DIR}/GeomSources.cpp
26                            ${Geometry_SRC_DIR}/MainFrm.cpp
27                            ${Geometry_SRC_DIR}/StdAfx.cpp )
28
29 set (Geometry_ISESSION2D_DIR          ${Geometry_SRC_DIR}/ISession2D)
30 set (Geometry_ISESSION2D_HEADER_FILES ${Geometry_ISESSION2D_DIR}/ISession_Curve.h
31                                       ${Geometry_ISESSION2D_DIR}/ISession_Direction.h
32                                       ${Geometry_ISESSION2D_DIR}/ISession_Point.h
33                                       ${Geometry_ISESSION2D_DIR}/ISession_Surface.h
34                                       ${Geometry_ISESSION2D_DIR}/ISession_Text.h
35                                       ${Geometry_ISESSION2D_DIR}/ISession2D_Curve.h
36                                       ${Geometry_ISESSION2D_DIR}/ISession2D_SensitiveCurve.h)
37 set (Geometry_ISESSION2D_SOURCE_FILES ${Geometry_ISESSION2D_DIR}/ISession_Curve.cpp
38                                       ${Geometry_ISESSION2D_DIR}/ISession_Direction.cpp
39                                       ${Geometry_ISESSION2D_DIR}/ISession_Point.cpp
40                                       ${Geometry_ISESSION2D_DIR}/ISession_Surface.cpp
41                                       ${Geometry_ISESSION2D_DIR}/ISession_Text.cpp
42                                       ${Geometry_ISESSION2D_DIR}/ISession2D_Curve.cpp
43                                       ${Geometry_ISESSION2D_DIR}/ISession2D_SensitiveCurve.cpp)
44
45 set (Geometry_RESOURCE_DIR            ${MFC_STANDARD_SAMPLES_DIR}/01_Geometry/res)
46 set (Geometry_RESOURCE_HEADER         ${Geometry_RESOURCE_DIR}/resource.h)
47 set (Geometry_RESOURCE_FILES          ${Geometry_RESOURCE_DIR}/Geometry.rc
48                                       ${Geometry_RESOURCE_DIR}/Toolbar1.bmp
49                                       ${Geometry_RESOURCE_DIR}/Toolbar2.bmp)
50
51 # groups in the VS solution
52 source_group ("Source Files" FILES ${Geometry_SOURCE_FILES}
53                                    ${COMMON_WINMAIN_FILE})
54
55 source_group ("Source Files\\ISession2d" FILES ${Geometry_ISESSION2D_SOURCE_FILES})
56
57 source_group ("Header Files" FILES ${Geometry_HEADER_FILES}
58                                    ${Geometry_ISESSION2D_HEADER_FILES}
59                                    ${Geometry_RESOURCE_HEADER})
60
61 source_group ("Resource Files" FILES ${Geometry_RESOURCE_FILES})
62
63 add_executable (Geometry WIN32 ${Geometry_SOURCE_FILES}
64                                ${Geometry_HEADER_FILES}
65                                ${COMMON_WINMAIN_FILE}
66                                ${Geometry_ISESSION2D_SOURCE_FILES}
67                                ${Geometry_ISESSION2D_HEADER_FILES}
68                                ${Geometry_RESOURCE_FILES}
69                                ${Geometry_RESOURCE_HEADER})
70
71 set_property(TARGET Geometry PROPERTY FOLDER Samples)
72
73 install (TARGETS Geometry RUNTIME DESTINATION "${INSTALL_DIR}/bin"
74                           ARCHIVE DESTINATION "${INSTALL_DIR}/lib"
75                           LIBRARY DESTINATION "${INSTALL_DIR}/lib")
76
77 include_directories (${OCCT_ROOT}/inc
78                      ${Geometry_SRC_DIR}
79                      ${Geometry_ISESSION2D_DIR}
80                      ${Geometry_RESOURCE_DIR}
81                      ${MFC_STANDARD_SAMPLES_DIR}/Common)
82
83 target_link_libraries (Geometry mfcsample)