Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
mariadb_config has
#define INCLUDE "-I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@ I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql"
|
#define LIBS "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@/ -lmariadb "\ |
which assumes that INSTALL_INCLUDEDIR and INSTALL_LIBDIR are always
relative to CMAKE_INSTALL_PREFIX. This is not always the case. The correct
behavior could be, for example,
if (INSTALL_INCLUDEDIR MATCHES "/*")
|
# absolute path
|
set(INSTALL_INCLUDEDIR_FOR_MARIADB_CONFIG "${INSTALL_INCLUDEDIR}")
|
else()
|
# relative path
|
set(INSTALL_INCLUDEDIR_FOR_MARIADB_CONFIG "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDEDIR}")
|
fi()
|
or even
if (NOT INSTALL_INCLUDEDIR MATCHES "/*")
|
# relative path
|
set(INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDEDIR}")
|
fi()
|
As
MDEV-13836has been closed, this one remains.Helpful information about, how it currently is in Fedora is in this comment.
I still see this issue as critical. Without is or a downstream path, other packages won't build at all.
–
My frist idea was to create another set of CMAKE variables, that would hold the absolute path. That would solve the issue, but it's deffinitelly the best way.
I agree, that check if "INCLUDEDIR" path starts with root dir could do part of the trick.