diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-26 01:53:20 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-26 01:53:20 -0300 |
| commit | 98e09791e8c5ae540f57ec3305f05b0589164c90 (patch) | |
| tree | e2da0d320172596f0885a1bb6ac37d4d765c9733 /src | |
| parent | 5f293dd75c1a2ee59fd390d1e2d44913218cc75a (diff) | |
| parent | b4ea2a1123feb5dadf68163f2e67075f73bd8887 (diff) | |
| download | luarocks-98e09791e8c5ae540f57ec3305f05b0589164c90.tar.gz luarocks-98e09791e8c5ae540f57ec3305f05b0589164c90.tar.bz2 luarocks-98e09791e8c5ae540f57ec3305f05b0589164c90.zip | |
Merge branch 'master' of https://github.com/keplerproject/luarocks
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/build/cmake.lua | 3 | ||||
| -rw-r--r-- | src/luarocks/cfg.lua | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/luarocks/build/cmake.lua b/src/luarocks/build/cmake.lua index 0ee125a3..e5b29147 100644 --- a/src/luarocks/build/cmake.lua +++ b/src/luarocks/build/cmake.lua | |||
| @@ -37,6 +37,9 @@ function cmake.run(rockspec) | |||
| 37 | 37 | ||
| 38 | -- Execute cmake with variables. | 38 | -- Execute cmake with variables. |
| 39 | local args = "" | 39 | local args = "" |
| 40 | if cfg.cmake_generator then | ||
| 41 | args = args .. ' -G"'..cfg.cmake_generator.. '"' | ||
| 42 | end | ||
| 40 | for k,v in pairs(variables) do | 43 | for k,v in pairs(variables) do |
| 41 | args = args .. ' -D' ..k.. '="' ..v.. '"' | 44 | args = args .. ' -D' ..k.. '="' ..v.. '"' |
| 42 | end | 45 | end |
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index 45dbdd1b..f806f822 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua | |||
| @@ -371,6 +371,7 @@ end | |||
| 371 | if detected.mingw32 then | 371 | if detected.mingw32 then |
| 372 | defaults.platforms = { "win32", "mingw32", "windows" } | 372 | defaults.platforms = { "win32", "mingw32", "windows" } |
| 373 | defaults.obj_extension = "o" | 373 | defaults.obj_extension = "o" |
| 374 | defaults.cmake_generator = "MinGW Makefiles" | ||
| 374 | defaults.variables.MAKE = "mingw32-make" | 375 | defaults.variables.MAKE = "mingw32-make" |
| 375 | defaults.variables.CC = "mingw32-gcc" | 376 | defaults.variables.CC = "mingw32-gcc" |
| 376 | defaults.variables.RC = "windres" | 377 | defaults.variables.RC = "windres" |
| @@ -401,6 +402,7 @@ if detected.unix then | |||
| 401 | defaults.variables.LUA_INCDIR = site_config.LUA_INCDIR or "/usr/local/include" | 402 | defaults.variables.LUA_INCDIR = site_config.LUA_INCDIR or "/usr/local/include" |
| 402 | defaults.variables.LUA_LIBDIR = site_config.LUA_LIBDIR or "/usr/local/lib" | 403 | defaults.variables.LUA_LIBDIR = site_config.LUA_LIBDIR or "/usr/local/lib" |
| 403 | defaults.variables.CFLAGS = "-O2" | 404 | defaults.variables.CFLAGS = "-O2" |
| 405 | defaults.cmake_generator = "Unix Makefiles" | ||
| 404 | defaults.platforms = { "unix" } | 406 | defaults.platforms = { "unix" } |
| 405 | defaults.variables.CC = "gcc" | 407 | defaults.variables.CC = "gcc" |
| 406 | defaults.variables.LD = "gcc" | 408 | defaults.variables.LD = "gcc" |
| @@ -432,6 +434,7 @@ if detected.cygwin then | |||
| 432 | defaults.lib_extension = "so" -- can be overridden in the config file for mingw builds | 434 | defaults.lib_extension = "so" -- can be overridden in the config file for mingw builds |
| 433 | defaults.arch = "cygwin-"..proc | 435 | defaults.arch = "cygwin-"..proc |
| 434 | defaults.platforms = {"unix", "cygwin"} | 436 | defaults.platforms = {"unix", "cygwin"} |
| 437 | defaults.cmake_generator = "Unix Makefiles" | ||
| 435 | defaults.variables.CC = "echo -llua | xargs gcc" | 438 | defaults.variables.CC = "echo -llua | xargs gcc" |
| 436 | defaults.variables.LD = "echo -llua | xargs gcc" | 439 | defaults.variables.LD = "echo -llua | xargs gcc" |
| 437 | defaults.variables.LIBFLAG = "-shared" | 440 | defaults.variables.LIBFLAG = "-shared" |
