Skip to content

Commit 1630c83

Browse files
committed
packaging: Use cmake GUUID generator (no need for uuidgen utility)
1 parent 0881538 commit 1630c83

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

packaging/WiX/CMakeLists.txt

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -514,33 +514,21 @@ function(make_wix_identifier STR VAR)
514514
set(${VAR} "${STR}.${out}" PARENT_SCOPE)
515515
endfunction()
516516

517+
517518
#
518519
# Generate UUIDs
519520
#
520521

521-
find_program(UUIDGEN_COMMAND uuidgen)
522-
523-
if(NOT UUIDGEN_COMMAND)
524-
message(FATAL_ERROR "Could not find uuidgen executable")
525-
endif()
526-
527522
function(generate_guid VAR)
528523

529-
EXECUTE_PROCESS(
530-
COMMAND ${UUIDGEN_COMMAND} -c
531-
RESULT_VARIABLE res
532-
OUTPUT_VARIABLE guid
533-
OUTPUT_STRIP_TRAILING_WHITESPACE
534-
)
535-
536-
if(res)
537-
message(FATAL_ERROR "Could not generate UUID: ${res}")
538-
endif()
539-
524+
string(RANDOM x)
525+
string(UUID guid NAMESPACE "96122528-4F58-40F8-AB22-96F9853460F8" NAME "${x}" TYPE MD5 UPPER)
526+
# message(STATUS "generated guid: ${guid}")
540527
set(${VAR} ${guid} PARENT_SCOPE)
541528

542529
endfunction()
543530

531+
544532
#
545533
# Convert path into a list
546534
#

0 commit comments

Comments
 (0)