diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index f7a845cfe2..b191cd6c68 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -116,8 +116,19 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES}) endforeach() string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}") +set (USED_RCFILE "") +if (MSVC) + set (USED_RCFILE "${CMAKE_BINARY_DIR}/resources/${PROJECT_NAME}.rc") + + if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in") + configure_file("${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY) + else() + configure_file("${CMAKE_SOURCE_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY) + endif() +endif() + if ("${PROJECT_NAME}" STREQUAL "DRAWEXE") - add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES}) + add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE}) install (TARGETS ${PROJECT_NAME} CONFIGURATIONS Release @@ -129,7 +140,7 @@ if ("${PROJECT_NAME}" STREQUAL "DRAWEXE") CONFIGURATIONS Debug DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") else() - add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES}) + add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE}) install (TARGETS ${PROJECT_NAME} CONFIGURATIONS Release diff --git a/adm/templates/occt_toolkit.rc.in b/adm/templates/occt_toolkit.rc.in new file mode 100644 index 0000000000..e92bae1f52 --- /dev/null +++ b/adm/templates/occt_toolkit.rc.in @@ -0,0 +1,30 @@ +#include +#include + +VS_VERSION_INFO VERSIONINFO +FILEVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0 +PRODUCTVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0 +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG +FILEFLAGS VS_FF_DEBUG +#endif +FILEOS VOS_NT +FILETYPE VFT_DLL +FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN BLOCK "040904E4" // Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) + BEGIN + VALUE "FileDescription", "@PROJECT_NAME@ Toolkit\000" + VALUE "FileVersion", OCC_VERSION_STRING_EXT "\000" + VALUE "LegalCopyright", "\251 OPEN CASCADE SAS\000" + VALUE "ProductName", "@PROJECT_NAME@\000" + VALUE "ProductVersion", OCC_VERSION_STRING_EXT "\000" + VALUE "OfficialSite", "www.opencascade.org\000" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04E4 + END +END