Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CMake builds of library itself and generate finders #281

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

widgetii
Copy link

Thank you so much for your wonderful library! I would like to suggest adding CMake build support that was tested for few weeks in my project and seems to be proper designed according to modern CMake guidances.

Everything you need to have inside your own CMakeLists.txt is

find_package(mxml)
target_link_libraries(${PROJECT_NAME} PRIVATE MSweet::mxml)

@lgtm-com
Copy link

lgtm-com bot commented Feb 27, 2021

This pull request introduces 2 alerts when merging 7d3223e into ab78fd8 - view on LGTM.com

new alerts:

  • 2 for Implicit function declaration

@michaelrsweet
Copy link
Owner

@widgetii I've gotten several requests to use cmake, but so far I haven't been happy with the results. Also, cmake is not a standard build tool so either I'd need to keep the autoconf stuff around or maintain both, and neither of those options appeals to me... :/

Not going to close this, but for the moment don't expect it to be merged any time soon.

@michaelrsweet michaelrsweet self-assigned this Feb 27, 2021
@michaelrsweet michaelrsweet added enhancement New feature or request platform issue Issue is specific to an OS or desktop priority-low labels Feb 27, 2021
@michaelrsweet michaelrsweet added this to the Future milestone Feb 27, 2021
@widgetii
Copy link
Author

If you wish I can maintain all CMake stuff of the project and fix issues (my motivation to don't have a separate fork of Mini-XML).

@Rossmaxx
Copy link

I was searching for mxml in vcpkg and didn't find it. Investigated further and found this pr and the fact that cmake is not supported.

I've gotten several requests to use cmake, but so far I haven't been happy with the results.

Have you tried now? Cmake support seems to have improved since 2021.

cmake is not a standard build tool.

It's not but it's getting closer to being a standard makefile/msvc-sln generator

If mxml gets a cmake port, i might consider adding a port to vcpkg so that windows users too can benefit.

@michaelrsweet
Copy link
Owner

@Rossmaxx cmake remains an optional, third-party add-on developer tool on all operating systems.

Looking at the release notes over the past several years, there is very little new functionality that is compelling and it continues to depend on having this tool on any developer system, creating makefiles or IDE files that are hard to comprehend or debug, and completely lacking in the basic functionality that the current autoconf (for Unix) and VC (for Windows) files provide.

It is conceivable that I might add a set of official NuGet packages for using Mini-XML with VC, but at present I am not interested in vcpkg which is itself a bit of a hack with all of the package definitions/ports info in a Git repository... That said, nothing prevents you from submitted a pull request to the vcpkg repository and having the libmxml port info provide a separate cmake file for this project.

@Rossmaxx
Copy link

Hmm, i understand your concerns. Coming from a windows environment, I didn't know that autotools was preconfigured. For vcpkg, I'll maybe either have to fork it or patch it using vcpkg's patching mechanisms. But since you don't plan to support it officially, I don't wanna bother you anymore.

@Rossmaxx Rossmaxx mentioned this pull request Jul 22, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request platform issue Issue is specific to an OS or desktop priority-low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants