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