@@ -68,15 +68,20 @@ pkg_mod.generate(libraries : libsimdsort,
6868 filebase : ' x86simdsortcpp' ,
6969 description : ' C++ template library for high performance SIMD based sorting routines.' )
7070
71+ # Create a new dependency variable making it easy to use this as a subproject:
72+ x86simdsortcpp_dep = declare_dependency (
73+ include_directories : include_directories (' lib' ),
74+ link_with : libsimdsort,
75+ )
76+
7177# Build test suite if option build_tests set to true
7278if get_option (' build_tests' )
7379 gtest_dep = dependency (' gtest_main' , required : true , static : false )
7480 subdir (' tests' )
7581 testexe = executable (' testexe' ,
7682 include_directories : [lib, utils],
77- dependencies : gtest_dep,
83+ dependencies : [ gtest_dep, x86simdsortcpp_dep] ,
7884 link_whole : [libtests],
79- link_with : libsimdsort,
8085 )
8186 test (' x86 simd sort tests' , testexe)
8287endif
@@ -89,10 +94,9 @@ if get_option('build_benchmarks')
8994 subdir (' benchmarks' )
9095 benchexe = executable (' benchexe' ,
9196 include_directories : [src, lib, utils, bench],
92- dependencies : [gbench_dep, thread_dep],
97+ dependencies : [gbench_dep, thread_dep, x86simdsortcpp_dep ],
9398 link_args : [' -lbenchmark_main' , ipplink],
9499 link_whole : [libbench],
95- link_with : libsimdsort,
96100 )
97101endif
98102
0 commit comments