BundleTest.cxx 534 B

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