diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake index 92a8db33dc..9ca124d503 100644 --- a/adm/cmake/occt_macros.cmake +++ b/adm/cmake/occt_macros.cmake @@ -762,7 +762,7 @@ macro (OCCT_UPDATE_TARGET_FILE) install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE) - file (GLOB ALL_OCCT_TARGET_FILES \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\") + file (GLOB ALL_OCCT_TARGET_FILES \"\$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\") foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES}) file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT) file (REMOVE \"\${TARGET_FILENAME}\") diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index 1a7eb59b5c..36accf907f 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -134,7 +134,7 @@ if (EXECUTABLE_PROJECT) else() add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES}) - if (MSVC) + if (MSVC AND BUILD_SHARED_LIBS) if (BUILD_FORCE_RelWithDebInfo) set (aReleasePdbConf "Release") else() diff --git a/adm/templates/OpenCASCADEConfig.cmake.in b/adm/templates/OpenCASCADEConfig.cmake.in index e391ddfe8e..5079ba63c1 100644 --- a/adm/templates/OpenCASCADEConfig.cmake.in +++ b/adm/templates/OpenCASCADEConfig.cmake.in @@ -27,7 +27,7 @@ get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$") get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) endif() -if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$") +if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib(32|64)?$") get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) endif() if (OpenCASCADE_INSTALL_PREFIX MATCHES "/libs/${CMAKE_ANDROID_ARCH_ABI}$")