0024002: Overall code and build procedure refactoring - samples
[occt.git] / samples / mfc / standard / 03_Viewer2d / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2
3 project (Viewer2d)
4
5 add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE)
6 set (CMAKE_MFC_FLAG 2)
7
8 set (Viewer2d_SOURCE_DIR   ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d/src)
9 set (Viewer2d_HEADER_FILES ${Viewer2d_SOURCE_DIR}/Viewer2dApp.h
10                            ${Viewer2d_SOURCE_DIR}/Viewer2dDoc.h
11                            ${Viewer2d_SOURCE_DIR}/StdAfx.h )
12 set (Viewer2d_SOURCE_FILES ${Viewer2d_SOURCE_DIR}/Viewer2dApp.cpp
13                            ${Viewer2d_SOURCE_DIR}/Viewer2dDoc.cpp
14                            ${Viewer2d_SOURCE_DIR}/StdAfx.cpp )
15
16 set (Viewer2d_RESOURCE_DIR    ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d/res)
17 set (Viewer2d_RESOURCE_HEADER ${Viewer2d_RESOURCE_DIR}/resource.h)
18 set (Viewer2d_RESOURCE_FILES  ${Viewer2d_RESOURCE_DIR}/Toolbar.bmp
19                               ${Viewer2d_RESOURCE_DIR}/Viewer2d.rc)
20
21 # groups in the VS solution
22 source_group ("Source Files" FILES ${Viewer2d_SOURCE_FILES}
23                                    ${COMMON_WINMAIN_FILE})
24
25 source_group ("Header Files" FILES ${Viewer2d_HEADER_FILES}
26                                    ${Viewer2d_RESOURCE_HEADER})
27
28 source_group ("Resource Files" FILES ${Viewer2d_RESOURCE_FILES})
29
30 add_executable (Viewer2d WIN32 ${Viewer2d_SOURCE_FILES}
31                                ${Viewer2d_HEADER_FILES}
32                                ${COMMON_WINMAIN_FILE}
33                                ${Viewer2d_RESOURCE_HEADER}
34                                ${Viewer2d_RESOURCE_FILES})
35
36 set_property (TARGET Viewer2d PROPERTY FOLDER Samples)
37
38 install (TARGETS Viewer2d
39          CONFIGURATIONS Release
40          DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
41 install (TARGETS Viewer2d
42          CONFIGURATIONS RelWithDebInfo
43          DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
44 install (TARGETS Viewer2d
45          CONFIGURATIONS Debug
46          DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
47
48 include_directories (${CMAKE_BINARY_DIR}/inc
49                      ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d
50                      ${Viewer2d_SOURCE_DIR}
51                      ${MFC_STANDARD_SAMPLES_DIR}/Common)
52
53 target_link_libraries (Viewer2d mfcsample)