Commit 025952bf authored by Alexis Girault's avatar Alexis Girault

COMP: correct ftd2xx & libusb install rules

Fixes #66
parent 80cc16fb
......@@ -16,22 +16,19 @@ set(FTD2XX_EXTRACT_DIR ${FTD2XX_PREFIX}/ftd2xx-2.12.18)
set(ftd2xx_libdir "i386")
if(${CMAKE_GENERATOR} MATCHES "Win64")
set(ftd2xx_libdir "amd64")
set(ftd2xx_dll_suffix "64")
endif()
set(copy_ftd2xx_shared_command
${CMAKE_COMMAND} -E copy_directory
${FTD2XX_EXTRACT_DIR}/${ftd2xx_libdir}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
set(copy_ftd2xx_dll_command
${CMAKE_COMMAND} -E copy
${FTD2XX_EXTRACT_DIR}/${ftd2xx_libdir}/ftd2xx${ftd2xx_dll_suffix}.dll
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ftd2xx.dll
)
set(copy_ftd2xx_static_command
set(copy_ftd2xx_lib_command
${CMAKE_COMMAND} -E copy
${FTD2XX_EXTRACT_DIR}/${ftd2xx_libdir}/ftd2xx.lib
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ftd2xx.lib
)
set(remove_ftd2xx_static_command
${CMAKE_COMMAND} -E remove
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ftd2xx.lib
)
#-----------------------------------------------------------------------------
# Add External Project
......@@ -47,9 +44,8 @@ imstk_add_external_project( FTD2XX
CONFIGURE_COMMAND ${SKIP_STEP_COMMAND}
BUILD_COMMAND ${SKIP_STEP_COMMAND}
INSTALL_COMMAND
${copy_ftd2xx_shared_command}
COMMAND ${copy_ftd2xx_static_command}
COMMAND ${remove_ftd2xx_static_command}
${copy_ftd2xx_lib_command}
COMMAND ${copy_ftd2xx_dll_command}
RELATIVE_INCLUDE_PATH "/"
#VERBOSE
)
......@@ -20,22 +20,22 @@ if(${CMAKE_GENERATOR} MATCHES "Win64")
set(libusb_exedir "bin64")
endif()
set(copy_libusb_static_command
${CMAKE_COMMAND} -E copy_directory
${Libusb_EXTRACT_DIR}/${libusb_libdir}/static
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
set(copy_libusb_lib_command
${CMAKE_COMMAND} -E copy
${Libusb_EXTRACT_DIR}/${libusb_libdir}/dll/libusb-1.0.lib
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/libusb-1.0.lib
)
set(copy_libusb_shared_command
${CMAKE_COMMAND} -E copy_directory
${Libusb_EXTRACT_DIR}/${libusb_libdir}/dll
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
set(copy_libusb_dll_command
${CMAKE_COMMAND} -E copy
${Libusb_EXTRACT_DIR}/${libusb_libdir}/dll/libusb-1.0.dll
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/libusb-1.0.dll
)
set(copy_libusb_exe_command
${CMAKE_COMMAND} -E copy_directory
${Libusb_EXTRACT_DIR}/examples/${libusb_exedir}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
set(copy_libusb_pdb_command
${CMAKE_COMMAND} -E copy
${Libusb_EXTRACT_DIR}/${libusb_libdir}/dll/libusb-1.0.pdb
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/libusb-1.0.pdb
)
#-----------------------------------------------------------------------------
......@@ -52,9 +52,9 @@ imstk_add_external_project( Libusb
CONFIGURE_COMMAND ${SKIP_STEP_COMMAND}
BUILD_COMMAND ${SKIP_STEP_COMMAND}
INSTALL_COMMAND
${copy_libusb_static_command}
COMMAND ${copy_libusb_shared_command}
COMMAND ${copy_libusb_exe_command}
${copy_libusb_lib_command}
COMMAND ${copy_libusb_dll_command}
COMMAND ${copy_libusb_pdb_command}
RELATIVE_INCLUDE_PATH "include/libusb-1.0"
#VERBOSE
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment