https://github.com/Kitware/CMake
Raw File
Tip revision: 0f4e8fd0e9d4be3d6a9b6fd6d5a89f5155192064 authored by Brad King on 17 March 2014, 17:14:27 UTC
CMake 3.0.0-rc2
Tip revision: 0f4e8fd
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