0025114: CMake-based build tools for OCCT 7.0
[occt.git] / samples / mfc / standard / 02_Modeling / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2
3 project (Modeling)
4
5 add_definitions(-DWINVER=0x0501 -DUNICODE -D_UNICODE)
6 set (CMAKE_MFC_FLAG 2)
7
8 set (Modeling_SRC_DIR      ${MFC_STANDARD_SAMPLES_DIR}/02_Modeling/src)
9 set (Modeling_HEADER_FILES ${Modeling_SRC_DIR}/ISession_Direction.h
10                            ${Modeling_SRC_DIR}/ModelingApp.h
11                            ${Modeling_SRC_DIR}/ModelingDoc.h
12                            ${Modeling_SRC_DIR}/StdAfx.h
13                            ${Modeling_SRC_DIR}/State.h )
14 set (Modeling_SOURCE_FILES ${Modeling_SRC_DIR}/ISession_Direction.cpp
15                            ${Modeling_SRC_DIR}/ModelingApp.cpp
16                            ${Modeling_SRC_DIR}/ModelingDoc.cpp
17                            ${Modeling_SRC_DIR}/StdAfx.cpp )
18
19 set (Modeling_RESOURCE_DIR    ${MFC_STANDARD_SAMPLES_DIR}/02_Modeling/res)
20 set (Modeling_RESOURCE_HEADER ${Modeling_RESOURCE_DIR}/resource.h)
21 set (Modeling_RESOURCE_FILES  ${Modeling_RESOURCE_DIR}/fram2.bmp
22                               ${Modeling_RESOURCE_DIR}/Toolbar.bmp
23                               ${Modeling_RESOURCE_DIR}/Modeling.rc)
24
25 # groups in the VS solution
26 source_group ("Source Files" FILES ${Modeling_SOURCE_FILES}
27                                    ${COMMON_WINMAIN_FILE})
28
29 source_group ("Header Files" FILES ${Modeling_HEADER_FILES}
30                                    ${Modeling_RESOURCE_HEADER})
31
32 source_group ("Resource Files" FILES ${Modeling_RESOURCE_FILES})
33
34 add_executable ( Modeling WIN32 ${Modeling_SOURCE_FILES}
35                                 ${Modeling_HEADER_FILES}
36                                 ${COMMON_WINMAIN_FILE}
37                                 ${Modeling_RESOURCE_HEADER}
38                                 ${Modeling_RESOURCE_FILES})
39
40 set_property (TARGET Modeling PROPERTY FOLDER Samples)
41
42 install (TARGETS Modeling 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 (${CMAKE_SOURCE_DIR}/src
47                      ${MFC_STANDARD_SAMPLES_DIR}/02_Modeling
48                      ${Modeling_SRC_DIR}
49                      ${MFC_STANDARD_SAMPLES_DIR}/Common)
50
51 target_link_libraries (Modeling mfcsample TKSTEP209 TKSTEPAttr TKSTEPBase TKBO)