p9y: fix includes
[m6w6/libmemcached] / CPack.txt
index 92ea450381c2646d49ae231dab1b1eff220479cf..247daa21fde1a4855d6698a94ef42d92fbaaa7e8 100644 (file)
--- a/CPack.txt
+++ b/CPack.txt
@@ -53,7 +53,7 @@ execute_process(
         OUTPUT_VARIABLE PROJECT_TAG
         ERROR_VARIABLE GIT_ERROR_OUTPUT
 )
-if(ERROR_OUTPUT)
+if(GIT_ERROR_OUTPUT)
     message(NOTICE "git describe: ${GIT_ERROR_OUTPUT}")
 endif()
 string(STRIP "${PROJECT_TAG}" PROJECT_TAG)
@@ -94,9 +94,15 @@ endif()
 # keep last
 include(CPack)
 
+set(PUSH_ARTIFACTS_SH "${CMAKE_SOURCE_DIR}/scripts/push-artifacts.sh")
+if(WIN32)
+    set(PUSH_ARTIFACTS_CMD msys2 -c '${PUSH_ARTIFACTS_SH} ${CPACK_PACKAGE_DIRECTORY}/')
+else()
+    set(PUSH_ARTIFACTS_CMD ${PUSH_ARTIFACTS_SH} ${CPACK_PACKAGE_DIRECTORY}/)
+endif()
+
 add_custom_target(push-artifacts
-        COMMAND
-            bash ${CMAKE_SOURCE_DIR}/scripts/push-artifacts.sh "${CPACK_PACKAGE_DIRECTORY}/"
+        COMMAND ${PUSH_ARTIFACTS_CMD}
         WORKING_DIRECTORY ${CPACK_BINARY_DIR}
         )