# pwimp_use_windows_libusb.cmake -- # # CMake definitions for linking with OpenSceneGraph. # # Copyright (c) 2016 LIG/IIHM, University of Grenoble # # See the file "gil_LicenseTerms.txt" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # Created on Nov. 13th, 2016 (FB) Std_Header() if(NOT PWIMP_USE_WINDOWS_LIBUSB_ONCE) set(PWIMP_USE_WINDOWS_LIBUSB_ONCE 1) Indent_Include("${CUR_DIR}/platform_defs.cmake") # Define OSG variables get_filename_component(LIBUSB_TEST "${CMAKE_CURRENT_LIST_FILE}/../../../dependencies/libusb" ABSOLUTE) Define_Var_From_Env_Or_Value(LIBUSB ${LIBUSB_TEST} "${PLATFORM}/include/libusb-1.0/libusb.h") set(LIBUSB_INCLUDE "${LIBUSB}/${PLATFORM}/include") set(LIBUSB_LIB_DIR "${LIBUSB}/${PLATFORM}/lib") message(STATUS "${MSG_INDENT} LIBUSB_INCLUDE >${LIBUSB_INCLUDE}<") message(STATUS "${MSG_INDENT} LIBUSB_LIB_DIR >${LIBUSB_LIB_DIR}<") endif(NOT PWIMP_USE_WINDOWS_LIBUSB_ONCE) if(WINDOWS) include_directories(${LIBUSB_INCLUDE}) target_link_libraries(${TARGET_NAME} "${LIBUSB_LIB_DIR}/libusb-1.0.lib") message(STATUS "${MSG_INDENT} Target ${TARGET_NAME} links with libusb-1.0 >libusb-1.0.lib<.") endif(WINDOWS)