summaryrefslogtreecommitdiffstats
path: root/Tests/BundleTest/BundleTest.cxx
blob: a66d601d38f5a351b7e1faa3194ab644ae5ece4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>

#include <CoreFoundation/CoreFoundation.h>

extern int foo(char* exec);

int main(int argc, char* argv[])
{
  printf("Started with: %d arguments\n", argc);

  // Call a CoreFoundation function... but pull in the link dependency on "-framework
  // CoreFoundation" via CMake's dependency chaining mechanism. This code exists to
  // verify that the chaining mechanism works with "-framework blah" style
  // link dependencies.
  //
  CFBundleRef br = CFBundleGetMainBundle();
  (void) br;

  return foo(argv[0]);
}