https://github.com/Kitware/CMake
Raw File
Tip revision: 352ea99bbacf6e57bca47f43725d98b2a4a0b87d authored by Brad King on 23 February 2022, 14:22:31 UTC
CMake 3.23.0-rc2
Tip revision: 352ea99
BundleTest.cxx
#include <CoreFoundation/CoreFoundation.h>
#include <stdio.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