1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00
ibs 234e52be90 0023874: Converting OCCT MFC samples to CMake build system.
CMake meta-projects for samples were added
launch script for samples was added
unrelated changes: CSF_GraphicShr variable were removed
occt building with cmake article was updated
2013-11-14 15:11:59 +04:00

46 lines
1.9 KiB
CMake

cmake_minimum_required (VERSION 2.6)
project (Viewer2d)
add_definitions (-DWINVER=0x0500)
set (Viewer2d_SOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d/src)
set (Viewer2d_HEADER_FILES ${Viewer2d_SOURCE_DIR}/Viewer2dApp.h
${Viewer2d_SOURCE_DIR}/Viewer2dDoc.h
${Viewer2d_SOURCE_DIR}/StdAfx.h )
set (Viewer2d_SOURCE_FILES ${Viewer2d_SOURCE_DIR}/Viewer2dApp.cpp
${Viewer2d_SOURCE_DIR}/Viewer2dDoc.cpp
${Viewer2d_SOURCE_DIR}/StdAfx.cpp )
set (Viewer2d_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d/res)
set (Viewer2d_RESOURCE_HEADER ${Viewer2d_RESOURCE_DIR}/resource.h)
set (Viewer2d_RESOURCE_FILES ${Viewer2d_RESOURCE_DIR}/Toolbar.bmp
${Viewer2d_RESOURCE_DIR}/Viewer2d.rc)
# groups in the VS solution
source_group ("Source Files" FILES ${Viewer2d_SOURCE_FILES}
${COMMON_WINMAIN_FILE})
source_group ("Header Files" FILES ${Viewer2d_HEADER_FILES}
${Viewer2d_RESOURCE_HEADER})
source_group ("Resource Files" FILES ${Viewer2d_RESOURCE_FILES})
add_executable (Viewer2d WIN32 ${Viewer2d_SOURCE_FILES}
${Viewer2d_HEADER_FILES}
${COMMON_WINMAIN_FILE}
${Viewer2d_RESOURCE_HEADER}
${Viewer2d_RESOURCE_FILES})
set_property (TARGET Viewer2d PROPERTY FOLDER Samples)
install (TARGETS Viewer2d RUNTIME DESTINATION "${INSTALL_DIR}/bin"
ARCHIVE DESTINATION "${INSTALL_DIR}/lib"
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
include_directories (${OCCT_ROOT}/inc
${MFC_STANDARD_SAMPLES_DIR}/Common
${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d
${Viewer2d_SOURCE_DIR})
target_link_libraries (Viewer2d mfcsample)