cmake version and dependency linking

16 views
Skip to first unread message

danny...@outlook.com

unread,
Jun 11, 2020, 1:00:08 PM6/11/20
to TigerVNC Developer Discussion
Hi All,

I am looking at how to use cmake to determine runtime dependencies.  I found a post on the cmake forums about this: https://discourse.cmake.org/t/copying-dependent-dlls-to-executable-directory/852.  The best method suggested uses file(GET_RUNTIME_DEPENDENCIES) (https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies).  It appears that was introduced in cmake 3.16.

Is it ok to use functionality that requires cmake 3.16?

Does anyone else have suggestions for determining runtime dependencies, especially for Windows?

Thanks,
Danny

Pierre Ossman

unread,
Jun 15, 2020, 12:42:16 AM6/15/20
to danny...@outlook.com, TigerVNC Developer Discussion
On 11/06/2020 19:00, danny...@outlook.com wrote:
> Hi All,
>
> I am looking at how to use cmake to determine runtime dependencies. I
> found a post on the cmake forums about this:
> https://discourse.cmake.org/t/copying-dependent-dlls-to-executable-directory/852.
> The best method suggested uses file(GET_RUNTIME_DEPENDENCIES)
> (https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies).
> It appears that was introduced in cmake 3.16.
>
> Is it ok to use functionality that requires cmake 3.16?
>

Probably not. On Linux systems cmake is usually provided by the
distribution, so the latest and greatest is rarely available for everyone.

Have a look at what version of CMake is included in RHEL 7. That's
probably the oldest we need to support right now.

Since this only affects Windows though, we could make it an optional
feature. Assuming that is possible.

Regards
--
Pierre Ossman Software Development
Cendio AB http://cendio.com
Teknikringen 8 http://twitter.com/ThinLinc
583 30 Linköping http://facebook.com/ThinLinc
Phone: +46-13-214600 http://plus.google.com/+CendioThinLinc

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

danny...@outlook.com

unread,
Jun 17, 2020, 4:17:18 PM6/17/20
to TigerVNC Developer Discussion

Have a look at what version of CMake is included in RHEL 7. That's
probably the oldest we need to support right now.


It appears cmake 2.8.12 is still being used by CentOS 7 (I presume it is the same for RHEL 7).

Since this only affects Windows though, we could make it an optional
feature. Assuming that is possible.

I'll look into it.  It does only effect windows compiling but the official build for TigerVNC uses Linux to compile Windows binaries right now.  Depending on a newer version of cmake may not be a good idea.
Reply all
Reply to author
Forward
0 new messages