# LCM
#============================================================
set (LCM_TARBALL "lcm-0.3.1.tar.gz")
set (LCM_DIR "lcm-0.3.1")
add_custom_target (third-party-lcm ALL
  COMMAND rm -rf ${LCM_DIR} lcm
  COMMAND mkdir ${LCM_DIR}
  COMMAND ln -sf ${LCM_DIR} lcm
  COMMAND tar zxvf  ${LCM_TARBALL} -C lcm --strip 1
  COMMAND cd lcm && ./configure
  COMMAND make -C lcm -j2
  COMMAND sudo make -C lcm install
  COMMAND touch lcm/CMAKE_BUILT
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  )

# PROSILICA
#============================================================
set (PROSILICA_TARBALL "Prosilica GigE SDK 1.20 Linux.tgz")
set (PROSILICA_DIR "Prosilica_GigE_SDK_1.20_Linux")
add_custom_target (third-party-prosilica ALL
  COMMAND rm -rf ${PROSILICA_DIR} prosilica
  COMMAND mkdir ${PROSILICA_DIR}
  COMMAND ln -sf ${PROSILICA_DIR} prosilica
  COMMAND tar zxvf  ${PROSILICA_TARBALL} -C prosilica --strip 1
  COMMAND touch prosilica/CMAKE_BUILT
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
