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)
3030 endif ()
3131endfunction ()
3232
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)
3538endif ()
3639
3740function (embed_manifest target )
@@ -62,6 +65,6 @@ function(embed_manifest target)
6265
6366 if (WIN32 )
6467 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" )
6669 endif ()
6770endfunction ()
You can’t perform that action at this time.
0 commit comments