Feature #1321

Adopt WITH_STATIC_EXTERNAL for Mac OS X

Added by rti about 7 years ago. Updated over 6 years ago.

Status:Closed Start date:06/14/2011
Priority:Normal Due date:
Assignee:kervala % Done:

100%

Category:OS: Mac
Target version:Version 0.9.0

Description

see r1626

History

#1 Updated by rti about 7 years ago

The default value of CMAKE_FIND_LIBRARY_SUFFIXES on Mac OS X is ".dylib;.so;.a". So it prefers .dylib over .so over .a.

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?

#2 Updated by kervala over 6 years ago

  • Status changed from New to Assigned
  • Assignee set to kervala

#3 Updated by kervala over 6 years 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 6 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:02bc0b6f7765.

#5 Updated by kervala over 6 years ago

  • Target version set to Version 0.9.0

#6 Updated by kervala over 6 years 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.

#7 Updated by kervala over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF