srt
srt copied to clipboard
Clean up and fix build rules for providing user overrides for libraries
The expected rules preserved for the build system is that:
-
The
configure-data.tcl
file contains the list of options that represent variables used inCMakeLists.txt
, and this list is allowed to be incomplete. It should not, however, contain options other than handled internally by this script and those that map to variables inCMakeLists.txt
. -
The details of the build from
cmake
is expected to be fully user-configurable, which embraces mainly the encryption library dependency. This should expose the variables used normally bycmake
, such asOPENSSL_LIBRARIES
andOPENSSL_INCLUDE_DIR
. This should be also dependent on the encryption library being used, as specified in--use-enclib
option.
For example, this should be possible to do:
./configure --use-enclib=mbedtls --ssl-libraries="mbedtls mbedcrypto" --ssl-library-dirs=/opt/mbedtls/lib64 --ssl-include-dirs=/opt/mbedtls/include
Currently finding the library is mostly automated and manual definition of the required library seems not to be handled. Also configure-data.tcl
contains options that do not map to any variables in CMakeLists.txt
.
It would be also desired if there's found some way to have a common list of options mapped to variables in CMakeLists.txt
, out of which both the list for configure-data.tcl
and for CMakeLists.txt
will be generated.
But why still needs configure
since cmake already present? Is there anything that cmake currently can not provide?
The reasoning of this script has changed in time (look at the date of this issue), it was earlier containing more autodetection things and several specific tricks. Today it's rather to remain something familiar for people accustomed with autotools-style scripts. It also allows to provide some options specifically for developers or unusual targets - like --with-compiler-prefix
.