Skip to content

cpack lib package fix#28

Open
5shekel wants to merge 2 commits intojoshdoe:masterfrom
5shekel:cpack-0
Open

cpack lib package fix#28
5shekel wants to merge 2 commits intojoshdoe:masterfrom
5shekel:cpack-0

Conversation

@5shekel
Copy link
Contributor

@5shekel 5shekel commented Apr 16, 2020

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}
  )

@joshdoe
Copy link
Owner

joshdoe commented Apr 16, 2020

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.

@5shekel
Copy link
Contributor Author

5shekel commented Apr 16, 2020

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

@joshdoe
Copy link
Owner

joshdoe commented Apr 16, 2020

@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...

@5shekel
Copy link
Contributor Author

5shekel commented Apr 16, 2020

its empty zip with your mods on WSL/ubuntu

@ahogen
Copy link

ahogen commented Apr 26, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants