forked from qt-creator/qt-creator
CmdBridge: Add .exe to binaries on Windows
Task-number: QTCREATORBUG-32101 Change-Id: I9ee7b536f04242a2a2e53056dd5f65d4794fad08 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -920,7 +920,10 @@ expected_str<FilePath> Client::getCmdBridgePath(
|
|||||||
const QString type = typeToString.value(osType);
|
const QString type = typeToString.value(osType);
|
||||||
const QString arch = archToString.value(osArch);
|
const QString arch = archToString.value(osArch);
|
||||||
|
|
||||||
const QString cmdBridgeName = QStringLiteral("cmdbridge-%1-%2").arg(type, arch);
|
QString cmdBridgeName = QStringLiteral("cmdbridge-%1-%2").arg(type, arch);
|
||||||
|
|
||||||
|
if (osType == OsType::OsTypeWindows)
|
||||||
|
cmdBridgeName += QStringLiteral(".exe");
|
||||||
|
|
||||||
const FilePath result = libExecPath.resolvePath(cmdBridgeName);
|
const FilePath result = libExecPath.resolvePath(cmdBridgeName);
|
||||||
if (result.exists())
|
if (result.exists())
|
||||||
|
@@ -8,6 +8,10 @@ function(go_build NAME SOURCES PLATFORMS ARCHITECTURES LDFLAGS)
|
|||||||
set(TARGET_NAME ${NAME}-${PLATFORM}-${ARCHITECTURE})
|
set(TARGET_NAME ${NAME}-${PLATFORM}-${ARCHITECTURE})
|
||||||
set(OUTPUT ${OUTPUT_FOLDER}/${TARGET_NAME})
|
set(OUTPUT ${OUTPUT_FOLDER}/${TARGET_NAME})
|
||||||
|
|
||||||
|
if (${PLATFORM} STREQUAL "windows")
|
||||||
|
string(APPEND OUTPUT ".exe")
|
||||||
|
endif()
|
||||||
|
|
||||||
if ((${PLATFORM} STREQUAL "linux" OR (${PLATFORM} STREQUAL "windows" AND ${ARCHITECTURE} STREQUAL "amd64")) AND NOT UPX_BIN STREQUAL "UPX_BIN-NOTFOUND")
|
if ((${PLATFORM} STREQUAL "linux" OR (${PLATFORM} STREQUAL "windows" AND ${ARCHITECTURE} STREQUAL "amd64")) AND NOT UPX_BIN STREQUAL "UPX_BIN-NOTFOUND")
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${OUTPUT}"
|
OUTPUT "${OUTPUT}"
|
||||||
|
Reference in New Issue
Block a user