0025114: CMake-based build tools for OCCT 7.0
[occt.git] / samples / mfc / standard / 04_Viewer3d / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2
3 project (Viewer3d)
4
5 add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE)
6 set (CMAKE_MFC_FLAG 2)
7
8 set (Viewer3d_SRC_DIR      ${MFC_STANDARD_SAMPLES_DIR}/04_Viewer3d/src)
9 set (Viewer3d_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_Viewer3d/res)
10 set (Viewer3d_HEADER_FILES ${Viewer3d_SRC_DIR}/BoxRadius.h
11                            ${Viewer3d_SRC_DIR}/DlgIsos.h
12                            ${Viewer3d_SRC_DIR}/ISession_Curve.h
13                            ${Viewer3d_SRC_DIR}/ModelClippingDlg.h
14                            ${Viewer3d_SRC_DIR}/OCCDemo_Presentation.h
15                            ${Viewer3d_SRC_DIR}/OffsetDlg.h
16                            ${Viewer3d_SRC_DIR}/ScaleDlg.h
17                            ${Viewer3d_SRC_DIR}/ShadingModelDlg.h
18                            ${Viewer3d_SRC_DIR}/StdAfx.h
19                            ${Viewer3d_SRC_DIR}/TexturesExt_Presentation.h
20                            ${Viewer3d_SRC_DIR}/TrihedronDlg.h
21                            ${Viewer3d_SRC_DIR}/Viewer3dApp.h
22                            ${Viewer3d_SRC_DIR}/Viewer3dDoc.h
23                            ${Viewer3d_SRC_DIR}/Viewer3dView.h
24                            ${Viewer3d_SRC_DIR}/ZClippingDlg.h
25                            ${Viewer3d_SRC_DIR}/ZCueingDlg.h
26                            ${Viewer3d_SRC_DIR}/State.h
27                            ${Viewer3d_RESOURCE_DIR}/resource.h
28                            ${Viewer3d_RESOURCE_DIR}/resource.hm)
29 set (Viewer3d_SOURCE_FILES ${Viewer3d_SRC_DIR}/BoxRadius.cpp
30                            ${Viewer3d_SRC_DIR}/DlgIsos.cpp
31                            ${Viewer3d_SRC_DIR}/ISession_Curve.cpp
32                            ${Viewer3d_SRC_DIR}/ModelClippingDlg.cpp
33                            ${Viewer3d_SRC_DIR}/OCCDemo_Presentation.cpp
34                            ${Viewer3d_SRC_DIR}/OffsetDlg.cpp
35                            ${Viewer3d_SRC_DIR}/ScaleDlg.cpp
36                            ${Viewer3d_SRC_DIR}/ShadingModelDlg.cpp
37                            ${Viewer3d_SRC_DIR}/StdAfx.cpp
38                            ${Viewer3d_SRC_DIR}/TexturesExt_Presentation.cpp
39                            ${Viewer3d_SRC_DIR}/TrihedronDlg.cpp
40                            ${Viewer3d_SRC_DIR}/Viewer3dApp.cpp
41                            ${Viewer3d_SRC_DIR}/Viewer3dDoc.cpp
42                            ${Viewer3d_SRC_DIR}/Viewer3dView.cpp
43                            ${Viewer3d_SRC_DIR}/ZClippingDlg.cpp
44                            ${Viewer3d_SRC_DIR}/ZCueingDlg.cpp)
45
46 set (Viewer3d_RESOURCE_FILES ${Viewer3d_RESOURCE_DIR}/Viewer3d.rc
47                              ${Viewer3d_RESOURCE_DIR}/AISToolbar.bmp
48                              ${Viewer3d_RESOURCE_DIR}/AIS_TB.bmp
49                              ${Viewer3d_RESOURCE_DIR}/Toolbar.bmp)
50
51 # groups in the VS solution
52 source_group ("Source Files" FILES ${Viewer3d_SOURCE_FILES}
53                                    ${COMMON_WINMAIN_FILE})
54
55 source_group ("Header Files" FILES ${Viewer3d_HEADER_FILES})
56
57 source_group ("Resource Files" FILES ${Viewer3d_RESOURCE_FILES})
58
59 add_executable (Viewer3d WIN32 ${Viewer3d_SOURCE_FILES}
60                                ${Viewer3d_HEADER_FILES}
61                                ${COMMON_WINMAIN_FILE}
62                                ${Viewer3d_RESOURCE_FILES})
63
64 set_property (TARGET Viewer3d PROPERTY FOLDER Samples)
65
66 install (TARGETS Viewer3d RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}"
67                           ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}"
68                           LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}")
69
70 include_directories (${CMAKE_SOURCE_DIR}/src
71                      ${Viewer3d_SRC_DIR}
72                      ${MFC_STANDARD_SAMPLES_DIR}/Common)
73
74 target_link_libraries (Viewer3d mfcsample)