0024426: CMake ignores 3rd party options; env.sh does not set "CASROOT" environment...
[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=0x0500)
6
7 set (Viewer3d_SRC_DIR      ${MFC_STANDARD_SAMPLES_DIR}/04_Viewer3d/src)
8 set (Viewer3d_HEADER_FILES ${Viewer3d_SRC_DIR}/BoxRadius.h
9                            ${Viewer3d_SRC_DIR}/DlgIsos.h
10                            ${Viewer3d_SRC_DIR}/ISession_Curve.h
11                            ${Viewer3d_SRC_DIR}/ModelClippingDlg.h
12                            ${Viewer3d_SRC_DIR}/OCCDemo_Presentation.h
13                            ${Viewer3d_SRC_DIR}/OffsetDlg.h
14                            ${Viewer3d_SRC_DIR}/ScaleDlg.h
15                            ${Viewer3d_SRC_DIR}/ShadingModelDlg.h
16                            ${Viewer3d_SRC_DIR}/StdAfx.h
17                            ${Viewer3d_SRC_DIR}/TexturesExt_Presentation.h
18                            ${Viewer3d_SRC_DIR}/TrihedronDlg.h
19                            ${Viewer3d_SRC_DIR}/Viewer3dApp.h
20                            ${Viewer3d_SRC_DIR}/Viewer3dDoc.h
21                            ${Viewer3d_SRC_DIR}/Viewer3dView.h
22                            ${Viewer3d_SRC_DIR}/ZClippingDlg.h
23                            ${Viewer3d_SRC_DIR}/ZCueingDlg.h
24                            ${Viewer3d_SRC_DIR}/State.h
25                            ${Viewer3d_SRC_DIR}/resource.h
26                            ${Viewer3d_SRC_DIR}/resource.hm)
27 set (Viewer3d_SOURCE_FILES ${Viewer3d_SRC_DIR}/BoxRadius.cpp
28                            ${Viewer3d_SRC_DIR}/DlgIsos.cpp
29                            ${Viewer3d_SRC_DIR}/ISession_Curve.cpp
30                            ${Viewer3d_SRC_DIR}/ModelClippingDlg.cpp
31                            ${Viewer3d_SRC_DIR}/OCCDemo_Presentation.cpp
32                            ${Viewer3d_SRC_DIR}/OffsetDlg.cpp
33                            ${Viewer3d_SRC_DIR}/ScaleDlg.cpp
34                            ${Viewer3d_SRC_DIR}/ShadingModelDlg.cpp
35                            ${Viewer3d_SRC_DIR}/StdAfx.cpp
36                            ${Viewer3d_SRC_DIR}/TexturesExt_Presentation.cpp
37                            ${Viewer3d_SRC_DIR}/TrihedronDlg.cpp
38                            ${Viewer3d_SRC_DIR}/Viewer3dApp.cpp
39                            ${Viewer3d_SRC_DIR}/Viewer3dDoc.cpp
40                            ${Viewer3d_SRC_DIR}/Viewer3dView.cpp
41                            ${Viewer3d_SRC_DIR}/ZClippingDlg.cpp
42                            ${Viewer3d_SRC_DIR}/ZCueingDlg.cpp)
43
44 set (Viewer3d_RESOURCE_DIR   ${MFC_STANDARD_SAMPLES_DIR}/04_Viewer3d/res)
45 set (Viewer3d_RESOURCE_FILES ${Viewer3d_SRC_DIR}/Viewer3d.rc
46                              ${Viewer3d_SRC_DIR}/AISToolbar.bmp
47                              ${Viewer3d_RESOURCE_DIR}/AIS_TB.bmp
48                              ${Viewer3d_RESOURCE_DIR}/Toolbar.bmp)
49
50 # groups in the VS solution
51 source_group ("Source Files" FILES ${Viewer3d_SOURCE_FILES}
52                                    ${COMMON_WINMAIN_FILE})
53
54 source_group ("Header Files" FILES ${Viewer3d_HEADER_FILES})
55
56 source_group ("Resource Files" FILES ${Viewer3d_RESOURCE_FILES})
57
58 add_executable (Viewer3d WIN32 ${Viewer3d_SOURCE_FILES}
59                                ${Viewer3d_HEADER_FILES}
60                                ${COMMON_WINMAIN_FILE}
61                                ${Viewer3d_RESOURCE_FILES})
62
63 set_property (TARGET Viewer3d PROPERTY FOLDER Samples)
64
65 install (TARGETS Viewer3d RUNTIME DESTINATION "${INSTALL_DIR}/bin"
66                           ARCHIVE DESTINATION "${INSTALL_DIR}/lib"
67                           LIBRARY DESTINATION "${INSTALL_DIR}/lib")
68
69 include_directories (${OCCT_ROOT}/inc
70                      ${MFC_STANDARD_SAMPLES_DIR}/Common
71                      ${Viewer3d_SRC_DIR})
72
73 target_link_libraries (Viewer3d mfcsample)