Adopt WITH_STATIC_EXTERNAL for Mac OS X
|Target version:||Version 0.9.0|
#1 Updated by rti about 2 years ago
The default value of
CMAKE_FIND_LIBRARY_SUFFIXES on Mac OS X is "
.dylib;.so;.a". So it prefers
For some libraries, the system might not provide static ones (e.g. Apple provided libz, libSystem, etc.).
Having a list of extensions enables a fall back solution, while just setting it to one of the extensions will simply fail if the desired one is not available.
WITH_STATIC_EXTERNAL could set
CMAKE_FIND_LIBRARY_SUFFIXES to something like
.a;.dylib;.so on Mac OS X.
Maybe a similar way could be interesting for Linux based systems as well?
#3 Updated by kervala over 1 year ago
As suggested by rti, I updated code to check for :
- Mac OS X : .dylib .so .a if WITH_STATIC_EXTERNAL is OFF
- Mac OS X : .a .dylib .so if WITH_STATIC_EXTERNAL is ON
- Linux : .so .a if WITH_STATIC_EXTERNAL is OFF
- Linux : .a .so if WITH_STATIC_EXTERNAL is ON
#4 Updated by kervala over 1 year ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Applied in changeset commit:02bc0b6f7765.
#6 Updated by kervala over 1 year ago
The problem we had recently while compiling a full static client is that libGL.a doesn't exist because it's provided by graphics card drivers, it could exist other cases as for OpenAL which doesn't provide a static library under Ubuntu last version.