build OSL on systems without LLVM (issue1860044)


cliffo...@...
 

Reviewers: ,

Description:
This fixes a minor bug so that OSL builds on systems without LLVM
installed.

Please review this at http://codereview.appspot.com/1860044/show

Affected files:
src/liboslexec/CMakeLists.txt


Index: src/liboslexec/CMakeLists.txt
===================================================================
--- src/liboslexec/CMakeLists.txt (revision 786)
+++ src/liboslexec/CMakeLists.txt (working copy)
@@ -68,7 +68,10 @@
endif ()

ADD_LIBRARY ( oslexec SHARED ${liboslexec_srcs} )
-TARGET_LINK_LIBRARIES ( oslexec oslcomp ${OPENIMAGEIO_LIBRARY} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LIBRARY})
+TARGET_LINK_LIBRARIES ( oslexec oslcomp ${OPENIMAGEIO_LIBRARY} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} )
+if (LLVM_FOUND)
+ TARGET_LINK_LIBRARIES ( oslexec ${LLVM_LIBRARY} )
+endif()
LINK_ILMBASE ( oslexec )

INSTALL ( TARGETS oslexec LIBRARY DESTINATION lib )