diff options
author | Hao Xi <kevin@picturekeeper.com> | 2016-12-08 12:53:40 +0800 |
---|---|---|
committer | Hao Xi <kevin@picturekeeper.com> | 2016-12-08 12:53:40 +0800 |
commit | b5115e3497328d80a9accf8c1c303374ec36e884 (patch) | |
tree | 8ce5b0cb17acd82db789ad23466b593dac0d71d1 /ConfigureChecks.cmake | |
parent | 36ccad2bd4b5b8aec1e547faef3bfe0269316ae9 (diff) |
Fix #667: Compiled TagLib framework for OS X fails at codesign.
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index ee4fdc2e..fe365711 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -54,11 +54,16 @@ check_cxx_source_compiles(" " HAVE_STD_ATOMIC) if(NOT HAVE_STD_ATOMIC) - find_package(Boost COMPONENTS atomic) - if(Boost_ATOMIC_FOUND) - set(HAVE_BOOST_ATOMIC 1) - else() - set(HAVE_BOOST_ATOMIC 0) + + # We will not find BOOST_ATOMIC on macOS when BUILD_FRAMEWORK is set, since we don't want to link + # to `libboost_atomic-mt.dylib` within `tag.framework`. + if(NOT BUILD_FRAMEWORK) + find_package(Boost COMPONENTS atomic) + if(Boost_ATOMIC_FOUND) + set(HAVE_BOOST_ATOMIC 1) + else() + set(HAVE_BOOST_ATOMIC 0) + endif() endif() if(NOT HAVE_BOOST_ATOMIC) |