ugeneunipro / ugene-old

UGENE is free open-source cross-platform bioinformatics software
http://ugene.net
GNU General Public License v2.0
5 stars 1 forks source link

CMake project for U2Gui & U2Lang and related source code cleanup #11

Closed mfursov closed 8 years ago

mfursov commented 8 years ago

This pull request adds U2Gui module to CMake toolchain.

There were 2 major problems found with CMake build for U2Gui:

  1. AUTOUIC function for CMake enforces to put UI file to the same folder as cpp that includes it: https://cmake.org/cmake/help/v3.0/prop_tgt/AUTOUIC.html

If an #include statement like #include "ui_foo.h" is found in foo.cpp, a foo.ui file is expected next to foo.cpp, and uic is run on the foo.ui file.

As the result I moved all ui files from dedicated "ui" dirs to the same folders with cpp files.

  1. If UI component name is the same (like Ui::MyForm) with class name used in CPP file (U2::MyForm) there is a name conflict during compilation. To resolve this conflict we shuold use original component name that is always prefixed with Ui_ (like Ui_MyForm). The Ui:: form is just a typedef for the original one.

The patch was checked with original QMake based build on Linux & Windows .

This patch is the only way to proceed with CMake. If accepted I will prepare patches for all other modules 1 by 1.