5c47d366effc3a9c5998d90801668bd9f36fd58b
[occt.git] / samples / mfc / standard / 05_ImportExport / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2
3 project (ImportExport)
4
5 add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE)
6 set (CMAKE_MFC_FLAG 2)
7
8 set (ImportExport_SRC_DIR      ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport/src)
9 set (ImportExport_HEADER_FILES ${ImportExport_SRC_DIR}/ColoredShapes.h
10                                ${ImportExport_SRC_DIR}/FSD_Archive.hxx
11                                ${ImportExport_SRC_DIR}/ImportExportApp.h
12                                ${ImportExport_SRC_DIR}/ImportExportDoc.h
13                                ${ImportExport_SRC_DIR}/StdAfx.h )
14 set (ImportExport_SOURCE_FILES ${ImportExport_SRC_DIR}/ColoredShapes.cpp
15                                ${ImportExport_SRC_DIR}/FSD_Archive.cxx
16                                ${ImportExport_SRC_DIR}/ImportExportApp.cpp
17                                ${ImportExport_SRC_DIR}/ImportExportDoc.cpp
18                                ${ImportExport_SRC_DIR}/StdAfx.cpp)
19
20 set (ImportExport_RESOURCE_DIR    ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport/res)
21 set (ImportExport_RESOURCE_HEADER ${ImportExport_RESOURCE_DIR}/resource.h)
22 set (ImportExport_RESOURCE_FILES  ${ImportExport_RESOURCE_DIR}/Toolbar.bmp
23                                   ${ImportExport_RESOURCE_DIR}/ImportExport.rc)
24
25 # groups in the VS solution
26 source_group ("Source Files" FILES ${ImportExport_SOURCE_FILES}
27                                    ${COMMON_WINMAIN_FILE})
28
29 source_group ("Header Files" FILES ${ImportExport_HEADER_FILES}
30                                    ${ImportExport_RESOURCE_HEADER})
31
32 source_group ("Resource Files" FILES ${ImportExport_RESOURCE_FILES})
33
34 add_executable (ImportExport WIN32 ${ImportExport_SOURCE_FILES}
35                                    ${ImportExport_HEADER_FILES}
36                                    ${COMMON_WINMAIN_FILE}
37                                    ${ImportExport_RESOURCE_HEADER}
38                                    ${ImportExport_RESOURCE_FILES})
39
40 set_property (TARGET ImportExport PROPERTY FOLDER Samples)
41
42 install (TARGETS ImportExport RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}"
43                               ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}"
44                               LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}")
45
46 include_directories (${OCCT_ROOT}/inc
47                      ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport
48                      ${ImportExport_SRC_DIR}
49                      ${MFC_STANDARD_SAMPLES_DIR}/Common)
50
51 target_link_libraries (ImportExport mfcsample)