WIP:Conversion to the cmake building system. #46

Draft
Ghost wants to merge 1 commits from feat/cmakeConv into master
Ghost commented 3 years ago

Rem: 3 files to generate first with parameters provided by configure:

  • ntconfig.h
  • ntqmodules.h in the "include" folder
  • qconfig.cpp 🔼 removed limit 267 chars array length, must be checked! 🔼

check for:
Amarok's MySQL, HAVE_STRUCT_ST_MYSQL vs HAVE_STRUCT_MYSQL

Have a look at the Threading support.

Rem: 3 files to generate first with parameters provided by configure: - ntconfig.h - ntqmodules.h in the "include" folder - qconfig.cpp :arrow_up_small: removed limit 267 chars array length, must be checked! :arrow_up_small: check for: Amarok's MySQL, HAVE_STRUCT_ST_MYSQL vs HAVE_STRUCT_MYSQL Have a look at the Threading support.
Ghost added the PR/wip label 3 years ago
Ghost added 1 commit 3 years ago
efc6081812
Conversion to the cmake building system.
Collaborator

I would suggest not to use the TDEMacros here at all: it will be tricky to make them work correctly without pre-installed tqt utils.

I would suggest not to use the TDEMacros here at all: it will be tricky to make them work correctly without pre-installed tqt utils.
Owner

I would suggest not to use the TDEMacros here at all: it will be tricky to make them work correctly without pre-installed tqt utils.

It is clear that there is no right to use:

find_package( TQt )
find_package( TDE )

…but avoiding using TDEMacros as a whole doesn't seem like a good idea to me. Our macros makes writing CMake rules simply and clearly, so here I don't see as beneficial to throw this advantage and wrote basically the same rules in a less clear way.

I assume that there may be a need to solve parts like calling tqmoc (ie AUTOMOC) and others where is commonly already available tqtinterface, but I assume that not-use TDEMacros would be more inconvenience.

> I would suggest not to use the TDEMacros here at all: it will be tricky to make them work correctly without pre-installed tqt utils. It is clear that there is no right to use: ``` find_package( TQt ) find_package( TDE ) ``` …but avoiding using TDEMacros as a whole doesn't seem like a good idea to me. Our macros makes writing CMake rules simply and clearly, so here I don't see as beneficial to throw this advantage and wrote basically the same rules in a less clear way. I assume that there may be a need to solve parts like calling `tqmoc` (ie AUTOMOC) and others where is commonly already available tqtinterface, but I assume that not-use TDEMacros would be more inconvenience.
Ghost commented 3 years ago
Poster

I would suggest not to use the TDEMacros here at all: it will be tricky to make them work correctly without pre-installed tqt utils.

I'm always open to suggestions (especially from you), but do you have something in mind that can be tricky to solve with the usual macros? Can you elaborate?

> I would suggest not to use the TDEMacros here at all: it will be tricky to make them work correctly without pre-installed tqt utils. I'm always open to suggestions (especially from you), but do you have something in mind that can be tricky to solve with the usual macros? Can you elaborate?
Collaborator

In general, I actively dislike leaking of the TDE-specific macros to external dependencies even those are maintained in TDE. IMHO it's a dirty practice, and the fact that they are still included as a submodules heavily mangles the commit history.

I'm always open to suggestions (especially from you), but do you have something in mind that can be tricky to solve with the usual macros? Can you elaborate?

To be specific, in case of tqt, it probably will create troubles with dependencies upon moc and uic, as those won't be avaliable during compile time. So at least you will have to avoid the tde_add_executable and tde_add_library macros for most of code base. As for moc/automoc support, it probably could be worked-around in some way, but the uic support (used in tools/) likely will have to be rewritten quite a lot.

Without those two I don't really see big benefits in dependencies upon the tde's cmake.

In general, I actively dislike leaking of the TDE-specific macros to external dependencies even those are maintained in TDE. IMHO it's a dirty practice, and the fact that they are still included as a submodules heavily mangles the commit history. > I'm always open to suggestions (especially from you), but do you have something in mind that can be tricky to solve with the usual macros? Can you elaborate? To be specific, in case of tqt, it probably will create troubles with dependencies upon `moc` and `uic`, as those won't be avaliable during compile time. So at least you will have to avoid the `tde_add_executable` and `tde_add_library` macros for most of code base. As for moc/automoc support, it probably could be worked-around in some way, but the uic support (used in `tools/`) likely will have to be rewritten quite a lot. Without those two I don't really see big benefits in dependencies upon the tde's cmake.
Ghost force-pushed feat/cmakeConv from efc6081812 to c418c3b885 3 years ago
Owner

I first looked closely up to MOC. In TQt, I found the difference in using AUTOMOC.

In TDE use AUTOMOC performs processing matching *.h files, while in TQt, it is necessary to process the *.cpp files as such. In addition, header files are processed separately into moc_<header>.cpp. Yes, this will need to be solved. However, this does not seem to be a large obstacle that would mean to avoid using tde_add_executable and tde_add_library.

I first looked closely up to MOC. In TQt, I found the difference in using AUTOMOC. In TDE use AUTOMOC performs processing matching `*.h` files, while in TQt, it is necessary to process the `*.cpp` files as such. In addition, header files are processed separately into `moc_<header>.cpp`. Yes, this will need to be solved. However, this does not seem to be a large obstacle that would mean to avoid using `tde_add_executable` and `tde_add_library`.
Ghost force-pushed feat/cmakeConv from c418c3b885 to 12a7199e06 3 years ago
Ghost force-pushed feat/cmakeConv from 12a7199e06 to 9ee7c15577 3 years ago
Ghost force-pushed feat/cmakeConv from 9ee7c15577 to 347e57984d 3 years ago
Ghost force-pushed feat/cmakeConv from 347e57984d to a10d01d66c 3 years ago
Ghost force-pushed feat/cmakeConv from a10d01d66c to 6669cd98c8 3 years ago
Ghost force-pushed feat/cmakeConv from 6669cd98c8 to 7ccc7d40ea 3 years ago
Ghost force-pushed feat/cmakeConv from 7ccc7d40ea to f47dab0206 3 years ago
Ghost force-pushed feat/cmakeConv from f47dab0206 to 1b162c47c9 3 years ago
Ghost force-pushed feat/cmakeConv from 1b162c47c9 to 12856f49da 3 years ago
Ghost force-pushed feat/cmakeConv from 12856f49da to 2a39efa10e 3 years ago
Ghost force-pushed feat/cmakeConv from 2a39efa10e to 53a8cfd696 3 years ago
Ghost force-pushed feat/cmakeConv from 53a8cfd696 to 688d596f02 3 years ago
Ghost force-pushed feat/cmakeConv from 688d596f02 to 8579e50a13 3 years ago
SlavekB added 1 commit 3 years ago
d90eea0815
Added auxiliary CMake macros.
Ghost added 1 commit 3 years ago
79f43d529b
add tmoc executable build
SlavekB added 2 commits 3 years ago
117b1ae8a2
Added TMOC_EXECUTABLE setting.
f4264e31e7
Initial test for use tqt_automoc macro.
SlavekB force-pushed feat/cmakeConv from f4264e31e7 to f9ac477c7c 3 years ago
Ghost commented 3 years ago
Poster

I get this error today (didn't have any yesterday):

CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/table/CMakeLists.txt:27 (tqt_automoc)


CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/widgets/CMakeLists.txt:88 (tqt_automoc)


CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/widgets/CMakeLists.txt:88 (tqt_automoc)


CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/widgets/CMakeLists.txt:88 (tqt_automoc)


CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/widgets/CMakeLists.txt:88 (tqt_automoc)


CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/widgets/CMakeLists.txt:88 (tqt_automoc)


CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/widgets/CMakeLists.txt:88 (tqt_automoc)


CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/widgets/CMakeLists.txt:88 (tqt_automoc)


CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/widgets/CMakeLists.txt:88 (tqt_automoc)


CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/workspace/CMakeLists.txt:27 (tqt_automoc)


-- Configuring incomplete, errors occurred!

I get this error today (didn't have any yesterday): ``` CMake Error at TQtMacros.cmake:228 (list): list sub-command REMOVE_ITEM requires list to be present. Call Stack (most recent call first): src/table/CMakeLists.txt:27 (tqt_automoc) CMake Error at TQtMacros.cmake:228 (list): list sub-command REMOVE_ITEM requires list to be present. Call Stack (most recent call first): src/widgets/CMakeLists.txt:88 (tqt_automoc) CMake Error at TQtMacros.cmake:228 (list): list sub-command REMOVE_ITEM requires list to be present. Call Stack (most recent call first): src/widgets/CMakeLists.txt:88 (tqt_automoc) CMake Error at TQtMacros.cmake:228 (list): list sub-command REMOVE_ITEM requires list to be present. Call Stack (most recent call first): src/widgets/CMakeLists.txt:88 (tqt_automoc) CMake Error at TQtMacros.cmake:228 (list): list sub-command REMOVE_ITEM requires list to be present. Call Stack (most recent call first): src/widgets/CMakeLists.txt:88 (tqt_automoc) CMake Error at TQtMacros.cmake:228 (list): list sub-command REMOVE_ITEM requires list to be present. Call Stack (most recent call first): src/widgets/CMakeLists.txt:88 (tqt_automoc) CMake Error at TQtMacros.cmake:228 (list): list sub-command REMOVE_ITEM requires list to be present. Call Stack (most recent call first): src/widgets/CMakeLists.txt:88 (tqt_automoc) CMake Error at TQtMacros.cmake:228 (list): list sub-command REMOVE_ITEM requires list to be present. Call Stack (most recent call first): src/widgets/CMakeLists.txt:88 (tqt_automoc) CMake Error at TQtMacros.cmake:228 (list): list sub-command REMOVE_ITEM requires list to be present. Call Stack (most recent call first): src/widgets/CMakeLists.txt:88 (tqt_automoc) CMake Error at TQtMacros.cmake:228 (list): list sub-command REMOVE_ITEM requires list to be present. Call Stack (most recent call first): src/workspace/CMakeLists.txt:27 (tqt_automoc) -- Configuring incomplete, errors occurred! ```
Ghost added 1 commit 3 years ago
86c4773196
split few configure tests, some cleanup
SlavekB added 1 commit 3 years ago
680a243631
Fix typo in tqt_automoc CMake macro.
Owner

I get this error today (didn't have any yesterday):

CMake Error at TQtMacros.cmake:228 (list):
  list sub-command REMOVE_ITEM requires list to be present.
Call Stack (most recent call first):
  src/table/CMakeLists.txt:27 (tqt_automoc)

.
.
.

-- Configuring incomplete, errors occurred!

This should be fixed by the previous commit.

> I get this error today (didn't have any yesterday): > > ``` > CMake Error at TQtMacros.cmake:228 (list): > list sub-command REMOVE_ITEM requires list to be present. > Call Stack (most recent call first): > src/table/CMakeLists.txt:27 (tqt_automoc) > > . > . > . > > -- Configuring incomplete, errors occurred! > > ``` This should be fixed by the previous commit.
Ghost added 1 commit 3 years ago
78ba7fbbf1
add separate build for tqmake, tmoc, tmoc+tqt lib.
Ghost force-pushed feat/cmakeConv from 78ba7fbbf1 to abd2feb6be 3 years ago
Ghost force-pushed feat/cmakeConv from abd2feb6be to 09b2bb2f26 3 years ago
Ghost added 1 commit 3 years ago
45c1624499
add src/dialog
Ghost added 1 commit 3 years ago
fba599b4c2
add kernel static with Nas support
Ghost force-pushed feat/cmakeConv from fba599b4c2 to d804694e78 3 years ago
Ghost force-pushed feat/cmakeConv from d804694e78 to b4eafdf45f 3 years ago
Ghost force-pushed feat/cmakeConv from b4eafdf45f to 5ecda98929 3 years ago
Ghost force-pushed feat/cmakeConv from 5ecda98929 to 7a0995ccd1 3 years ago
Ghost added 1 commit 3 years ago
3940777240
add option libXft support.
Ghost added 1 commit 3 years ago
10987661bc
add option xshape.
Ghost added 1 commit 3 years ago
4465faa5d1
add option tablet support.
Ghost added 1 commit 3 years ago
0519dd8398
add option xinerama support.
Ghost added 1 commit 3 years ago
7724ad5ec7
add option Xrandr support.
Ghost added 1 commit 3 years ago
fdfc15312f
add option Xrender support.
Ghost added 1 commit 3 years ago
8eeb302cf8
add option Xsync support.
Ghost added 1 commit 3 years ago
31939ae48f
add session management and X keyboard support.
Ghost added 1 commit 3 years ago
088f404f28
add XCursor support
Ghost added 1 commit 3 years ago
bba2d8c634
add support for libmng (system only)
Ghost added 1 commit 3 years ago
885b21227b
add support for jpeg (system only)
Ghost added 1 commit 3 years ago
63b163859c
switch to builtin cmake detection for jpeg
Ghost added 1 commit 3 years ago
14c78fe986
add support for libpng (system only)
Ghost force-pushed feat/cmakeConv from 14c78fe986 to 54291eb8c1 3 years ago
Ghost added 1 commit 3 years ago
7a882af3b0
add support for zlib, libpng >= 1.5 need It.
Ghost added 1 commit 3 years ago
9cb50f99f0
add support for ftxopentype
Ghost added 1 commit 3 years ago
3e021c4388
add builtin gif support.
Ghost force-pushed feat/cmakeConv from 3e021c4388 to ad34ea7f25 3 years ago
Ghost added 1 commit 3 years ago
0ba1c7f1a7
Add support for Accessibility build.
Ghost added 1 commit 3 years ago
3ff46e8764
Add WITH_SOUND option through Nas, set threads support.
Ghost added 1 commit 3 years ago
40e7391758
Add option BUILD_STYLES.
Ghost force-pushed feat/cmakeConv from 40e7391758 to b9d770defd 3 years ago
Ghost added 1 commit 3 years ago
db0b91a911
Add network support.
Ghost force-pushed feat/cmakeConv from db0b91a911 to 5c5c13cb89 3 years ago
Ghost added 1 commit 3 years ago
6bdd50f6f1
Add support for shared OpenGL.
Ghost added 1 commit 3 years ago
ea810eb9ec
Add preliminary support for SQL plugins.
Ghost force-pushed feat/cmakeConv from ea810eb9ec to b3abc36767 3 years ago
Ghost added 1 commit 3 years ago
94951b2511
Add plugin PostgreSQL.
Ghost force-pushed feat/cmakeConv from 94951b2511 to 5c3b818e1d 3 years ago
Ghost force-pushed feat/cmakeConv from 5c3b818e1d to 107b36f702 3 years ago
Ghost force-pushed feat/cmakeConv from 107b36f702 to 24366eaee7 3 years ago
Ghost force-pushed feat/cmakeConv from 24366eaee7 to e90a28cc3c 3 years ago
Ghost force-pushed feat/cmakeConv from e90a28cc3c to 2a2ee6dc02 3 years ago
Ghost commented 3 years ago
Poster

@SlavekB can you give It a building test "as-is"?

I expect many things to be fixed but "as-is" the core tqt3 with default options should build.

@SlavekB can you give It a building test "as-is"? I expect many things to be fixed but "as-is" the core tqt3 with default options should build.
SlavekB added 2 commits 3 years ago
79df464aff
cmake: Add UnixODBC support next to libiodbc.
4fd2bb3c8e
cmake: Fix TQT_MODULE_OPENGL definition.
Owner

I made the test "as-is" and it was successful. As expected, the resulting library cannot work because it does not provide anything.

I added two minor commits:

  1. Current DEB packages are built with UnixODBC, so I added detection and use UnixODBC next to libiodbc.

  2. Although OpenGL detection has been successfully performed, in ntqmodules.h has not been defined TQT_MODULE_OPENGL. In any case, it will probably need some more work due to QT_DLOPEN_OPENGL. I didn't deal with it now.

Of course, both deserve a squash to the main CMake conversion commit.

I made the test "as-is" and it was successful. As expected, the resulting library cannot work because it does not provide anything. I added two minor commits: 1. Current DEB packages are built with UnixODBC, so I added detection and use UnixODBC next to libiodbc. 2. Although OpenGL detection has been successfully performed, in `ntqmodules.h` has not been defined `TQT_MODULE_OPENGL`. In any case, it will probably need some more work due to `QT_DLOPEN_OPENGL`. I didn't deal with it now. Of course, both deserve a squash to the main CMake conversion commit.
Owner

To clarify the previous comment: Because the purpose of the library is to provide all exported functions, there is a need instead of linking to connect modules to the final library to use EMBED. Indeed, exactly for this purpose there is a defined variable qtlib_embed to which the modules are added. I tried instead of LINK to use EMBED ${qtlib_embed}, but this caused problems that we need to explore and solve.

To clarify the previous comment: Because the purpose of the library is to provide all exported functions, there is a need instead of linking to connect modules to the final library to use `EMBED`. Indeed, exactly for this purpose there is a defined variable `qtlib_embed` to which the modules are added. I tried instead of `LINK` to use `EMBED ${qtlib_embed}`, but this caused problems that we need to explore and solve.
SlavekB added 1 commit 3 years ago
d344b003a8
cmake: Embed modules to the target TQt library.
Owner

Solving problems for changing from linking to embedding has shown to be easier than I expected. So I added the third commit that made a mentioned change for embedding modules to the target library. Now the library has increased its size significantly and should provide expected functions.

Solving problems for changing from linking to embedding has shown to be easier than I expected. So I added the third commit that made a mentioned change for embedding modules to the target library. Now the library has increased its size significantly and should provide expected functions.
Owner

I expect many things to be fixed but "as-is" the core tqt3 with default options should build.

Great work Greg, really looking forward for when this is ready :-)

> I expect many things to be fixed but "as-is" the core tqt3 with default options should build. Great work Greg, really looking forward for when this is ready :-)
Ghost added 1 commit 3 years ago
74bedc7f2e
Add pkg-config file.
Ghost added 1 commit 3 years ago
ba03ee408a
Add tutorial builds.
Ghost added 1 commit 3 years ago
b51449ad86
Some adjustments for tutorial T1 build.
SlavekB added 3 commits 3 years ago
78465e4152
cmake: Reduction of linking between static modules libraries.
832547f824
cmake: Adjust the T1 tutorial building, added remaining tutorials.
99f9ae89df
cmake: Enable building with TQT_THREAD_SUPPORT at global level.
Ghost added 1 commit 3 years ago
94cdf29a3d
Remove explicite linking to the threading library and some cleanup.
Ghost commented 3 years ago
Poster

I have removed explicite linking with the threading library from the kernel-static lib otherwise It ends up in FTBFS on my system, none of the tutorials passes.

Please check on your platform.
On my system when I build with CMAKE_VERBOSE_MAKEFILE=ON I see that the static libs that needs threading get both the TQT_THREAD_SUPPORT definition and the -lpthread library, as a result the tutorials pass.

I have removed explicite linking with the threading library from the kernel-static lib otherwise It ends up in FTBFS on my system, none of the tutorials passes. Please check on your platform. On my system when I build with **CMAKE_VERBOSE_MAKEFILE=ON** I see that the static libs that needs threading get both the TQT_THREAD_SUPPORT definition and the **-lpthread** library, as a result the tutorials pass.
Ghost added 1 commit 3 years ago
fd8dfa0f2f
Add examples builds.
Ghost force-pushed feat/cmakeConv from fd8dfa0f2f to b615803a36 3 years ago
Ghost force-pushed feat/cmakeConv from b615803a36 to 5aeb3174e4 3 years ago
SlavekB added 1 commit 3 years ago
d87251ee25
cmake: Fix FTBFS on linking main tqt-mt library.
Owner

I just did a test building the current state and fixed FTBFS.
No more research I did in this moment.

I just did a test building the current state and fixed FTBFS. No more research I did in this moment.
SlavekB force-pushed feat/cmakeConv from d87251ee25 to 12bd9b6b2b 2 months ago
Owner

I have made many changes, many things are still unfinished, many things still require remodeling. It is great that there is more interest in working with this task. There are a number of things that will have to be discussed before it gets the final state. Many of these things are already mentioned in #117.

I have made many changes, many things are still unfinished, many things still require remodeling. It is great that there is more interest in working with this task. There are a number of things that will have to be discussed before it gets the final state. Many of these things are already mentioned in #117.
This pull request is marked as a work in progress.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tqt3#46
Loading…
There is no content yet.