4d70782685cad77bbea7e188e17e9b0cf7ebb385
[occt.git] / samples / mfc / standard / 06_Ocaf / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2
3 project (Ocaf)
4
5 add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE)
6 set (CMAKE_MFC_FLAG 2)
7
8 set (Ocaf_SRC_DIR      ${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf/src)
9 set (Ocaf_HEADER_FILES ${Ocaf_SRC_DIR}/NewBoxDlg.h
10                        ${Ocaf_SRC_DIR}/NewCylDlg.h
11                        ${Ocaf_SRC_DIR}/OcafApp.h
12                        ${Ocaf_SRC_DIR}/OcafDoc.h
13                        ${Ocaf_SRC_DIR}/OcafMainFrm.h
14                        ${Ocaf_SRC_DIR}/Handle_TOcaf_Application.hxx
15                        ${Ocaf_SRC_DIR}/TOcaf_Commands.hxx
16                        ${Ocaf_SRC_DIR}/Handle_TOcafFunction_BoxDriver.hxx
17                        ${Ocaf_SRC_DIR}/Handle_TOcafFunction_CutDriver.hxx
18                        ${Ocaf_SRC_DIR}/Handle_TOcafFunction_CylDriver.hxx
19                        ${Ocaf_SRC_DIR}/StdAfx.h )
20 set (Ocaf_SOURCE_FILES ${Ocaf_SRC_DIR}/NewBoxDlg.cpp
21                        ${Ocaf_SRC_DIR}/NewCylDlg.cpp
22                        ${Ocaf_SRC_DIR}/OcafApp.cpp
23                        ${Ocaf_SRC_DIR}/OcafDoc.cpp
24                        ${Ocaf_SRC_DIR}/OcafMainFrm.cpp
25                        ${Ocaf_SRC_DIR}/TOcaf_Application.cxx
26                        ${Ocaf_SRC_DIR}/TOcaf_Commands.cxx
27                        ${Ocaf_SRC_DIR}/TOcafFunction_BoxDriver.cxx
28                        ${Ocaf_SRC_DIR}/TOcafFunction_CutDriver.cxx
29                        ${Ocaf_SRC_DIR}/TOcafFunction_CylDriver.cxx
30                        ${Ocaf_SRC_DIR}/StdAfx.cpp )
31
32 set (Ocaf_RESOURCE_DIR    ${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf/res)
33 set (Ocaf_RESOURCE_HEADER ${Ocaf_RESOURCE_DIR}/resource.h)
34 set (Ocaf_RESOURCE_FILES  ${Ocaf_RESOURCE_DIR}/ActionsTB.bmp
35                           ${Ocaf_RESOURCE_DIR}/AIS_TB.bmp
36                           ${Ocaf_RESOURCE_DIR}/Toolbar.bmp
37                           ${Ocaf_RESOURCE_DIR}/UndoRedoTB.bmp
38                           ${Ocaf_RESOURCE_DIR}/Ocaf.rc)
39
40 # groups in the VS solution
41 source_group ("Source Files" FILES ${Ocaf_SOURCE_FILES}
42                                    ${COMMON_WINMAIN_FILE})
43
44 source_group ("Header Files" FILES ${Ocaf_HEADER_FILES}
45                                    ${Ocaf_RESOURCE_HEADER})
46
47 source_group ("Resource Files" FILES ${Ocaf_RESOURCE_FILES})
48
49 add_executable (Ocaf WIN32 ${Ocaf_SOURCE_FILES}
50                            ${Ocaf_HEADER_FILES}
51                            ${COMMON_WINMAIN_FILE}
52                            ${Ocaf_RESOURCE_HEADER}
53                            ${Ocaf_RESOURCE_FILES} )
54
55
56 set_property (TARGET Ocaf PROPERTY FOLDER Samples)
57
58 install (TARGETS Ocaf RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}"
59                       ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}"
60                       LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}")
61
62 include_directories (${OCCT_ROOT}/inc
63                      ${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf
64                      ${Ocaf_SRC_DIR}
65                      ${MFC_STANDARD_SAMPLES_DIR}/Common)
66
67 target_link_libraries (Ocaf mfcsample TKLCAF TKBO)