diff --git a/dependencies/subprojects/sdl2_image_windows/meson.build b/dependencies/subprojects/sdl2_image_windows/meson.build index 1e2a87b877a3fd891429e7bb466e31e9f10876da..033e61f3a27191c27b1f7e5ba76631a77025f127 100644 --- a/dependencies/subprojects/sdl2_image_windows/meson.build +++ b/dependencies/subprojects/sdl2_image_windows/meson.build @@ -1,8 +1,15 @@ project('sdl2_image_windows', 'cpp') +fs = import('fs') + +new_dir = join_paths('C:/TDT4102-mingw64','SDL2','sdl2_image_lib') +old_dir = join_paths(meson.current_source_dir(), 'lib') +#Ensuring backwards compatability in transition when SDL2 can be both places +dir_to_use = fs.exists(new_dir) ? new_dir : old_dir + cxx = meson.get_compiler('cpp') sdl2_image_windows_dep = declare_dependency( - dependencies : [cxx.find_library('SDL2_image', dirs : join_paths(meson.current_source_dir(), 'lib'))], + dependencies : [cxx.find_library('SDL2_image', dirs : dir_to_use)], include_directories : include_directories(join_paths('include', 'SDL2'))) \ No newline at end of file diff --git a/dependencies/subprojects/sdl2_windows/meson.build b/dependencies/subprojects/sdl2_windows/meson.build index 59c3c794d0420f44e09497a5e1cce0a2794c67c3..09d8f7699373532da43eefbc82bf794382669cfa 100644 --- a/dependencies/subprojects/sdl2_windows/meson.build +++ b/dependencies/subprojects/sdl2_windows/meson.build @@ -1,9 +1,16 @@ project('sdl2_windows', 'cpp') +fs = import('fs') + +new_dir = join_paths('C:/TDT4102-mingw64','SDL2','sdl2_lib') +old_dir = join_paths(meson.current_source_dir(), 'lib') +#Ensuring backwards compatability in transition when SDL2 can be both places +dir_to_use = fs.exists(new_dir) ? new_dir : old_dir + cxx = meson.get_compiler('cpp') sdl2_windows_dep = declare_dependency( - dependencies : [cxx.find_library('SDL2main', dirs : join_paths(meson.current_source_dir(), 'lib')), - cxx.find_library('SDL2', dirs : join_paths(meson.current_source_dir(), 'lib'))], + dependencies : [cxx.find_library('SDL2main', dirs : dir_to_use), + cxx.find_library('SDL2', dirs : dir_to_use)], link_args: ['-lmingw32'], include_directories : include_directories(join_paths('include', 'SDL2')))