Skip to content

Instantly share code, notes, and snippets.

@2bits
Created October 20, 2011 23:13
Show Gist options
  • Select an option

  • Save 2bits/1302680 to your computer and use it in GitHub Desktop.

Select an option

Save 2bits/1302680 to your computer and use it in GitHub Desktop.
Why cmake doesn't create a links for some versioned dylibs
# When Cmake is told the avidemux2_cli target has a target_link_library
# dependency on the versioned ffmpeg lib it just built as a seperate
# library, libADM5avcodec.52.dylib, cmake then does not link against
# that versioned lib. It links against the unversioned lib. Not only
# does it link against the unversioned lib, but it only installs the
# the versioned one and doesn't symlink it to an unversioned one because
# it's not building and installing the library, rather it's building and
# installing the app. The ffmpeg build & install (which did create
# symlinks automatically) is only done into the temporary macbuild
# folder that avidemux itself is building in.
# This linking against unversioned libs I think is a feature of cmake.
# Well I say I think only after a week of pulling these files apart.
# So here we create symlinks for the unversioned libs, so that
# avidemux2_cli can load them when you run it after install.
if ARGV.build_head? then
ln_sf lib+'libADM5avcodec.53.dylib', lib+'libADM5avcodec.dylib'
ln_sf lib+'libADM5avformat.53.dylib', lib+'libADM5avformat.dylib'
ln_sf lib+'libADM5avutil.51.dylib', lib+'libADM5avutil.dylib'
ln_sf lib+'libADM5postproc.51.dylib', lib+'libADM5postproc.dylib'
ln_sf lib+'libADM5swscale.2.dylib', lib+'libADM5swscale.dylib'
else
ln_sf lib+'libADM5avcodec.52.dylib', lib+'libADM5avcodec.dylib'
ln_sf lib+'libADM5avformat.52.dylib', lib+'libADM5avformat.dylib'
ln_sf lib+'libADM5avutil.50.dylib', lib+'libADM5avutil.dylib'
ln_sf lib+'libADM5postproc.51.dylib', lib+'libADM5postproc.dylib'
ln_sf lib+'libADM5swscale.0.dylib', lib+'libADM5swscale.dylib'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment