source: trunk/config.tests/mac/xcodeversion.cpp@ 353

Last change on this file since 353 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 1.4 KB
Line 
1#include <stdlib.h>
2#include <stdio.h>
3#include <CoreFoundation/CoreFoundation.h>
4#include <Carbon/Carbon.h>
5
6int success = 0;
7int fail = 1;
8int internal_error = success; // enable dwarf on internal errors
9
10int main(int argc, const char **argv)
11{
12 CFURLRef cfurl;
13 OSStatus err = LSFindApplicationForInfo(0, CFSTR("com.apple.Xcode"), 0, 0, &cfurl);
14 if (err != noErr)
15 return internal_error;
16
17 CFBundleRef bundle = CFBundleCreate(0, cfurl);