aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-22 12:37:59 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-22 12:37:59 +0100
commite3115479423efb1d864021fa30e5d454f02ae1ea (patch)
treea9628f6feea90939c3fd1325578c8193ea8fa07f /contrib
parent55af1d497f8c3302d12a3b0ae7e7baedfe2fb973 (diff)
downloadrspamd-e3115479423efb1d864021fa30e5d454f02ae1ea.tar.gz
rspamd-e3115479423efb1d864021fa30e5d454f02ae1ea.zip
[Minor] Further fixes for torch RPATH
Diffstat (limited to 'contrib')
-rw-r--r--contrib/torch/torch7/cmake/TorchPackage.cmake2
-rw-r--r--contrib/torch/torch7/cmake/TorchPathsInit.cmake19
2 files changed, 1 insertions, 20 deletions
diff --git a/contrib/torch/torch7/cmake/TorchPackage.cmake b/contrib/torch/torch7/cmake/TorchPackage.cmake
index 83af751ab..241dd195b 100644
--- a/contrib/torch/torch7/cmake/TorchPackage.cmake
+++ b/contrib/torch/torch7/cmake/TorchPackage.cmake
@@ -25,7 +25,7 @@ MACRO(ADD_TORCH_PACKAGE package src luasrc)
# As per CMake doc, macro arguments are not variables, so simple test syntax not working
IF(NOT "${src}" STREQUAL "")
- ADD_TORCH_LIBRARY(${package} MODULE "${src}")
+ ADD_TORCH_LIBRARY(${package} SHARED "${src}")
### Torch packages supposes libraries prefix is "lib"
SET_TARGET_PROPERTIES(${package} PROPERTIES
diff --git a/contrib/torch/torch7/cmake/TorchPathsInit.cmake b/contrib/torch/torch7/cmake/TorchPathsInit.cmake
index 2b59c4a0c..42f8ffb3f 100644
--- a/contrib/torch/torch7/cmake/TorchPathsInit.cmake
+++ b/contrib/torch/torch7/cmake/TorchPathsInit.cmake
@@ -17,25 +17,6 @@ FILE(RELATIVE_PATH Torch_INSTALL_CMAKE_RIDBUS "${Torch_INSTALL_CMAKE}" "${Torch_
GET_FILENAME_COMPONENT(Torch_INSTALL_BIN_RIDBUS "${Torch_INSTALL_BIN_RIDBUS}" PATH)
GET_FILENAME_COMPONENT(Torch_INSTALL_CMAKE_RIDBUS "${Torch_INSTALL_CMAKE_RIDBUS}" PATH)
-IF(UNIX)
- OPTION(WITH_RPATH "Build libraries with executable rpaths" ON)
-
- IF(WITH_RPATH)
- SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
- FILE(RELATIVE_PATH Torch_INSTALL_BIN2LIB
- "${Torch_INSTALL_BIN}" "${Torch_INSTALL_LIB}")
- IF(APPLE)
- SET(CMAKE_MACOSX_RPATH TRUE) # @rpath in libs
- SET(CMAKE_INSTALL_RPATH "@executable_path/${Torch_INSTALL_BIN2LIB}") # exec
- ELSE()
- SET(CMAKE_INSTALL_RPATH "\$ORIGIN/${Torch_INSTALL_BIN2LIB}")
- ENDIF()
- ELSE()
- SET(CMAKE_MACOSX_RPATH FALSE) # no @rpath in libs
- ENDIF()
-
-ENDIF(UNIX)
-
IF (WIN32)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")