From 648981c9dae91821516223c604c0d85ff97964e3 Mon Sep 17 00:00:00 2001 From: RandomErrorMessage <35673979+RandomErrorMessage@users.noreply.github.com> Date: Mon, 19 Jun 2023 06:57:04 +0000 Subject: [PATCH 1/2] added SKIP_TBB_INSTALL and SKIP_EMBREE_INSTALL to cmake --- light/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/light/CMakeLists.txt b/light/CMakeLists.txt index 78432d5e..78c69c9e 100644 --- a/light/CMakeLists.txt +++ b/light/CMakeLists.txt @@ -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 ../include/light/entities.hh ../include/light/light.hh @@ -96,10 +99,14 @@ if (embree_FOUND) COMMAND bash ARGS -c \"install_name_tool -add_rpath @loader_path $ || true\") endif() - install(FILES $ DESTINATION bin) + if(NOT SKIP_EMBREE_INSTALL) + install(FILES $ DESTINATION bin) + endif() # install TBB - if(UNIX) + if(SKIP_TBB_INSTALL) + message(STATUS "Skipping TBB Install") + elseif(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) message(STATUS "TBB .so symlink: ${TBB_SO_FILE_SYMLINK}") From d514874d7815fa4c8b2d3459c5ce7ffad7f5351d Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 19 Jun 2023 07:04:30 -0600 Subject: [PATCH 2/2] also skip install of embree license if SKIP_EMBREE_INSTALL is ued clarify comment --- light/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/light/CMakeLists.txt b/light/CMakeLists.txt index 78c69c9e..0b66db07 100644 --- a/light/CMakeLists.txt +++ b/light/CMakeLists.txt @@ -107,7 +107,9 @@ if (embree_FOUND) if(SKIP_TBB_INSTALL) message(STATUS "Skipping TBB Install") elseif(UNIX) - # HACK: preferred method is installing the symlink instead of the actual .so + # 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) message(STATUS "TBB .so symlink: ${TBB_SO_FILE_SYMLINK}") @@ -138,7 +140,7 @@ if (embree_FOUND) install(FILES $ DESTINATION bin) 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) endif() endif(embree_FOUND)