Skip to content

Commit

Permalink
ld_library_path
Browse files Browse the repository at this point in the history
  • Loading branch information
antonysigma committed Jul 15, 2024
1 parent 9aedc0b commit 99b006a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
5 changes: 3 additions & 2 deletions proximal/halide/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ if get_option('build_nlm')
}
endif

env = { 'LD_LIBRARY_PATH': halide_library_path }

if build_machine.system() == 'windows'
env = { 'PATH': halide_library_path }
object_file_ext = 'obj'
statlib_file_ext = 'lib'
dynamiclib_file_ext = 'dll'
else
env = { 'LD_LIBRARY_PATH': halide_library_path }
object_file_ext = 'o'
statlib_file_ext = 'a'
dynamiclib_file_ext = 'so'
Expand Down Expand Up @@ -188,6 +188,7 @@ foreach p : pipeline_name
p['function_name'] + '.h',
],
input: halide_generator,
env: env,
command: [
find_program('dumpbin'),
'/dependents',
Expand Down
16 changes: 9 additions & 7 deletions proximal/halide/subprojects/packagefiles/halide/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ cc = meson.get_compiler('cpp', native: true)
halide_inc = include_directories('include')

if build_machine.system() == 'windows'
halide_library_path = meson.current_source_dir() / 'lib/Release'
# libHalide is in a different path
halide_library_path = meson.current_source_dir() / 'bin/Release'

halide_autoscheduler_path = meson.current_source_dir() / 'lib/Release'
else
halide_library_path = meson.current_source_dir() / 'lib'
halide_autoscheduler_path = halide_library_path
endif
halide_lib = cc.find_library('Halide', dirs: [
# libHalide.so is in different directory
meson.current_build_dir() / 'bin/Release',
halide_library_path,
],
static: true,

message(halide_library_path)
halide_lib = cc.find_library('Halide', dirs: halide_library_path,
static: false,
)

halide_generator_dep = declare_dependency(
Expand Down

0 comments on commit 99b006a

Please sign in to comment.