mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0026878: CMake - encode properly version of OCCT in Windows binaries
.rc file has been added to each toolkit project for msvc
This commit is contained in:
parent
f85e7ddb9f
commit
dfadf64138
@ -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
|
||||
|
30
adm/templates/occt_toolkit.rc.in
Normal file
30
adm/templates/occt_toolkit.rc.in
Normal file
@ -0,0 +1,30 @@
|
||||
#include <windows.h>
|
||||
#include <Standard_Version.hxx>
|
||||
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user