|
From: | Enrico Gallus |
Subject: | Re: [cybop-developers] CMake |
Date: | Wed, 8 Mar 2017 12:23:35 +0900 |
Hi Christian, Looks like everything is ways easier with the darwin system, because most of the 3rd party libraries are only used for the GNU operating systems. I also think that we probably get other problems referring the make on a windows system. We should check this out. The cmake can of course be configured to just include and link libraries for specific architectures. So we are flexible over here and just need to know what to include. Sorry for wasting your time with getting the cmake fixed on debian.
The problem here is that I thought the GLUT and OpenGL libraries are required by cybop. But i failed. I realised that you use the xcb as an substitution due to some problems you had in the past as mentioned in the opengl_starter.c. So far i’m not really sure about the dependencies, but as far what i read it rather uses OpenGL than GLUT, right? I also realised that the only place where the glut was used is a “test”-class. The communicator_tester, but all GLUT-references are commented out. Looks like cmake is/was aware of this kind of issue https://public.kitware.com/Bug/bug_relationship_graph.php?bug_id=14060&graph=dependency. But the issue was closed. So we have several opportunities here. 1. We remove the required flag from the glut-library and only keep the required flag on the OpenGL library. Does this reflect the requirements of cybop? 2. We could use the workaround proposed by kit ware in the link above. 3. We could remove the glut-library linking completely 4. You install the necessary packages by using 'sudo apt-get install libxmu-dev libxi-dev' I already did 1. and 2. and hopefully this will solve the issue. If not we have to play around with the configuration. I also changed the structure a little bit and extracted blocks out of the main cmake-file into smaller files. Maybe it is a bit more readable and self-explaining now. You find all the library depending definitions in build/libraries.cmake. Feel free to make adjustments if the changes i committed do still not lead to any success to build cybop on debian. It was too tempting, we talked about code styling checks some time ago and to include it into the build process. I did some research and found two really helpful tools (cppcheck and clang-format). Both are optional, it is not needed to execute it or to install and i haven’t configured it for the project yet. You COULD use clang-format (https://clang.llvm.org/docs/ClangFormat.html) in the future to force a specific indent or to force sorted includes and so on. You COULD use cppcheck (http://cppcheck.sourceforge.net) to detect bugs compilers can’t. Memory leaks and so on. I adjusted the cpack configuration properly. Unfortunately I can’t test it, because creating deb packages on mac is not supported, BUT I activated it just by adding “DEB” to the CPACK_GENERATOR list. I changed the configuration again to just generate one tarball with the content as it is in the current releases. Some things are gathered more general, like take the whole src-directory. other files are listed single. You can adjust this to your purpose at all times by manipulating build/packaging.cmake I kept the former configuration as an example how you later on could easily distribute a tarball for each part. Please have a look at cpack_component_example.cmake. You can remove it if you think it is not helpful.
It’s alright!,this is your project! I used cmake because it represented the configuration for it. but after adding manpages and icons the name was not proper anymore and build suites it pretty well. I adjusted the cpack-configuration to the renaming of the directory. So you don’t mind of the tarball get’s generated to the root directory? you just need to copy it to your release folder afterwards. Maybe we should talk about that later on, when the linking finally works for you and you can cpack it on your system. I’m sure we can find a solution to reflect your process of releasing the cybop system but therefore you need to be able to execute cpack. So let’s hope the linking changes i did finally will fix the issues. Of course, sorry, didn’t know that this needs to be done. Is this just something i should know or is there some kind of instruction? Greetings, Enrico |
[Prev in Thread] | Current Thread | [Next in Thread] |