I’m using CMake 3.20.
I have a 64-bit Linux application built by running CMake scripts. After I ran CPack to create a binary package, I found 32-bit system libraries were pulled into the package, while it should pull 64-bit libraries. For example, /lib/libstdc++.so.6.0.19 was copied into the package, while it should have copied /lib64/libstdc++.so.6.0.19. Here is my code for creating the package:
#install rules:
install(TARGETS flashtechSim RUNTIME DESTINATION bin)
install(CODE [[
file(GET_RUNTIME_DEPENDENCIES
RESOLVED_DEPENDENCIES_VAR dpdsList
UNRESOLVED_DEPENDENCIES_VAR unrslved
EXECUTABLES $<TARGET_FILE:flashtechSim>)
file(INSTALL ${dpdsList} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib FOLLOW_SYMLINK_CHAIN)
]]
)
#Creating distribution package:
include(CPack)