xkaraman left a comment (kamailio/kamailio#4576)
Hey @miconda,
Just saw this. the best course would be indeed in the CMakelists.txt but not
hardcode it like we are doing as of now with
`target_link_libraries(${module_name} PRIVATE unistring)`.
We can replace this with a call to `find_library(UNISTRING_LIBRARY unistring)`
before to search for it in standard paths and provide mechanisms to give the
custom path.
When a `find_packge|library|xxx()` call is made, cmake searches default paths
but the user can also provide additional paths with
https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html#variable:CMAKE_PREFIX_PATH.
Doing the `find_library` call also sets a CACHE variable that so that if
library still not found it will warn or error out if we add the `REQUIRED`
OPTION` adn set ti empty. It will then prompt the user to specify a location by
setting the `-DUNISTRING_LIBRARY=/path/to/library`
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4576#issuecomment-3823537344
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4576/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!