Files
pytorch/torch/lib/libshm_windows/CMakeLists.txt
andersj 8a5ba577c1 Revert "remove use of tmp_install" (#15847)
Summary:
This reverts commit 04bf5285896e52ac118d2f9e9b7f582f695f13e2.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15847

Differential Revision: D13603174

Pulled By: anderspapitto

fbshipit-source-id: ae321434d3345ad94fad67bf71fd027cddeb4588
2019-01-08 16:30:19 -08:00

27 lines
829 B
CMake

IF(NOT LIBSHM_INSTALL_LIB_SUBDIR)
SET(LIBSHM_INSTALL_BIN_SUBDIR "bin" CACHE PATH "libshm install binary directory")
SET(LIBSHM_INSTALL_LIB_SUBDIR "lib" CACHE PATH "libshm install library directory")
ENDIF()
ADD_LIBRARY(shm SHARED core.cpp)
TARGET_COMPILE_DEFINITIONS(shm PRIVATE
"_CRT_SECURE_NO_DEPRECATE=1"
"SHM_EXPORTS"
)
target_include_directories(shm PRIVATE
${TORCH_ROOT}/torch/lib # provides "libshm/libshm.h"
${CMAKE_BINARY_DIR}/caffe2/aten/src # provides <TH/THGeneral.h> to THC.h
${CMAKE_CURRENT_SOURCE_DIR}
)
TARGET_LINK_LIBRARIES(shm caffe2 c10)
INSTALL(TARGETS shm
RUNTIME DESTINATION "${LIBSHM_INSTALL_BIN_SUBDIR}"
LIBRARY DESTINATION "${LIBSHM_INSTALL_LIB_SUBDIR}"
ARCHIVE DESTINATION "${LIBSHM_INSTALL_LIB_SUBDIR}")
INSTALL(FILES libshm.h DESTINATION "include")