CMake 找不到源文件,即使它位于正确的位置



我正在为easypaint添加一些镜像效果。在构建项目时,我遇到了一个问题。当我在 CMake 中运行 generate 时(是的,我知道 QMake 会更好,但我们必须使用 CMake),它一直在 CMakeLIsts.txt 文件中给我一个错误,说它找不到我的镜像 cpp 文件之一。我已将所有代码插入到项目中的相应文件和标头中,并且已将标头和 cpp 文件添加到 CMake 列表文件中的适当位置。

CMake 中的错误: """" CMake Error at CMakeLists.txt:129 (add_executable): 找不到源文件: 来源/效果/镜像右效果.cpp

尝试扩展 .c .C .c++ .cc .cpp .cxx .cu .m .唰�� .hpp .hxx .in .txx

我仔细检查了所有文件是否都在正确的目录中,所以我不知道问题是什么。

#------- headers --------
set (HEADERS
sources/mainwindow.h
sources/easypaintenums.h
sources/imagearea.h
sources/datasingleton.h
sources/additionaltools.h
sources/effects/abstracteffect.h
sources/effects/negativeeffect.h
sources/effects/grayeffect.h
sources/effects/binarizationeffect.h
sources/effects/customeffect.h
sources/effects/effectwithsettings.h
sources/effects/gammaeffect.h
sources/effects/mirrorrighteffect.h   <<<-----------My file
sources/effects/mirrordowneffect.h    <<<-----------My file
sources/effects/gaussianblureffect.h
sources/effects/sharpeneffect.h
sources/undocommand.h
sources/widgets/toolbar.h
sources/widgets/colorchooser.h
sources/widgets/palettebar.h
sources/widgets/palettebutton.h
sources/widgets/shortcutedit.h
sources/widgets/abstracteffectsettings.h
sources/widgets/customfiltersettings.h
sources/widgets/sharpenfiltersettings.h
sources/widgets/gaussianblurfiltersettings.h
sources/widgets/imagepreview.h
sources/dialogs/resizedialog.h
sources/dialogs/settingsdialog.h
sources/dialogs/textdialog.h
sources/dialogs/effectsettingsdialog.h
sources/instruments/abstractinstrument.h
sources/instruments/abstractselection.h
sources/instruments/selectioninstrument.h
sources/instruments/pencilinstrument.h
sources/instruments/lineinstrument.h
sources/instruments/eraserinstrument.h
sources/instruments/rectangleinstrument.h
sources/instruments/ellipseinstrument.h
sources/instruments/fillinstrument.h
sources/instruments/sprayinstrument.h
sources/instruments/magnifierinstrument.h
sources/instruments/colorpickerinstrument.h
sources/instruments/curvelineinstrument.h
sources/instruments/textinstrument.h)
#------- sources --------
set (SOURCES
sources/main.cpp
sources/mainwindow.cpp
sources/imagearea.cpp
sources/datasingleton.cpp
sources/additionaltools.cpp
sources/effects/abstracteffect.cpp
sources/effects/negativeeffect.cpp
sources/effects/grayeffect.cpp
sources/effects/binarizationeffect.cpp
sources/effects/effectwithsettings.cpp
sources/effects/gammaeffect.cpp
sources/effect/mirrorrighteffect.cpp   <<<-----------My file
sources/effect/mirrordowneffect.cpp    <<<-----------My file
sources/undocommand.cpp
sources/widgets/toolbar.cpp
sources/widgets/colorchooser.cpp
sources/widgets/palettebar.cpp
sources/widgets/palettebutton.cpp
sources/widgets/shortcutedit.cpp
sources/widgets/customfiltersettings.cpp
sources/widgets/sharpenfiltersettings.cpp
sources/widgets/gaussianblurfiltersettings.cpp
sources/widgets/imagepreview.cpp
sources/dialogs/resizedialog.cpp
sources/dialogs/settingsdialog.cpp
sources/dialogs/textdialog.cpp
sources/dialogs/effectsettingsdialog.cpp
sources/instruments/abstractinstrument.cpp
sources/instruments/abstractselection.cpp
sources/instruments/selectioninstrument.cpp
sources/instruments/pencilinstrument.cpp
sources/instruments/lineinstrument.cpp
sources/instruments/eraserinstrument.cpp
sources/instruments/rectangleinstrument.cpp
sources/instruments/ellipseinstrument.cpp
sources/instruments/fillinstrument.cpp
sources/instruments/sprayinstrument.cpp
sources/instruments/magnifierinstrument.cpp
sources/instruments/colorpickerinstrument.cpp
sources/instruments/curvelineinstrument.cpp
sources/instruments/textinstrument.cpp)

你似乎在sources/———>>>effect<<<——-/mirrorrighteffect.cpp中有错别字.

我相信它一定是sources/effects/mirrorrighteffect.cpp的。

最新更新