Message: previous - next
Month: March 2016

Re: [trinity-devel] CMake + tdelfeditor × versioned libraries

From: Slávek Banko <slavek.banko@...>
Date: Tue, 15 Mar 2016 14:24:10 +0100
Dne út 15. března 2016 Fat-Zer napsal(a):
> Few notes about the patch:
> - At least you should use ${BIN_INSTALL_DIR} rather

Now is quite useful, in connection with the CMake conversion of tdegames, that 
is not used ${BIN_INSTALL_DIR} but ${CMAKE_INSTALL_PREFIX}/bin.

For some reason the games is installed into the 'games' instead of 'bin'  (at 
least on Debian and Ubuntu). Therefore, on Debian and Ubuntu is for build 
used -DBIN_INSTALL_DIR="/opt/trinity/games". If for tdelfeditor should be 
used ${BIN_INSTALL_DIR}, it would not be found. Thanks to the use 
${CMAKE_INSTALL_PREFIX}/bin it also works for tdegames.

> - It is generally a bad practice to search for 
> a file on an installation path.

Your observation is correct. Perhaps it would be appropriate to use 
find_program with hints "${TDE_PREFIX}/bin" and ${BIN_INSTALL_DIR} - just 
like is in search for tde-config. And then use the value 
${TDELFEDITOR_EXECUTABLE}. What do you think?

> - Starting cmake 2.8.4 you may refer a 
> ${_target} in a commands and cmake should replace it with the appropriate
> filepath so you may get rid of the if.

For r14.0.x branch is still supported:
+ Debian 6.x (Squeeze) == cmake 2.8.2
+ Ubuntu 10.04 (Lucid) == cmake 2.8.0
+ Ubuntu 10.10 (Maverick) == cmake 2.8.2
+ Ubuntu 11.04 (Natty) == cmake 2.8.3

Thank you for your good comments!