TZIVI-254: IVI needs a newer version of cmake
[profile/ivi/cmake.git] / Tests / BundleTest / BundleTest.cxx
1 #include <stdio.h>
2
3 #include <CoreFoundation/CoreFoundation.h>
4
5 extern int foo(char* exec);
6
7 int main(int argc, char* argv[])
8 {
9   printf("Started with: %d arguments\n", argc);
10
11   // Call a CoreFoundation function... but pull in the link dependency on "-framework
12   // CoreFoundation" via CMake's dependency chaining mechanism. This code exists to
13   // verify that the chaining mechanism works with "-framework blah" style
14   // link dependencies.
15   //
16   CFBundleRef br = CFBundleGetMainBundle();
17   (void) br;
18
19   return foo(argv[0]);
20 }