In CMake 3.0 the policy CMP0050 was introduced where it could be set to OLD to keep this behaviour while for NEW an error was raised. Since CMake 3.5.2 a warning comes up when using the OLD behaviour and that it will be removed in a future version. In FreeCAD we switched to the new behaviour now and removed the SOURCE signature from add_custom_command which affects the macros fc_copy_sources, fc_target_copy_resource and fc_target_copy_resource_flat and their usage. It's not possible any more to add files to a target by using the macros. Now a file must be added to the target before using the macros. This commit fixes it for Arch, Draft, OpenSCAD, Material, Plot and Ship
123 lines
2.4 KiB
CMake
123 lines
2.4 KiB
CMake
IF (BUILD_GUI)
|
|
PYSIDE_WRAP_RC(Plot_QRC_SRCS resources/Plot.qrc)
|
|
ENDIF (BUILD_GUI)
|
|
|
|
SET(PlotMain_SRCS
|
|
Plot.py
|
|
InitGui.py
|
|
PlotGui.py
|
|
)
|
|
SOURCE_GROUP("" FILES ${PlotMain_SRCS})
|
|
|
|
SET(PlotAxes_SRCS
|
|
plotAxes/__init__.py
|
|
plotAxes/TaskPanel.py
|
|
plotAxes/TaskPanel.ui
|
|
)
|
|
SOURCE_GROUP("plotaxes" FILES ${PlotAxes_SRCS})
|
|
|
|
SET(PlotLabels_SRCS
|
|
plotLabels/__init__.py
|
|
plotLabels/TaskPanel.py
|
|
plotLabels/TaskPanel.ui
|
|
)
|
|
SOURCE_GROUP("plotlabels" FILES ${PlotLabels_SRCS})
|
|
|
|
SET(PlotPositions_SRCS
|
|
plotPositions/__init__.py
|
|
plotPositions/TaskPanel.py
|
|
plotPositions/TaskPanel.ui
|
|
)
|
|
SOURCE_GROUP("plotpositions" FILES ${PlotPositions_SRCS})
|
|
|
|
SET(PlotSave_SRCS
|
|
plotSave/__init__.py
|
|
plotSave/TaskPanel.py
|
|
plotSave/TaskPanel.ui
|
|
)
|
|
SOURCE_GROUP("plotsave" FILES ${PlotSave_SRCS})
|
|
|
|
SET(PlotSeries_SRCS
|
|
plotSeries/__init__.py
|
|
plotSeries/TaskPanel.py
|
|
plotSeries/TaskPanel.ui
|
|
)
|
|
SOURCE_GROUP("plotseries" FILES ${PlotSeries_SRCS})
|
|
|
|
SET(PlotUtils_SRCS
|
|
plotUtils/__init__.py
|
|
plotUtils/Paths.py
|
|
)
|
|
SOURCE_GROUP("plotutils" FILES ${PlotUtils_SRCS})
|
|
|
|
SET(all_files ${PlotMain_SRCS} ${PlotAxes_SRCS} ${PlotLabels_SRCS} ${PlotPositions_SRCS} ${PlotSave_SRCS} ${PlotSeries_SRCS} ${PlotUtils_SRCS})
|
|
|
|
SET(PlotGuiIcon_SVG
|
|
resources/icons/PlotWorkbench.svg
|
|
)
|
|
|
|
ADD_CUSTOM_TARGET(Plot ALL
|
|
SOURCES ${all_files} ${Plot_QRC_SRCS} ${PlotGuiIcon_SVG}
|
|
)
|
|
|
|
fc_copy_sources(Plot "${CMAKE_BINARY_DIR}/Mod/Plot" ${all_files})
|
|
|
|
fc_copy_sources(Plot "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Plot" ${PlotGuiIcon_SVG})
|
|
|
|
IF (BUILD_GUI)
|
|
fc_target_copy_resource(Plot
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${CMAKE_BINARY_DIR}/Mod/Plot
|
|
Plot_rc.py)
|
|
ENDIF (BUILD_GUI)
|
|
|
|
INSTALL(
|
|
FILES
|
|
${PlotAxes_SRCS}
|
|
DESTINATION
|
|
Mod/Plot/plotAxes
|
|
)
|
|
INSTALL(
|
|
FILES
|
|
${PlotLabels_SRCS}
|
|
DESTINATION
|
|
Mod/Plot/plotLabels
|
|
)
|
|
INSTALL(
|
|
FILES
|
|
${PlotPositions_SRCS}
|
|
DESTINATION
|
|
Mod/Plot/plotPositions
|
|
)
|
|
INSTALL(
|
|
FILES
|
|
${PlotSave_SRCS}
|
|
DESTINATION
|
|
Mod/Plot/plotSave
|
|
)
|
|
INSTALL(
|
|
FILES
|
|
${PlotSeries_SRCS}
|
|
DESTINATION
|
|
Mod/Plot/plotSeries
|
|
)
|
|
INSTALL(
|
|
FILES
|
|
${PlotUtils_SRCS}
|
|
DESTINATION
|
|
Mod/Plot/plotUtils
|
|
)
|
|
INSTALL(
|
|
FILES
|
|
${PlotMain_SRCS}
|
|
${Plot_QRC_SRCS}
|
|
DESTINATION
|
|
Mod/Plot
|
|
)
|
|
INSTALL(
|
|
FILES
|
|
${PlotGuiIcon_SVG}
|
|
DESTINATION
|
|
"${CMAKE_INSTALL_DATADIR}/Mod/Plot/resources/icons"
|
|
)
|