diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-22 12:37:59 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-22 12:37:59 +0100 |
commit | e3115479423efb1d864021fa30e5d454f02ae1ea (patch) | |
tree | a9628f6feea90939c3fd1325578c8193ea8fa07f /contrib | |
parent | 55af1d497f8c3302d12a3b0ae7e7baedfe2fb973 (diff) | |
download | rspamd-e3115479423efb1d864021fa30e5d454f02ae1ea.tar.gz rspamd-e3115479423efb1d864021fa30e5d454f02ae1ea.zip |
[Minor] Further fixes for torch RPATH
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/torch/torch7/cmake/TorchPackage.cmake | 2 | ||||
-rw-r--r-- | contrib/torch/torch7/cmake/TorchPathsInit.cmake | 19 |
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}") |