TD: do not delete mtextedit.h for in-source builds

This commit is contained in:
wmayer
2021-04-25 13:15:20 +02:00
parent c69f245d6f
commit ea96f18601

View File

@@ -6,9 +6,11 @@ endif(MSVC)
# In previous versions this target copied mtextedit.h to the binary directory that causes
# automoc to generate linking errors.
if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/mtextedit.h)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/mtextedit.h)
execute_process(COMMAND "${CMAKE_COMMAND}" -E touch_nocreate "${CMAKE_CURRENT_SOURCE_DIR}/mtextedit.h")
if(NOT ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/mtextedit.h)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/mtextedit.h)
execute_process(COMMAND "${CMAKE_COMMAND}" -E touch_nocreate "${CMAKE_CURRENT_SOURCE_DIR}/mtextedit.h")
endif()
endif()
include_directories(