You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/02/01 08:35:18 UTC

[GitHub] [nifi-minifi-cpp] fgerlits commented on a change in pull request #985: MINIFICPP-1375 more robust UCRT search

fgerlits commented on a change in pull request #985:
URL: https://github.com/apache/nifi-minifi-cpp/pull/985#discussion_r567641476



##########
File path: CMakeLists.txt
##########
@@ -650,13 +650,21 @@ if(WIN32)
 	if (MSI_REDISTRIBUTE_UCRT_NONASL)
 		set(UCRT_DIR_NAT "$ENV{WindowsSdkDir}Redist\\ucrt\\DLLs\\$ENV{Platform}")
 		file(TO_CMAKE_PATH "${UCRT_DIR_NAT}" UCRT_DIR)
-		message("Using UCRT from ${UCRT_DIR}")
-		file(GLOB UCRT_DLLS "${UCRT_DIR}/*.dll")
-		file(COPY ${UCRT_DLLS} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/ucrt")
-		install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ucrt/"
-			DESTINATION bin
-			COMPONENT bin
-		)
+		if (NOT EXISTS "${UCRT_DIR}")
+			set(UCRT_DIR_NAT "$ENV{WindowsSdkDir}Redist\\$ENV{WindowsSDKVersion}ucrt\\DLLs\\$ENV{Platform}")
+			file(TO_CMAKE_PATH "${UCRT_DIR_NAT}" UCRT_DIR)
+		endif()
+		if (NOT EXISTS "${UCRT_DIR}")
+			message("ERROR: Couldn't find UCRT")

Review comment:
       I think this should at least be a `message(WARNING "...")`, maybe a SEND_ERROR or a FATAL_ERROR.  (Without a mode, it is treated as a NOTICE: https://cmake.org/cmake/help/latest/command/message.html)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org