gst-plugins-vision icon indicating copy to clipboard operation
gst-plugins-vision copied to clipboard

cpack lib package fix

Open 5shekel opened this issue 4 years ago • 5 comments

needs to adapt all install directive in cmakelist to added them to the package. otherwise it will generate an empty zip see https://cmake.org/pipermail/cmake/2012-October/052410.html

install(
  TARGETS ${libname} 
  LIBRARY DESTINATION lib COMPONENT ${PLUGIN_INSTALL_DIR}
  )

5shekel avatar Apr 16 '20 10:04 5shekel

I tested on Ubuntu with master and it is an empty zip, with your PR it creates the correct zip. However, on Windows with or without your PR it creates an incomplete zip, only including the klv library. Let me try a few things.

joshdoe avatar Apr 16 '20 10:04 joshdoe

yes i should've mention i only tested on linux...

5shekel avatar Apr 16 '20 11:04 5shekel

@5shekel can you test my cpack-0 branch? I added one more commit, which seems to work both on Windows and Linux. I changed the behavior of PLUGIN_INSTALL_DIR et. al., so now it's a relative path to CMAKE_INSTALL_PREFIX. Probably should change the name...

joshdoe avatar Apr 16 '20 11:04 joshdoe

its empty zip with your mods on WSL/ubuntu

5shekel avatar Apr 16 '20 11:04 5shekel

However, on Windows with or without your PR it creates an incomplete zip, only including the klv library. Let me try a few things.

I haven't read the full PR here, but skimming I see a lot of...

install(
  TARGETS ${libname} 
  LIBRARY DESTINATION lib COMPONENT ${PLUGIN_INSTALL_DIR}
)

Which is missing RUNTIME DESTINATION. Keep in mind Windows DLLs are runtime executable, unlike Linux shared objects. Maybe try...?

install(
  TARGETS ${libname} 
  RUNTIME DESTINATION lib COMPONENT ${PLUGIN_INSTALL_DIR}
  LIBRARY DESTINATION lib COMPONENT ${PLUGIN_INSTALL_DIR}
)

ref: https://cmake.org/cmake/help/latest/command/install.html#installing-targets

ahogen avatar Apr 26 '23 17:04 ahogen