Skip to content

How do I compile+link my code without using cmake? #200

Answered by TassieBruce
TassieBruce asked this question in Q&A
Discussion options

You must be logged in to vote

Answering myself with a solution that works when using the meson build system.

meson can use cmake's find_package() function to find dependencies. I had tried using the dependency in my meson.build file:

matplotdep = dependency('Matplot++')

which failed but I stupidly didn't read the error message fully. Matplot++ produces several modules which must be given as an argument to dependency(). The following snippet in my meson.build file will build the example matplotplusplus/examples/line_plot/plot/plot_3.cpp

matplotdep = dependency('Matplot++', 
                        modules: ['Matplot++::nodesoup', 
                                  'Matplot++::cimg', 
                                  …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@TassieBruce
Comment options

@alandefreitas
Comment options

@TassieBruce
Comment options

@alandefreitas
Comment options

Comment options

You must be logged in to vote
1 reply
@alandefreitas
Comment options

Answer selected by TassieBruce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants