diff --git a/include/csp/meson.build b/include/csp/meson.build index ecf86b5a5..9511c2864 100644 --- a/include/csp/meson.build +++ b/include/csp/meson.build @@ -1 +1 @@ -csp_config_h = configure_file(output: 'autoconfig.h', configuration: conf, install_dir: 'include/csp/') +csp_config_h = configure_file(output: 'autoconfig.h', configuration: conf, install_dir: 'include/csp/', install_tag: 'devel') diff --git a/meson.build b/meson.build index c5b60a1c1..1b811aef2 100644 --- a/meson.build +++ b/meson.build @@ -67,19 +67,14 @@ csp_c_args = ['-Wshadow', subdir('src') subdir('include/csp') -if not meson.is_subproject() - install_subdir('include', install_dir : '.') - install_headers(csp_config_h, install_dir : 'include/csp') -endif - - csp_lib = library('csp', sources: [csp_sources, csp_config_h], include_directories : csp_inc, dependencies : csp_deps, c_args : csp_c_args, - install : false, + install : true, pic:true, + soversion: meson.project_version() ) # The following dependency variable is for parent projects to link @@ -89,6 +84,9 @@ csp_dep = declare_dependency( link_with : csp_lib, dependencies : csp_deps, ) +install_subdir('include', install_dir : '.', exclude_files: ['csp/meson.build'], install_tag: 'devel') +pkg = import('pkgconfig') +pkg.generate(csp_lib) subdir('examples') diff --git a/src/interfaces/csp_if_zmqhub.c b/src/interfaces/csp_if_zmqhub.c index 56ed65eba..0a8bcdc7d 100644 --- a/src/interfaces/csp_if_zmqhub.c +++ b/src/interfaces/csp_if_zmqhub.c @@ -291,7 +291,7 @@ int csp_zmqhub_init_filter2(const char * ifname, const char * host, uint16_t add const ssize_t sec_key_len = sec_key ? strnlen(sec_key, CURVE_KEYLEN-1) : 0; if (sec_key_len && sec_key_len != CURVE_KEYLEN-1) { /* Is it bad to expose the detected length of the ZMQ key here? */ - fprintf(stderr, "ZMQ secret key must be exactly 40 characters long (got %ld)\n", sec_key_len); + fprintf(stderr, "ZMQ secret key must be exactly 40 characters long (got %ld)\n", (signed long)sec_key_len); return CSP_ERR_INVAL; }