diff --git a/meson.build b/meson.build index d8146da..dc08a9d 100644 --- a/meson.build +++ b/meson.build @@ -12,49 +12,6 @@ kiwixlib_dep = dependency('kiwix', static:static_linkage) microhttpd_dep = dependency('libmicrohttpd', static:static_linkage) z_dep = dependency('zlib', static:static_linkage) -# Idealy we should not have more dependency, however : -# We should declare we use ctpp2 in kiwixlib in the pkg-config file. -# But there is no pkg-config file for ctpp2. Once one exists, no need to -# declare the dependency here -ctpp2_prefix_install = get_option('ctpp2-install-prefix') -find_library_in_compiler = meson.version().version_compare('>=0.31.0') -if ctpp2_prefix_install == '' - if not compiler.has_header('ctpp2/CTPP2Logger.hpp') - error('ctpp2/CTPP2Logger.hppnot found') - endif - if find_library_in_compiler - ctpp2_lib = compiler.find_library('ctpp2') - else - ctpp2_lib = find_library('ctpp2') - endif - link_args = ['-lctpp2'] -# if meson.is_cross_build() -# if host_machine.system() == 'windows' -# link_args += ['-liconv'] -# endif -# endif - ctpp2_dep = declare_dependency(link_args:link_args) -else - if not find_library_in_compiler - error('For custom ctpp2_prefix_install you need a meson version >=0.31.0') - endif - ctpp2_include_path = ctpp2_prefix_install + '/include' - ctpp2_include_args = ['-I'+ctpp2_include_path] - if not compiler.has_header('ctpp2/CTPP2Logger.hpp', args:ctpp2_include_args) - error('ctpp2/CTPP2Logger.hpp not found') - endif - ctpp2_include_path = include_directories(ctpp2_include_path, is_system:true) - ctpp2_lib_path = ctpp2_prefix_install+'/lib' - ctpp2_lib = compiler.find_library('ctpp2', dirs:ctpp2_lib_path) - link_args = ['-L'+ctpp2_lib_path, '-lctpp2'] -# if meson.is_cross_build() -# if host_machine.system() == 'windows' -# link_args += ['-liconv'] -# endif -# endif - ctpp2_dep = declare_dependency(include_directories:ctpp2_include_path, link_args:link_args) -endif - # This is a temporary workaround until xapian fix it's xapian-core.pc # For a correct dependency checking we should test if uuid is really installed # but for a workaround, we assume that in xapian is installed, uuid also. @@ -65,7 +22,7 @@ else uuid_dep = declare_dependency(link_args:['-luuid', '-lrt']) endif -all_deps = [thread_dep, kiwixlib_dep, microhttpd_dep, ctpp2_dep, z_dep, uuid_dep] +all_deps = [thread_dep, kiwixlib_dep, microhttpd_dep, z_dep, uuid_dep] #subdir('include') subdir('static') diff --git a/meson_options.txt b/meson_options.txt index b8da3dc..3b0daed 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,2 @@ option('static-linkage', type : 'boolean', value : false, description : 'Create statically linked binaries.') -option('ctpp2-install-prefix', type : 'string', value : '', - description : 'Prefix where ctpp libs has been installed')