0028060: Samples - Objects in Geometry/Viewer2d have incorrect color
[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=0x0501 -DUNICODE -D_UNICODE)
6 set (CMAKE_MFC_FLAG 2)
7
8 set (Geometry_SRC_DIR      ${MFC_STANDARD_SAMPLES_DIR}/01_Geometry/src)
9 set (Geometry_HEADER_FILES ${Geometry_SRC_DIR}/ChildFrm.h
10                            ${Geometry_SRC_DIR}/ChildFrm2d.h
11                            ${Geometry_SRC_DIR}/GeoAlgo_Sol.hxx
12                            ${Geometry_SRC_DIR}/GeometryApp.h
13                            ${Geometry_SRC_DIR}/GeometryDoc.h
14                            ${Geometry_SRC_DIR}/GeometryView.h
15                            ${Geometry_SRC_DIR}/GeometryView2D.h
16                            ${Geometry_SRC_DIR}/GeomSources.h
17                            ${Geometry_SRC_DIR}/MainFrm.h
18                            ${Geometry_SRC_DIR}/StdAfx.h )
19 set (Geometry_SOURCE_FILES ${Geometry_SRC_DIR}/ChildFrm.cpp
20                            ${Geometry_SRC_DIR}/ChildFrm2d.cpp
21                            ${Geometry_SRC_DIR}/GeoAlgo_Sol.cxx
22                            ${Geometry_SRC_DIR}/GeometryApp.cpp
23                            ${Geometry_SRC_DIR}/GeometryDoc.cpp
24                            ${Geometry_SRC_DIR}/GeometryView.cpp
25                            ${Geometry_SRC_DIR}/GeometryView2D.cpp
26                            ${Geometry_SRC_DIR}/GeomSources.cpp
27                            ${Geometry_SRC_DIR}/MainFrm.cpp
28                            ${Geometry_SRC_DIR}/StdAfx.cpp )
29
30 set (Geometry_ISESSION2D_DIR          ${Geometry_SRC_DIR}/ISession2D)
31 set (Geometry_ISESSION2D_HEADER_FILES ${Geometry_ISESSION2D_DIR}/ISession_Curve.h
32                                       ${Geometry_ISESSION2D_DIR}/ISession_Direction.h
33                                       ${Geometry_ISESSION2D_DIR}/ISession_Point.h
34                                       ${Geometry_ISESSION2D_DIR}/ISession_Surface.h
35                                       ${Geometry_ISESSION2D_DIR}/ISession2D_Curve.h)
36 set (Geometry_ISESSION2D_SOURCE_FILES ${Geometry_ISESSION2D_DIR}/ISession_Curve.cpp
37                                       ${Geometry_ISESSION2D_DIR}/ISession_Direction.cpp
38                                       ${Geometry_ISESSION2D_DIR}/ISession_Point.cpp
39                                       ${Geometry_ISESSION2D_DIR}/ISession_Surface.cpp
40                                       ${Geometry_ISESSION2D_DIR}/ISession2D_Curve.cpp)
41
42 set (Geometry_RESOURCE_DIR            ${MFC_STANDARD_SAMPLES_DIR}/01_Geometry/res)
43 set (Geometry_RESOURCE_HEADER         ${Geometry_RESOURCE_DIR}/resource.h)
44 set (Geometry_RESOURCE_FILES          ${Geometry_RESOURCE_DIR}/Geometry.rc
45                                       ${Geometry_RESOURCE_DIR}/Toolbar1.bmp
46                                       ${Geometry_RESOURCE_DIR}/Toolbar2.bmp)
47
48 # groups in the VS solution
49 source_group ("Source Files" FILES ${Geometry_SOURCE_FILES}
50                                    ${COMMON_WINMAIN_FILE})
51
52 source_group ("Source Files\\ISession2d" FILES ${Geometry_ISESSION2D_SOURCE_FILES})
53
54 source_group ("Header Files" FILES ${Geometry_HEADER_FILES}
55                                    ${Geometry_ISESSION2D_HEADER_FILES}
56                                    ${Geometry_RESOURCE_HEADER})
57
58 source_group ("Resource Files" FILES ${Geometry_RESOURCE_FILES})
59
60 add_executable (Geometry WIN32 ${Geometry_SOURCE_FILES}
61                                ${Geometry_HEADER_FILES}
62                                ${COMMON_WINMAIN_FILE}
63                                ${Geometry_ISESSION2D_SOURCE_FILES}
64                                ${Geometry_ISESSION2D_HEADER_FILES}
65                                ${Geometry_RESOURCE_FILES}
66                                ${Geometry_RESOURCE_HEADER})
67
68 set_property(TARGET Geometry PROPERTY FOLDER Samples)
69
70 if (SINGLE_GENERATOR)
71   install (TARGETS Geometry DESTINATION "${INSTALL_DIR_BIN}")
72 else()
73   install (TARGETS Geometry
74            CONFIGURATIONS Release RelWithDebInfo
75            DESTINATION "${INSTALL_DIR_BIN}")
76   install (TARGETS Geometry
77            CONFIGURATIONS Debug
78            DESTINATION "${INSTALL_DIR_BIN}d")
79 endif()
80
81 include_directories (${CMAKE_BINARY_DIR}/inc
82                      ${Geometry_SRC_DIR}
83                      ${Geometry_ISESSION2D_DIR}
84                      ${Geometry_RESOURCE_DIR}
85                      ${MFC_STANDARD_SAMPLES_DIR}/Common)
86
87 target_link_libraries (Geometry mfcsample)