diff options
-rw-r--r-- | src/luarocks/build/builtin.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/luarocks/build/builtin.lua b/src/luarocks/build/builtin.lua index 33e19c6b..73337544 100644 --- a/src/luarocks/build/builtin.lua +++ b/src/luarocks/build/builtin.lua | |||
@@ -279,11 +279,12 @@ function builtin.run(rockspec, no_install) | |||
279 | local luadir = path.lua_dir(rockspec.name, rockspec.version) | 279 | local luadir = path.lua_dir(rockspec.name, rockspec.version) |
280 | local libdir = path.lib_dir(rockspec.name, rockspec.version) | 280 | local libdir = path.lib_dir(rockspec.name, rockspec.version) |
281 | 281 | ||
282 | local autolibs, autoincdirs, autolibdirs = autoextract_libs(rockspec.external_dependencies, rockspec.variables) | ||
283 | |||
282 | if not build.modules then | 284 | if not build.modules then |
283 | if rockspec:format_is_at_least("3.0") then | 285 | if rockspec:format_is_at_least("3.0") then |
284 | local libs, incdirs, libdirs = autoextract_libs(rockspec.external_dependencies, rockspec.variables) | ||
285 | local install, copy_directories | 286 | local install, copy_directories |
286 | build.modules, install, copy_directories = builtin.autodetect_modules(libs, incdirs, libdirs) | 287 | build.modules, install, copy_directories = builtin.autodetect_modules(autolibs, autoincdirs, autolibdirs) |
287 | build.install = build.install or install | 288 | build.install = build.install or install |
288 | build.copy_directories = build.copy_directories or copy_directories | 289 | build.copy_directories = build.copy_directories or copy_directories |
289 | else | 290 | else |
@@ -332,7 +333,7 @@ function builtin.run(rockspec, no_install) | |||
332 | if not object then | 333 | if not object then |
333 | object = source.."."..cfg.obj_extension | 334 | object = source.."."..cfg.obj_extension |
334 | end | 335 | end |
335 | ok = compile_object(object, source, info.defines, info.incdirs) | 336 | ok = compile_object(object, source, info.defines, info.incdirs or autoincdirs) |
336 | if not ok then | 337 | if not ok then |
337 | return nil, "Failed compiling object "..object | 338 | return nil, "Failed compiling object "..object |
338 | end | 339 | end |
@@ -345,7 +346,7 @@ function builtin.run(rockspec, no_install) | |||
345 | if not ok then return nil, err end | 346 | if not ok then return nil, err end |
346 | end | 347 | end |
347 | lib_modules[module_name] = dir.path(libdir, module_name) | 348 | lib_modules[module_name] = dir.path(libdir, module_name) |
348 | ok = compile_library(module_name, objects, info.libraries, info.libdirs, name) | 349 | ok = compile_library(module_name, objects, info.libraries, info.libdirs or autolibdirs, name) |
349 | if not ok then | 350 | if not ok then |
350 | return nil, "Failed compiling module "..module_name | 351 | return nil, "Failed compiling module "..module_name |
351 | end | 352 | end |