What are the "Static" options for in CMake?

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
mattwla
Posts: 59
Joined: 17 Jul 2017, 14:45

What are the "Static" options for in CMake?

Post by mattwla »

Spent the evening building and compiling the win64 openmw.

Things are finally going well, I've learned a lot.

I notice cmake has options for each dependency to make them static, such as "BOOST_STATIC" or "SDL2_STATIC"

What do these options do? My cmake seemed to generate fine without them.

Thanks,
User avatar
Frik
Posts: 124
Joined: 20 Dec 2016, 05:22

Re: What are the "Static" options for in CMake?

Post by Frik »

mattwla
Posts: 59
Joined: 17 Jul 2017, 14:45

Re: What are the "Static" options for in CMake?

Post by mattwla »

Thanks for the link, it really clarified things! In the public releases of openmw is static or dynamic used? Or a mix?
User avatar
Frik
Posts: 124
Joined: 20 Dec 2016, 05:22

Re: What are the "Static" options for in CMake?

Post by Frik »

Afaik, public releases are static, so as to avoid all the different versions of libs that might be encountered on a given OS.

Compiling your own is the way go. It allows you to stay current between releases when there major updates to the master, such as with Distant Terrain. ;)

Looks like you're on the right track. 8-)
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: What are the "Static" options for in CMake?

Post by psi29a »

All releases from the PPA are dynamically linked, not static.
User avatar
Frik
Posts: 124
Joined: 20 Dec 2016, 05:22

Re: What are the "Static" options for in CMake?

Post by Frik »

Just checked the generic Linux .41 build and you're right. It appears the libs are dynamically linked there. I thought I had seen an example of openmw with static libs. Meh, must have been another package I was thinking of.

What is done in the case where the distro doesn't provide the proper version of the dependent lib
(i.e Fedora 26 & bullet3-2.86.1)?
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: What are the "Static" options for in CMake?

Post by psi29a »

We had static libs on the PPA for those interested, but it never got much use so I disabled it. You can still build OpenMW that way if you wish, it just hasn't been tested in years. ;)
Post Reply