Skip to content

Commit e626573

Browse files
committed
Spinnaker libraries are now all copied to usr/lib
1 parent 5877510 commit e626573

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

spinnaker_camera_driver/cmake/DownloadSpinnaker.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ function(download_spinnaker FLIR_LIB_VAR FLIR_INCLUDE_DIR_VAR)
1616
message(STATUS "Running download_spinnaker script with arguments: ${FLIR_ARCH} ${FLIR_DIR} ${OS_CODE_NAME}")
1717
execute_process(
1818
COMMAND ${DOWNLOAD_SCRIPT} ${FLIR_ARCH} "${FLIR_DIR}" ${OS_CODE_NAME})
19-
set(${FLIR_LIB_VAR} "${CMAKE_BINARY_DIR}/opt/spinnaker/lib/libSpinnaker.so" PARENT_SCOPE)
19+
set(${FLIR_LIB_VAR} "${CMAKE_BINARY_DIR}/usr/lib/libSpinnaker.so" PARENT_SCOPE)
2020
set(${FLIR_INCLUDE_DIR_VAR} "${CMAKE_BINARY_DIR}/opt/spinnaker/include/" PARENT_SCOPE)
2121
endfunction()

spinnaker_camera_driver/cmake/download_spinnaker

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ARCHS = {
5050
'current': '20.04',
5151
'type': 'deb',
5252
'folder_name': 'spinnaker-2.2.0.48-amd64',
53-
'shared_library': 'opt/spinnaker/lib/libSpinnaker.so.2.2.0.48',
53+
'shared_library': 'opt/spinnaker/lib/',
5454
'debs':[
5555
'libgentl_2.2.0.48_amd64.deb',
5656
'libspinnaker_2.2.0.48_amd64.deb',
@@ -73,7 +73,7 @@ ARCHS = {
7373
'linux_arch': 'armh64',
7474
'current': '20.04',
7575
'type': 'deb',
76-
'shared_library': 'opt/spinnaker/lib/libSpinnaker.so.2.2.0.48',
76+
'shared_library': 'opt/spinnaker/lib/',
7777
'folder_name': 'spinnaker-2.2.0.48_arm64',
7878
'debs': [
7979
'libgentl_2.2.0.48_arm64.deb',
@@ -139,9 +139,13 @@ if not os.path.exists(os.path.join(os.getcwd(), folder_name)):
139139
logging.info('Extracting {0}'.format(deb))
140140
subprocess.call(['dpkg', '--extract', deb, unpack_dir])
141141

142-
# finally, copy the shared libraries into the output folder
143-
src_file = os.path.join(unpack_dir, shared_library)
144-
logging.info('Copying shared library to {0}'.format(destination_folder))
142+
# Copy the shared libraries into the output folder
143+
logging.info('Copying libraries to {0}'.format(destination_folder))
145144
if not os.path.exists(destination_folder):
146145
os.makedirs(destination_folder)
147-
shutil.copyfile(src_file, os.path.join(destination_folder, 'libSpinnaker.so'))
146+
libs = glob.glob(os.path.join(os.getcwd(), 'opt/spinnaker/lib', "lib[!Q][!t]*.so*"))
147+
for lib in libs:
148+
logging.info('Copying: {}'.format(os.path.basename(lib)))
149+
shutil.copyfile(lib, os.path.join(destination_folder, os.path.basename(lib)))
150+
else:
151+
logging.info("Previous installation found, skipping...")

0 commit comments

Comments
 (0)