Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/sys.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Farabet <clement.farabet@gmail.com>2011-09-02 04:48:10 +0400
committerClement Farabet <clement.farabet@gmail.com>2011-09-02 04:48:10 +0400
commit83ff00bfb5be39bd4ac706b49d07ccaafa2d0723 (patch)
tree68fcf0f6121b421cbc3c312219ddc5bd32522715
parent85f30206eaec1cc39c273470bcc2d9ae4b284e34 (diff)
Fixed CMAke for luarocks.
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4efd971..56fad90 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,17 +7,20 @@ IF(${CMAKE_PROJECT_NAME} STREQUAL "Torch")
SET(INSTALL_PREFIX /${Torch_INSTALL_LUA_PATH_SUBDIR})
SET(CINSTALL_PREFIX /${Torch_INSTALL_LUA_CPATH_SUBDIR})
+
+ SET(LIBS ${TORCH_LIBRARIES})
ELSE(${CMAKE_PROJECT_NAME} STREQUAL "Torch")
string (REGEX REPLACE "(.*)lib/luarocks/rocks.*" "\\1" LUA_PREFIX "${CMAKE_INSTALL_PREFIX}" )
SET(INSTALL_PREFIX /lua)
SET(CINSTALL_PREFIX /lib)
+ SET(LIBS lua)
ENDIF(${CMAKE_PROJECT_NAME} STREQUAL "Torch")
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
include_directories (${PROJECT_SOURCE_DIR} ${LUA_PREFIX}/include)
link_directories (${LUA_PREFIX}/lib)
add_library (sys SHARED sys.c)
-target_link_libraries(sys ${TORCH_LIBRARIES})
+target_link_libraries(sys ${LIBS})
install_files(${INSTALL_PREFIX} sys.lua)
install_targets(${CINSTALL_PREFIX} sys)