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)