Mac: Codify SDK and OS requirements, and clean up.
This #errors if you're using an SDK or deployment target that is less than 10.6 and 10.5, respectively, and cleans up uses of MAC_OS_X_VERSION_MIN_REQUIRED and MAC_OS_X_VERSION_MAX_ALLOWED according to those requirements.
This commit is contained in:
parent
defb16763d
commit
b01b128353
14 changed files with 30 additions and 159 deletions
|
@ -18,10 +18,10 @@ macro(CheckDLOPEN)
|
|||
endif()
|
||||
check_c_source_compiles("
|
||||
#include <dlfcn.h>
|
||||
#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 1020
|
||||
#error Use dlcompat for Mac OS X 10.2 compatibility
|
||||
#endif
|
||||
int main(int argc, char **argv) {}" HAVE_DLOPEN)
|
||||
int main(int argc, char **argv) {
|
||||
void *handle = dlopen("", RTLD_NOW);
|
||||
const char *loaderror = (char *) dlerror();
|
||||
}" HAVE_DLOPEN)
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue