CMake: disable moc for some targets and fix failure for existing builds

This commit is contained in:
wmayer
2021-04-19 15:12:43 +02:00
parent 92683e1f63
commit ee98ed5baf
2 changed files with 8 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
# SGEOM cmake build file
#PROJECT(SMESH Fortran CXX)
set(CMAKE_AUTOMOC FALSE)
SET(SMESH_VERSION_MAJOR 7) # see main CMakeLists.txt of FreeCAD
SET(SMESH_VERSION_MINOR 7)

View File

@@ -4,6 +4,13 @@ else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
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")
endif()
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src
@@ -84,11 +91,6 @@ SET(MRTE_SRCS
mtextedit.h
)
SET(MRTE_HDRS
mtextedit.h
)
SET(TechDrawGui_SRCS
${CMAKE_SOURCE_DIR}/src/Mod/TechDraw/InitGui.py
${TechDrawGui_SRCS}