Skip to content

Commit

Permalink
Removing assumption of Lua install directory
Browse files Browse the repository at this point in the history
  • Loading branch information
borisfom committed Feb 15, 2016
1 parent 77f10a2 commit ac885e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys-1.1-0.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ dependencies = {

build = {
type = "command",
build_command = [[cmake -E make_directory build && cd build && cmake .. -DLUALIB=$(LUALIB) -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$(LUA_BINDIR)/.." -DCMAKE_INSTALL_PREFIX="$(PREFIX)" && $(MAKE)]],
build_command = [[cmake -E make_directory build && cd build && cmake .. -DLUALIB=$(LUALIB) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(PREFIX)" && $(MAKE)]],
install_command = "cd build && $(MAKE) install"
}

3 comments on commit ac885e6

@Ark-kun
Copy link

@Ark-kun Ark-kun commented on ac885e6 May 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would CMake find files like share/torch/TorchPathsInit.cmake ?

@soumith
Copy link
Member

@soumith soumith commented on ac885e6 May 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually if you have the install path in $CMAKE_PREFIX_PATH , then it automatically picks up the folder share/cmake/* which has share/cmake/torch/*

@Ark-kun
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see luarocks setting the $CMAKE_PREFIX_PATH.
I see that luarocks adds the directory to the $PATH and CMake finds the share/torch/TorchConfig.cmake
When I manually run the cmake command line that luarocks runs (with expanded paths) it fails to find Torch since the installation prefix is not in $PATH.
I wonder whether it's a good idea to set CMAKE_PREFIX_PATH="$(LUAROCKS_PREFIX)" in .rockspec.

Please sign in to comment.