8e6de1ebbf91aa08422bc3d66d7231966a6591af
[occt.git] / samples / mfc / standard / 10_Convert / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2
3 project (Convert)
4
5 add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE)
6 set (CMAKE_MFC_FLAG 2)
7
8 set (Convert_SRC_DIR      ${MFC_STANDARD_SAMPLES_DIR}/10_Convert/src)
9 set (Convert_HEADER_FILES ${Convert_SRC_DIR}/Convert_Presentation.h
10                           ${Convert_SRC_DIR}/OCCDemo_Presentation.h)
11 set (Convert_SOURCE_FILES ${Convert_SRC_DIR}/Convert_Presentation.cpp
12                           ${Convert_SRC_DIR}/OCCDemo_Presentation.cpp )
13
14 set (ISESSION_SUBDIR       ${Convert_SRC_DIR}/ISession)
15 set (ISESSION_HEADER_FILES ${ISESSION_SUBDIR}/ISession_Curve.h)
16 set (ISESSION_SOURCE_FILES ${ISESSION_SUBDIR}/ISession_Curve.cpp)
17
18 set (WNT_SUBDIR       ${Convert_SRC_DIR}/WNT)
19 set (WNT_HEADER_FILES ${WNT_SUBDIR}/resource.h
20                       ${WNT_SUBDIR}/MainFrm.h
21                       ${WNT_SUBDIR}/OCCDemo.h
22                       ${WNT_SUBDIR}/OCCDemoDoc.h
23                       ${WNT_SUBDIR}/OCCDemoView.h
24                       ${WNT_SUBDIR}/ResultDialog.h
25                       ${WNT_SUBDIR}/StdAfx.h)
26 set (WNT_SOURCE_FILES ${WNT_SUBDIR}/MainFrm.cpp
27                       ${WNT_SUBDIR}/OCCDemo.cpp
28                       ${WNT_SUBDIR}/OCCDemoDoc.cpp
29                       ${WNT_SUBDIR}/OCCDemoView.cpp
30                       ${WNT_SUBDIR}/ResultDialog.cpp
31                       ${WNT_SUBDIR}/StdAfx.cpp)
32
33 set (WNT_RESOURCE_DIR   ${WNT_SUBDIR}/res)
34 set (WNT_RESOURCE_FILES ${WNT_RESOURCE_DIR}/OCCDemo.ico
35                         ${WNT_RESOURCE_DIR}/occlogo.bmp
36                         ${WNT_RESOURCE_DIR}/toolbar.bmp
37                         ${WNT_RESOURCE_DIR}/toolbar1.bmp
38                         ${WNT_RESOURCE_DIR}/logopen.bmp
39                         ${WNT_RESOURCE_DIR}/OCCDemo.rc2
40                         ${WNT_SUBDIR}/OCCDemo.rc)
41
42 # groups in the VS solution
43 source_group ("Source Files" FILES ${Convert_SOURCE_FILES}
44                                    ${COMMON_WINMAIN_FILE})
45
46 source_group ("Source Files\\ISession" FILES ${ISESSION_SOURCE_FILES})
47 source_group ("Source Files\\WNT" FILES ${WNT_SOURCE_FILES})
48
49 source_group ("Header Files" FILES ${Convert_HEADER_FILES} )
50 source_group ("Header Files\\ISession" FILES ${ISESSION_HEADER_FILES} )
51 source_group ("Header Files\\WNT" FILES ${WNT_HEADER_FILES})
52
53 source_group ("Resource Files" FILES ${WNT_RESOURCE_FILES})
54
55 add_executable (Convert WIN32 ${Convert_SOURCE_FILES}
56                               ${Convert_HEADER_FILES}
57                               ${ISESSION_SOURCE_FILES}
58                               ${ISESSION_HEADER_FILES}
59                               ${WNT_SOURCE_FILES}
60                               ${WNT_HEADER_FILES}
61                               ${COMMON_WINMAIN_FILE}
62                               ${WNT_RESOURCE_FILES} )
63
64 set_property (TARGET Convert PROPERTY FOLDER Samples)
65
66 install (TARGETS Convert 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 (${OCCT_ROOT}/inc
71                      ${Convert_SRC_DIR}
72                      ${ISESSION_SUBDIR}
73                      ${WNT_SUBDIR}
74                      ${MFC_STANDARD_SAMPLES_DIR}/Common)
75
76 target_link_libraries (Convert mfcsample)