0025114: CMake-based build tools for OCCT 7.0
[occt.git] / samples / mfc / standard / 10_Convert / CMakeLists.txt
CommitLineData
234e52be 1cmake_minimum_required (VERSION 2.6)
2
3project (Convert)
4
576f8b11 5add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE)
6set (CMAKE_MFC_FLAG 2)
234e52be 7
8set (Convert_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/10_Convert/src)
9set (Convert_HEADER_FILES ${Convert_SRC_DIR}/Convert_Presentation.h
10 ${Convert_SRC_DIR}/OCCDemo_Presentation.h)
11set (Convert_SOURCE_FILES ${Convert_SRC_DIR}/Convert_Presentation.cpp
12 ${Convert_SRC_DIR}/OCCDemo_Presentation.cpp )
13
14set (ISESSION_SUBDIR ${Convert_SRC_DIR}/ISession)
15set (ISESSION_HEADER_FILES ${ISESSION_SUBDIR}/ISession_Curve.h)
16set (ISESSION_SOURCE_FILES ${ISESSION_SUBDIR}/ISession_Curve.cpp)
17
18set (WNT_SUBDIR ${Convert_SRC_DIR}/WNT)
19set (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)
26set (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
33set (WNT_RESOURCE_DIR ${WNT_SUBDIR}/res)
34set (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
43source_group ("Source Files" FILES ${Convert_SOURCE_FILES}
44 ${COMMON_WINMAIN_FILE})
45
46source_group ("Source Files\\ISession" FILES ${ISESSION_SOURCE_FILES})
47source_group ("Source Files\\WNT" FILES ${WNT_SOURCE_FILES})
48
49source_group ("Header Files" FILES ${Convert_HEADER_FILES} )
50source_group ("Header Files\\ISession" FILES ${ISESSION_HEADER_FILES} )
51source_group ("Header Files\\WNT" FILES ${WNT_HEADER_FILES})
52
53source_group ("Resource Files" FILES ${WNT_RESOURCE_FILES})
54
55add_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
64set_property (TARGET Convert PROPERTY FOLDER Samples)
65
9f33b387 66install (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}")
234e52be 69
19286d7c 70include_directories (${CMAKE_SOURCE_DIR}/src
234e52be 71 ${Convert_SRC_DIR}
72 ${ISESSION_SUBDIR}
4a0c5c25 73 ${WNT_SUBDIR}
74 ${MFC_STANDARD_SAMPLES_DIR}/Common)
234e52be 75
76target_link_libraries (Convert mfcsample)