mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 09:30:48 +08:00
0027351: Custom OCCT DLL name suffixes
Added generation of libraries with postfix.
This commit is contained in:
@@ -576,3 +576,26 @@ macro (OCCT_INSERT_CODE_FOR_TARGET)
|
||||
set (OCCT_INSTALL_BIN_LETTER \"d\")
|
||||
endif()")
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_UPDATE_DRAW_DEFAULT_FILE)
|
||||
install(CODE "cmake_policy(PUSH)
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
set (DRAW_DEFAULT_FILE_NAME \"${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}/DrawResources/DrawPlugin\")
|
||||
file (STRINGS \"\${DRAW_DEFAULT_FILE_NAME}\" DRAW_DEFAULT_CONTENT)
|
||||
file (REMOVE \"\${DRAW_DEFAULT_FILE_NAME}\")
|
||||
foreach (line IN LISTS DRAW_DEFAULT_CONTENT)
|
||||
string (REGEX MATCH \": TK\([a-zA-Z]+\)$\" IS_TK_LINE \"\${line}\")
|
||||
string (REGEX REPLACE \": TK\([a-zA-Z]+\)$\" \": TK\${CMAKE_MATCH_1}${BUILD_SHARED_LIBRARY_NAME_POSTFIX}\" line \"\${line}\")
|
||||
file (APPEND \"\${DRAW_DEFAULT_FILE_NAME}\" \"\${line}\\n\")
|
||||
endforeach()
|
||||
cmake_policy(POP)")
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CREATE_SYMLINK_TO_FILE LIBRARY_NAME LINK_NAME)
|
||||
if (NOT WIN32)
|
||||
install (CODE "if (EXISTS \"${LIBRARY_NAME}\")
|
||||
execute_process (COMMAND ln -s \"${LIBRARY_NAME}\" \"${LINK_NAME}\")
|
||||
endif()
|
||||
")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
Reference in New Issue
Block a user