1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

Configuration - Add vcpkg layout support (#618)

- Addition of vcpkg layout configuration with CMake file placement in share/ directory for vcpkg compliance
- Introduction of OCCT_PROJECT_NAME parameter (defaults to "opencascade") for customizing directory structure in vcpkg layout
- Updated environment scripts and build templates to support vcpkg directory structure while maintaining backward compatibility
This commit is contained in:
Pasukhin Dmitry
2025-07-22 21:12:11 +01:00
committed by GitHub
parent 9219a3162e
commit 6fb9ee594b
11 changed files with 318 additions and 92 deletions

View File

@@ -3,8 +3,8 @@
if(OCCT_MACROS_ALREADY_INCLUDED)
return()
endif()
set(OCCT_MACROS_ALREADY_INCLUDED 1)
set(OCCT_MACROS_ALREADY_INCLUDED 1)
macro (OCCT_CHECK_AND_UNSET VARNAME)
if (DEFINED ${VARNAME})
@@ -696,13 +696,17 @@ macro (OCCT_UPDATE_TARGET_FILE)
endmacro()
macro (OCCT_INSERT_CODE_FOR_TARGET)
install(CODE "if (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$\")
set (OCCT_INSTALL_BIN_LETTER \"\")
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$\")
set (OCCT_INSTALL_BIN_LETTER \"i\")
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Dd][Ee][Bb][Uu][Gg])$\")
set (OCCT_INSTALL_BIN_LETTER \"d\")
endif()")
if (LAYOUT_IS_VCPKG)
install(CODE "set (OCCT_INSTALL_BIN_LETTER \"\")")
else()
install(CODE "if (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$\")
set (OCCT_INSTALL_BIN_LETTER \"\")
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$\")
set (OCCT_INSTALL_BIN_LETTER \"i\")
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Dd][Ee][Bb][Uu][Gg])$\")
set (OCCT_INSTALL_BIN_LETTER \"d\")
endif()")
endif()
endmacro()
macro (OCCT_UPDATE_DRAW_DEFAULT_FILE)