CMake: Windows: Fix CMP0177 policy warnings

CMake 3.31+ have begun emitting warnings when you feed install()
paths that are not normalized (ie have, '.' or '..' in them) easiest
fix is just not use them.

This cleans up the windows sections of the build system, the other
platform devs will have to take a look on their respective platforms.
This commit is contained in:
Ray Molenkamp
2024-11-19 18:53:41 -07:00
parent c57ebc99eb
commit 536937b4d4
3 changed files with 10 additions and 10 deletions

View File

@@ -1409,14 +1409,14 @@ macro(windows_install_shared_manifest)
endif()
install(
FILES ${WINDOWS_INSTALL_FILES}
DESTINATION "./blender.shared"
DESTINATION "blender.shared"
CONFIGURATIONS ${WINDOWS_CONFIGURATIONS}
)
else()
# Python module without manifest.
install(
FILES ${WINDOWS_INSTALL_FILES}
DESTINATION "./bpy"
DESTINATION "bpy"
CONFIGURATIONS ${WINDOWS_CONFIGURATIONS}
)
endif()
@@ -1454,7 +1454,7 @@ macro(windows_generate_shared_manifest)
)
install(
FILES ${CMAKE_BINARY_DIR}/Debug/blender.shared.manifest
DESTINATION "./blender.shared"
DESTINATION "blender.shared"
CONFIGURATIONS Debug
)
endif()
@@ -1466,7 +1466,7 @@ macro(windows_generate_shared_manifest)
)
install(
FILES ${CMAKE_BINARY_DIR}/Release/blender.shared.manifest
DESTINATION "./blender.shared"
DESTINATION "blender.shared"
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
)
endif()

View File

@@ -153,7 +153,7 @@ if(WITH_WINDOWS_BUNDLE_CRT)
endif()
endforeach()
# Install the CRT to the blender.crt Sub folder.
install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ./blender.crt COMPONENT Libraries)
install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION blender.crt COMPONENT Libraries)
windows_generate_manifest(
FILES "${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}"
@@ -161,7 +161,7 @@ if(WITH_WINDOWS_BUNDLE_CRT)
NAME "blender.crt"
)
install(FILES ${CMAKE_BINARY_DIR}/blender.crt.manifest DESTINATION ./blender.crt)
install(FILES ${CMAKE_BINARY_DIR}/blender.crt.manifest DESTINATION blender.crt)
set(BUNDLECRT "<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.crt\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
endif()
if(NOT WITH_PYTHON_MODULE)
@@ -212,7 +212,7 @@ endif()
# /Zc:preprocessor: Available from MSVC 16.5 (1925) and up. Enables standards-conforming
# preprocessor.
if(NOT MSVC_CLANG)
string(APPEND CMAKE_CXX_FLAGS " /permissive- /Zc:__cplusplus /Zc:inline")
string(APPEND CMAKE_CXX_FLAGS " /permissive- /Zc:__cplusplus /Zc:inline /Zc:lambda")
string(APPEND CMAKE_C_FLAGS " /Zc:inline")
# For ARM64 devices, we need to tell MSVC to use the new preprocessor

View File

@@ -405,9 +405,9 @@ elseif(WIN32)
set(TARGETDIR_LIB ${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/bpy)
set(TARGETDIR_EXE ${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/bpy)
else()
set(TARGETDIR_VER "./${BLENDER_VERSION}")
set(TARGETDIR_VER "${BLENDER_VERSION}")
set(TARGETDIR_TEXT ".")
set(TARGETDIR_LIB "./blender.shared")
set(TARGETDIR_LIB "blender.shared")
set(TARGETDIR_EXE ".")
endif()
elseif(APPLE)
@@ -1818,7 +1818,7 @@ if((DEFINED LIBDIR) AND TARGETDIR_LIB)
${LIBDIR}/usd/plugin/usd/hdStorm
${LIBDIR}/usd/plugin/usd/usdShaders
${LIBDIR}/usd/plugin/usd/hioOiio
DESTINATION "./blender.shared/usd"
DESTINATION "blender.shared/usd"
)
elseif(USD_PYTHON_SUPPORT)
install(DIRECTORY