0025114: CMake-based build tools for OCCT 7.0
[occt.git] / samples / mfc / standard / 07_Triangulation / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2
3 project (Triangulation)
4
5 add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE)
6 set (CMAKE_MFC_FLAG 2)
7
8 set (Triangulation_SRC_DIR      ${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation/src)
9 set (Triangulation_HEADER_FILES ${Triangulation_SRC_DIR}/ISession_Curve.h
10                                 ${Triangulation_SRC_DIR}/OCCDemo_Presentation.h
11                                 ${Triangulation_SRC_DIR}/Tesselate_Presentation.h
12                                 ${Triangulation_SRC_DIR}/TriangulationApp.h
13                                 ${Triangulation_SRC_DIR}/TriangulationDoc.h
14                                 ${Triangulation_SRC_DIR}/StdAfx.h )
15 set (Triangulation_SOURCE_FILES ${Triangulation_SRC_DIR}/ISession_Curve.cpp
16                                 ${Triangulation_SRC_DIR}/OCCDemo_Presentation.cpp
17                                 ${Triangulation_SRC_DIR}/Tesselate_Presentation.cpp
18                                 ${Triangulation_SRC_DIR}/TriangulationApp.cpp
19                                 ${Triangulation_SRC_DIR}/TriangulationDoc.cpp
20                                 ${Triangulation_SRC_DIR}/StdAfx.cpp)
21
22 set (Triangulation_RESOURCE_DIR    ${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation/res)
23 set (Triangulation_RESOURCE_HEADER ${Triangulation_RESOURCE_DIR}/resource.h)
24 set (Triangulation_RESOURCE_FILES  ${Triangulation_RESOURCE_DIR}/Toolbar.bmp
25                                    ${Triangulation_RESOURCE_DIR}/Triangulation.rc)
26
27 # groups in the VS solution
28 source_group ("Source Files" FILES ${Triangulation_SOURCE_FILES}
29                                    ${COMMON_WINMAIN_FILE})
30
31 source_group ("Header Files" FILES ${Triangulation_HEADER_FILES}
32                                    ${Triangulation_RESOURCE_HEADER})
33
34 source_group ("Resource Files" FILES ${Triangulation_RESOURCE_FILES})
35
36 add_executable (Triangulation WIN32 ${Triangulation_SOURCE_FILES}
37                                     ${Triangulation_HEADER_FILES}
38                                     ${COMMON_WINMAIN_FILE}
39                                     ${Triangulation_RESOURCE_HEADER}
40                                     ${Triangulation_RESOURCE_FILES})
41
42 set_property (TARGET Triangulation PROPERTY FOLDER Samples)
43
44 install (TARGETS Triangulation RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}"
45                                ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}"
46                                LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}")
47
48 include_directories (${CMAKE_SOURCE_DIR}/src
49                      ${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation
50                      ${Triangulation_SRC_DIR}
51                      ${MFC_STANDARD_SAMPLES_DIR}/Common)
52
53 target_link_libraries (Triangulation mfcsample TKSTEP209 TKSTEPAttr TKBO)