mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #131] Simplify CMakeLists #108
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Alexhuszagh on GitHub (Oct 23, 2017).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/131
Originally assigned to: @jmcnamara on GitHub.
CMake has the power to track private and public macro definitions, include directories, linked libraries and linker flags. This allows anyone using libxlsxwriter in a dependent project to simply call
target_link_libraries(${my_target} xlsxwriter)and it will automatically track all the required definitions, include directories, libraries, and linker flags for compilation.I have patched my own CMakeLists to remedy this as we have started to include more configurations, optional system libraries (like minizip), and others.
The diff is available here, and the working version is available on a downstream branch. If all is satisfactory, I can submit a PR. This will be useful to simplify compiler and linker flags during compilation, as well as simplify the inclusion of libxlsxwriter in projects using a CMake build system.
@jmcnamara commented on GitHub (Oct 24, 2017):
Is this like pkg-config, if you are familiar with it? I have been meaning to add support for that.
Anyway, the patch looks fine. Submit it as a PR and I'll merge it.