build: fix Linux packaging
- rename the tbb + tbbmalloc .so files from .so.X.Y to .so.X - set rpath to be "$ORIGIN" so the .so files are found
This commit is contained in:
parent
c3461a107b
commit
0a5debd278
|
|
@ -43,6 +43,11 @@ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
|
|||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO OFF)
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH YES)
|
||||
endif ()
|
||||
|
||||
add_definitions(-DERICWTOOLS_VERSION="${GIT_DESCRIBE}")
|
||||
|
||||
if (WIN32)
|
||||
|
|
|
|||
|
|
@ -102,19 +102,29 @@ if (embree_FOUND)
|
|||
if(UNIX)
|
||||
# HACK: preferred method is installing the symlink instead of the actual .so
|
||||
get_target_property(TBB_SO_FILE_SYMLINK TBB::tbb IMPORTED_LOCATION_RELEASE)
|
||||
get_filename_component(TBB_SO_FILE "${TBB_SO_FILE_SYMLINK}" REALPATH)
|
||||
message(STATUS "TBB .so symlink: ${TBB_SO_FILE_SYMLINK}")
|
||||
|
||||
# just the name part of the symlink
|
||||
get_filename_component(TBB_SO_FILE_SYMLINK_NAME "${TBB_SO_FILE_SYMLINK}" NAME)
|
||||
message(STATUS "TBB .so symlink name: ${TBB_SO_FILE_SYMLINK_NAME}")
|
||||
|
||||
get_filename_component(TBB_SO_FILE "${TBB_SO_FILE_SYMLINK}" REALPATH)
|
||||
message(STATUS "TBB .so file: ${TBB_SO_FILE}")
|
||||
|
||||
install(FILES ${TBB_SO_FILE} DESTINATION bin)
|
||||
install(FILES ${TBB_SO_FILE} DESTINATION bin RENAME "${TBB_SO_FILE_SYMLINK_NAME}")
|
||||
|
||||
# tbbmalloc
|
||||
get_target_property(TBBMALLOC_SO_FILE_SYMLINK TBB::tbbmalloc IMPORTED_LOCATION_RELEASE)
|
||||
message(STATUS "TBBMALLOC .so symlink: ${TBBMALLOC_SO_FILE_SYMLINK}")
|
||||
|
||||
get_filename_component(TBBMALLOC_SO_FILE_SYMLINK_NAME "${TBBMALLOC_SO_FILE_SYMLINK}" NAME)
|
||||
message(STATUS "TBBMALLOC .so symlink name: ${TBBMALLOC_SO_FILE_SYMLINK_NAME}")
|
||||
|
||||
get_filename_component(TBBMALLOC_SO_FILE "${TBBMALLOC_SO_FILE_SYMLINK}" REALPATH)
|
||||
|
||||
message(STATUS "TBBMALLOC .so file: ${TBBMALLOC_SO_FILE}")
|
||||
|
||||
install(FILES ${TBBMALLOC_SO_FILE} DESTINATION bin)
|
||||
install(FILES ${TBBMALLOC_SO_FILE} DESTINATION bin RENAME "${TBBMALLOC_SO_FILE_SYMLINK_NAME}")
|
||||
else()
|
||||
# preferred method
|
||||
install(FILES $<TARGET_FILE:TBB::tbb> DESTINATION bin)
|
||||
|
|
|
|||
Loading…
Reference in New Issue