0023874: Converting OCCT MFC samples to CMake build system.
[occt.git] / samples / mfc / standard / 03_Viewer2d / CMakeLists.txt
CommitLineData
234e52be 1cmake_minimum_required (VERSION 2.6)
2
3project (Viewer2d)
4
5add_definitions (-DWINVER=0x0500)
6
7set (Viewer2d_SOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d/src)
8set (Viewer2d_HEADER_FILES ${Viewer2d_SOURCE_DIR}/Viewer2dApp.h
9 ${Viewer2d_SOURCE_DIR}/Viewer2dDoc.h
10 ${Viewer2d_SOURCE_DIR}/StdAfx.h )
11set (Viewer2d_SOURCE_FILES ${Viewer2d_SOURCE_DIR}/Viewer2dApp.cpp
12 ${Viewer2d_SOURCE_DIR}/Viewer2dDoc.cpp
13 ${Viewer2d_SOURCE_DIR}/StdAfx.cpp )
14
15set (Viewer2d_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d/res)
16set (Viewer2d_RESOURCE_HEADER ${Viewer2d_RESOURCE_DIR}/resource.h)
17set (Viewer2d_RESOURCE_FILES ${Viewer2d_RESOURCE_DIR}/Toolbar.bmp
18 ${Viewer2d_RESOURCE_DIR}/Viewer2d.rc)
19
20# groups in the VS solution
21source_group ("Source Files" FILES ${Viewer2d_SOURCE_FILES}
22 ${COMMON_WINMAIN_FILE})
23
24source_group ("Header Files" FILES ${Viewer2d_HEADER_FILES}
25 ${Viewer2d_RESOURCE_HEADER})
26
27source_group ("Resource Files" FILES ${Viewer2d_RESOURCE_FILES})
28
29add_executable (Viewer2d WIN32 ${Viewer2d_SOURCE_FILES}
30 ${Viewer2d_HEADER_FILES}
31 ${COMMON_WINMAIN_FILE}
32 ${Viewer2d_RESOURCE_HEADER}
33 ${Viewer2d_RESOURCE_FILES})
34
35set_property (TARGET Viewer2d PROPERTY FOLDER Samples)
36
37install (TARGETS Viewer2d RUNTIME DESTINATION "${INSTALL_DIR}/bin"
38 ARCHIVE DESTINATION "${INSTALL_DIR}/lib"
39 LIBRARY DESTINATION "${INSTALL_DIR}/lib")
40
41include_directories (${OCCT_ROOT}/inc
42 ${MFC_STANDARD_SAMPLES_DIR}/Common
43 ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d
44 ${Viewer2d_SOURCE_DIR})
45
46target_link_libraries (Viewer2d mfcsample)