Make debug builds work again.

Only run mt.exe on the manifest in non development builds.
This commit is contained in:
Anthony J. Thibault 2016-04-04 12:24:26 -07:00
parent d1898eeac6
commit a9197385b5

View file

@ -107,12 +107,15 @@ elseif(WIN32)
# add an executable that also has the icon itself and the configured rc file as resources # add an executable that also has the icon itself and the configured rc file as resources
add_executable(${TARGET_NAME} WIN32 ${INTERFACE_SRCS} ${QM} ${CONFIGURE_ICON_RC_OUTPUT}) add_executable(${TARGET_NAME} WIN32 ${INTERFACE_SRCS} ${QM} ${CONFIGURE_ICON_RC_OUTPUT})
add_custom_command( if ( NOT DEV_BUILD )
TARGET ${TARGET_NAME} add_custom_command(
POST_BUILD TARGET ${TARGET_NAME}
COMMAND "mt.exe" -manifest "${CMAKE_CURRENT_SOURCE_DIR}/interface.exe.manifest" -inputresource:"$<TARGET_FILE:${TARGET_NAME}>"\;\#1 -outputresource:"$<TARGET_FILE:${TARGET_NAME}>"\;\#1 POST_BUILD
COMMENT "Adding OS version support manifest to exe" COMMAND "mt.exe" -manifest "${CMAKE_CURRENT_SOURCE_DIR}/interface.exe.manifest" -inputresource:"$<TARGET_FILE:${TARGET_NAME}>"\;\#1 -outputresource:"$<TARGET_FILE:${TARGET_NAME}>"\;\#1
) COMMENT "Adding OS version support manifest to exe"
)
endif()
else() else()
add_executable(${TARGET_NAME} ${INTERFACE_SRCS} ${QM}) add_executable(${TARGET_NAME} ${INTERFACE_SRCS} ${QM})
endif() endif()