From 6e96ae7cc21b1405b3f5b37389383449f17b6a9d Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sat, 11 Dec 2021 13:25:09 -0700 Subject: [PATCH] light/CMakeLists.txt: make it non-fatal if the embree license isn't found --- light/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/light/CMakeLists.txt b/light/CMakeLists.txt index 4474fe13..fc659a7c 100644 --- a/light/CMakeLists.txt +++ b/light/CMakeLists.txt @@ -79,8 +79,12 @@ if (embree_FOUND) add_custom_command(TARGET light POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "$" "$" - COMMAND ${CMAKE_COMMAND} -E copy_if_different "$" "$" + COMMAND ${CMAKE_COMMAND} -E copy_if_different "$" "$") + + if (NOT EMBREE_LICENSE STREQUAL EMBREE_LICENSE-NOTFOUND) + add_custom_command(TARGET light POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${EMBREE_LICENSE}" "$/LICENSE-embree.txt") + endif() # so the executable will search for dylib's in the same directory as the executable if(APPLE) @@ -104,7 +108,9 @@ if (embree_FOUND) install(FILES $ DESTINATION bin) endif() - install(FILES ${EMBREE_LICENSE} DESTINATION bin RENAME LICENSE-embree.txt) + if (NOT EMBREE_LICENSE STREQUAL EMBREE_LICENSE-NOTFOUND) + install(FILES ${EMBREE_LICENSE} DESTINATION bin RENAME LICENSE-embree.txt) + endif() endif(embree_FOUND) install(TARGETS light RUNTIME DESTINATION bin)