Merge pull request #362 from RandomErrorMessage/brushbsp

added SKIP_TBB_INSTALL and SKIP_EMBREE_INSTALL to cmake
This commit is contained in:
Eric Wasylishen 2023-06-19 07:09:35 -06:00 committed by GitHub
commit 0a8aa6e95b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,6 @@
option(SKIP_TBB_INSTALL "Skip TBB Library Installation" OFF)
option(SKIP_EMBREE_INSTALL "Skip Embree Library Installation" OFF)
set(LIGHT_INCLUDES set(LIGHT_INCLUDES
../include/light/entities.hh ../include/light/entities.hh
../include/light/light.hh ../include/light/light.hh
@ -96,11 +99,17 @@ if (embree_FOUND)
COMMAND bash ARGS -c \"install_name_tool -add_rpath @loader_path $<TARGET_FILE:light> || true\") COMMAND bash ARGS -c \"install_name_tool -add_rpath @loader_path $<TARGET_FILE:light> || true\")
endif() endif()
install(FILES $<TARGET_FILE:embree> DESTINATION bin) if(NOT SKIP_EMBREE_INSTALL)
install(FILES $<TARGET_FILE:embree> DESTINATION bin)
endif()
# install TBB # install TBB
if(UNIX) if(SKIP_TBB_INSTALL)
# HACK: preferred method is installing the symlink instead of the actual .so message(STATUS "Skipping TBB Install")
elseif(UNIX)
# HACK: manually follow symlinks to ensure the underlying .so files
# get installed, not symlinks. The "preferred method" below is installing the symlink,
# which produces unusable release archives.
get_target_property(TBB_SO_FILE_SYMLINK TBB::tbb IMPORTED_LOCATION_RELEASE) get_target_property(TBB_SO_FILE_SYMLINK TBB::tbb IMPORTED_LOCATION_RELEASE)
message(STATUS "TBB .so symlink: ${TBB_SO_FILE_SYMLINK}") message(STATUS "TBB .so symlink: ${TBB_SO_FILE_SYMLINK}")
@ -131,7 +140,7 @@ if (embree_FOUND)
install(FILES $<TARGET_FILE:TBB::tbbmalloc> DESTINATION bin) install(FILES $<TARGET_FILE:TBB::tbbmalloc> DESTINATION bin)
endif() endif()
if (NOT EMBREE_LICENSE STREQUAL EMBREE_LICENSE-NOTFOUND) if((NOT SKIP_EMBREE_INSTALL) AND (NOT EMBREE_LICENSE STREQUAL EMBREE_LICENSE-NOTFOUND))
install(FILES ${EMBREE_LICENSE} DESTINATION bin RENAME LICENSE-embree.txt) install(FILES ${EMBREE_LICENSE} DESTINATION bin RENAME LICENSE-embree.txt)
endif() endif()
endif(embree_FOUND) endif(embree_FOUND)