Support pkg-config in ta-lib for CMake Builds - #284
Conversation
#77 made libta-lib.so self-declare its libm dependency (DT_NEEDED), so a dynamic consumer needs nothing extra. #284's Libs: -lm reintroduced that requirement for every consumer. The real gap was that CMake's configure_file has no LIBM variable, so @libm@ in Libs.private silently substituted to empty -- unlike autotools, which fills it via AC_SUBST. Give CMake its own LIBM value (mirroring the existing if(NOT WIN32) idiom already used to link the target itself) and revert Libs: to match autotools' output. Claude-Session: https://claude.ai/code/session_01W8PVxowPALanc3wk8jaD6h
|
Merged, thanks! Followed up with 8cf0839 on one detail in The added Follow-up gives CMake its own Verified with an actual CMake configure+build that the |
|
Thank you ! |
#284's CMakeLists.txt/ta-lib.pc.in changes landed on main and were just merged into dev; refresh the digest to match.
#284 added ta-lib.pc.in and wired it into CMakeLists.txt's configure_file, but conanfile.py's exports_sources never picked it up -- Conan only copies files it lists into its build sandbox, so configure_file failed with "File ... ta-lib.pc.in does not exist."
The
autoconfbuild supportspkg-configfile generation and install, but the CMake build did not. Adding a couple of lines in CMake to support this on UNIX platforms.