BundleTest.cxx 543 B

12345678910111213141516171819202122
  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
  8. // "-framework
  9. // CoreFoundation" via CMake's dependency chaining mechanism. This code
  10. // exists to
  11. // verify that the chaining mechanism works with "-framework blah" style
  12. // link dependencies.
  13. //
  14. CFBundleRef br = CFBundleGetMainBundle();
  15. (void)br;
  16. return foo(argv[0]);
  17. }