File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Runtimes/Core/cmake/modules Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,11 @@ function(generate_plist project_name project_version target)
30
30
endif ()
31
31
endfunction ()
32
32
33
- if (NOT DEFINED CMAKE_MT )
34
- find_program (CMAKE_MT NAMES mt llvm-mt )
33
+ # FIXME: it appears that `CMAKE_MT` evaluates to an empty string which prevents
34
+ # the use of the variable. This aliases `MT` to `CMAKE_MT` and tries to fallback
35
+ # to known spellings for the tool.
36
+ if (WIN32 AND BUILD_SHARED_LIBS )
37
+ find_program (MT HINTS ${CMAKE_MT} NAMES mt llvm-mt REQUIRED )
35
38
endif ()
36
39
37
40
function (embed_manifest target )
@@ -62,6 +65,6 @@ function(embed_manifest target)
62
65
63
66
if (WIN32 )
64
67
add_custom_command (TARGET ${target} POST_BUILD
65
- COMMAND ${CMAKE_MT} -nologo -manifest "${_EM_BINARY_DIR} /${_EM_NAME} -${PROJECT_VERSION} .1.manifest" "-outputresource:$<TARGET_FILE:${target} >;#1" )
68
+ COMMAND " ${MT} " -nologo -manifest "${_EM_BINARY_DIR} /${_EM_NAME} -${PROJECT_VERSION} .1.manifest" "-outputresource:$<TARGET_FILE:${target} >;#1" )
66
69
endif ()
67
70
endfunction ()
You can’t perform that action at this time.
0 commit comments