KTextEditor & Frameworks question

Christoph Cullmann cullmann at absint.com
Tue Jan 7 19:31:50 UTC 2014


> On Tuesday 07 January 2014 19:57:56 Christoph Cullmann wrote:
> > Hi,
> > 
> > I just tried to fix the naming issues.
> > 
> > Does that try here look better
> > 
> > http://quickgit.kde.org/?p=scratch%2Fcullmann%2Fktexteditor.git
> 
> I see a ${FooBar_HEADERS} in src/CMakeLists.txt which is used but not set,
> should be removed.
Right ;)

> 
> src/include/CMakeList.txt is the one calling ecm_generate_headers, but in a
> strange way: it sets KTEXTEDITOR_PUBLIC_HEADERS which was already set,
> so it overwrites it.
> You can remove the whole list of lowercase headers, ecm_generate_headers
> generates it for you from the uppercase ones.
> And then just install with the contents of that variable. *after* the call to
> ecm_generate_headers, not before ;)
Yeah, I guess I was confused here, much easier.

> 
> 
> > add_library (KF5TextEditor ${ktexteditor_LIB_SRCS}
> ${KTEXTEDITOR_PUBLIC_HEADERS})
> 
> Why pass headers to add_library?
Just for automoc, without that, I get stuff like:

Linking CXX shared library libKF5TextEditor.so
CMakeFiles/KF5TextEditor.dir/view/kateviewinternal.cpp.o: In function `KateViewInternal::scrollColumns(int)':
/home/cullmann/local/kf5/src/ktexteditor/src/view/kateviewinternal.cpp:522: undefined reference to `KTextEditor::View::horizontalScrollPositionChanged(KTextEditor::View*)'
CMakeFiles/KF5TextEditor.dir/view/kateviewinternal.cpp.o: In function `KateViewInternal::scrollPos(KTextEditor::Cursor&, bool, bool)':
/home/cullmann/local/kf5/src/ktexteditor/src/view/kateviewinternal.cpp:489: undefined reference to `KTextEditor::View::verticalScrollPositionChanged(KTextEditor::View*, KTextEditor::Cursor const&)'
CMakeFiles/KF5TextEditor.dir/view/kateviewinternal.cpp.o: In function `KateViewInternal::updateCursor(KTextEditor::Cursor const&, bool, bool, bool)':
/home/cullmann/local/kf5/src/ktexteditor/src/view/kateviewinternal.cpp:1942: undefined reference to `KTextEditor::View::cursorPositionChanged(KTextEditor::View*, KTextEditor::Cursor const&)'
CMakeFiles/KF5TextEditor.dir/view/kateviewinternal.cpp.o: In function `KateViewInternal::editEnd(int, int, bool)':
/home/cullmann/local/kf5/src/ktexteditor/src/view/kateviewinternal.cpp:3449: undefined reference to `KTextEditor::View::selectionChanged(KTextEditor::View*)'
CMakeFiles/KF5TextEditor.dir/document/katedocument.cpp.o: In function `KateDocument::updateDocName()':
/home/cullmann/local/kf5/src/ktexteditor/src/document/katedocument.cpp:3712: undefined reference to `KTextEditor::Document::documentNameChanged(KTextEditor::Document*)'
CMakeFiles/KF5TextEditor.dir/document/katedocument.cpp.o: In function `KateDocument::slotCompleted()':
/home/cullmann/local/kf5/src/ktexteditor/src/document/katedocument.cpp:4935: undefined reference to `KTextEditor::Document::documentSavedOrUploaded(KTextEditor::Document*, bool)'
CMakeFiles/KF5TextEditor.dir/document/katedocument.cpp.o: In function `KateDocument::createView(QWidget*, KTextEditor::MainWindow*)':
/home/cullmann/local/kf5/src/ktexteditor/src/document/katedocument.cpp:290: undefined reference to `KTextEditor::Document::viewCreated(KTextEditor::Document*, KTextEditor::View*)'
CMakeFiles/KF5TextEditor.dir/document/katedocument.cpp.o: In function `KateDocument::~KateDocument()':
/home/cullmann/local/kf5/src/ktexteditor/src/document/katedocument.cpp:237: undefined reference to `KTextEditor::Document::aboutToClose(KTextEditor::Document*)'
CMakeFiles/KF5TextEditor.dir/document/katedocument.cpp.o: In function `KateDocument::~KateDocument()':
/home/cullmann/local/kf5/src/ktexteditor/src/document/katedocument.cpp:237: undefined reference to `KTextEditor::Document::aboutToClose(KTextEditor::Document*)'
CMakeFiles/KF5TextEditor.dir/document/katedocument.cpp.o: In function `KateDocument::setModified(bool)':
/home/cullmann/local/kf5/src/ktexteditor/src/document/katedocument.cpp:2515: undefined reference to `KTextEditor::Document::modifiedChanged(KTextEditor::Document*)'
CMakeFiles/KF5TextEditor.dir/document/katedocument.cpp.o: In function `KateDocument::setReadWrite(bool)':
/home/cullmann/local/kf5/src/ktexteditor/src/document/katedocument.cpp:2501: undefined reference to `KTextEditor::Document::readWriteChanged(KTextEditor::Document*)'
CMakeFiles/KF5TextEditor.dir/document/katedocument.cpp.o: In function `KateDocument::editEnd()':
/home/cullmann/local/kf5/src/ktexteditor/src/document/katedocument.cpp:844: undefined reference to `KTextEditor::Document::textChanged(KTextEditor::Document*)'
CMakeFiles/KF5TextEditor.dir/document/katedocument.cpp.o: In function `KateDocument::editInsertText(int, int, QString const&)':
/home/cullmann/local/kf5/src/ktexteditor/src/document/katedocument.cpp:1024: undefined reference to `KTextEditor::Document::textInserted(KTextEditor::Document*, KTextEditor::Range const&)'


> 
> > 
> > target_link_libraries(KF5TextEditor LINK_PUBLIC KF5::Parts
> >                                   LINK_PRIVATE KF5::I18n
> >     Qt5::Script
> >     KF5::Archive
> >     KF5::GuiAddons
> >     KF5::I18n
> >     KF5::IconThemes
> >     KF5::ItemViews
> >     KF5::KCMUtils
> >     KF5::KIOFileWidgets
> >     KF5::Notifications
> >     KF5::Parts
> >     KF5::PrintUtils
> >     KF5::SonnetCore)
> 
> Are you sure that all of these should be private? The ones that provide
> classes that appear in the public API should be under LINK_PUBLIC.
Will need to think which stuff is in the API, but yeah, will resort.

> 
> > set( katepart_PART_UI
> > )
> 
> unused, remove.
removed

> 
> I tested the grafting, works fine.
Cool, thanks.

Beside the target_link_libraries, which I need to resort, other stuff should now be pushed.

Is it ok then to request moving or are there other constraints, too?

I guess I shall add all required frameworks to the KF5TextEditorConfig.cmake.in, too, or?

Greetings
Christoph

-- 
----------------------------- Dr.-Ing. Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH      Email: cullmann at AbsInt.com
Science Park 1                         Tel:   +49-681-38360-22
66123 Saarbrücken                      Fax:   +49-681-38360-20
GERMANY                                WWW:   http://www.AbsInt.com
--------------------------------------------------------------------
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234


More information about the Kde-frameworks-devel mailing list