https://github.com/Kitware/CMake
Raw File
Tip revision: 519427e32c1f914b2a4184553c18fccd4614209d authored by Brad King on 17 May 2018, 13:07:43 UTC
CMake 3.11.2
Tip revision: 519427e
BundleTest.cxx
#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]);
}
back to top