Project

General

Profile

Bug #1761

loadable-module naming on macosx + cmake

Added by Anonymous almost 9 years ago. Updated about 1 year ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
build_cmake
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

Description

Modules get built as mod_foo.dylib on OSX (which is OK) but then the core tries to load them from mod_foo.so (which fails, of course).

This patch fixes the problem by changing the library type from SHARED to MODULE. The cmake docs say this shouldn't change the behavior on other systems. On OSX it has the useful effect of changing the default suffix to .so. (Maybe it would be more "OSX-y" to leave it at .dylib and have the plugin code know its host system's module suffix more reliably, but this change works and is simple.)

A MODULE library no longer gets affected by the CMAKE_SHARED_LIBRARY_PREFIX variable, so the other change here is to set the prefix property on the module target directly, instead of globally.

I've tested this patch in a handful of configurations on OSX (static, shared). Someone should probably verify that it doesn't break Win32, though, since that's the other special-cased system type near this change.

-- wiml

modulename.patch (1.08 KB) modulename.patch fixes loadable-module naming on mac os x -- wiml Anonymous, 2008-08-27 06:32

Associated revisions

Revision bb93414a (diff)
Added by gstrauss about 1 year ago

[build_cmake] use MODULE on Mac OS X (fixes #1761)

add instructions in INSTALL to build using CMake and Xcode on Mac OS X
along with MacPorts
update CMake to link test_configfile with pcre

x-ref:
"loadable-module naming on macosx + cmake"
https://redmine.lighttpd.net/issues/1761

History

#1 Updated by gstrauss over 1 year ago

  • Description updated (diff)
  • Status changed from New to Need Feedback

stbuehler: trivial patch, but I do not have a Mac system with which to test.

Is this still an issue for those building with cmake on OS X? Is this an issue for those building on OS X without using cmake?

#2 Updated by gstrauss about 1 year ago

  • Status changed from Need Feedback to Patch Pending
  • Assignee deleted (jan)
  • Target version set to 1.4.40

#3 Updated by gstrauss about 1 year ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom