Michele Calgaro wrote:
Ah, thanks, this is exactly what I was looking for. It has been a couple of years since I last created CMakeList.txt . I think I would need a refresh of this part of my memory - it wasn't thaaaat hard as the automake stuff.
Copy one from another folder (example from vcard or vcardfolder) and modify from there. Easier way to learn something ;-)
New query:
- Is there a good way to convert the Makefile.am into CMakeList.txt?
- Is there an alternative way to test the library with the function of
interest without installing it?
You can create a small test program with your test code, compile and execute. That should be reasonably quick. No need to set any special linking folder, if you have everything installed correctly if should just find the right function in the right library file by itself. That is how I tested that regex code in VCardTool
Cheers Michele
I created usable CMakeList.txt to compile tests in tdeabc. This I did by extending the present CMakeList.txt file with some information from the Makefile.am. This is almost working. The problem I face is this
[ 71%] Building CXX object tdeabc/tests/CMakeFiles/testldapclient.dir/testldapclient.cpp.o /opt/software/KDE/TDE/tdelibs-trinity-14.0.3/tdeabc/tests/testldapclient.cpp:161:30: fatal error: testldapclient.moc: No such file or directory #include "testldapclient.moc" ^ Can you advise how one could tell CMake to create (and use) testldapclient.moc ?
Next thing to do is to make possible compiling the tests for vcardparser.
thanks in advance
regards