don't link a NOTFOUND leap library

This commit is contained in:
Stephen Birarda 2013-07-02 15:27:30 -07:00
parent 010e6e5570
commit 1993601389
2 changed files with 7 additions and 3 deletions

View file

@ -32,9 +32,9 @@ else (LEAP_LIBRARIES AND LEAP_INCLUDE_DIRS)
endif ()
# If we're using the Leap stubs, there's only a header, no lib.
if (LEAP_INCLUDE_DIRS)
if (LEAP_LIBRARIES AND LEAP_INCLUDE_DIRS)
set(LEAP_FOUND TRUE)
endif (LEAP_INCLUDE_DIRS)
endif (LEAP_LIBRARIES AND LEAP_INCLUDE_DIRS)
if (LEAP_FOUND)
if (NOT Leap_FIND_QUIETLY)

View file

@ -153,8 +153,12 @@ if (APPLE)
${QuartzCore}
${UVCCAMERACONTROL_LIBRARIES}
${LIBOVR_LIBRARIES}
${LEAP_LIBRARIES}
)
if (LEAP_FOUND)
target_link_libraries(${TARGET_NAME} ${LEAP_LIBRARIES})
endif(LEAP_FOUND)
else (APPLE)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)