CMake/Tests/BundleTest/BundleTest.cxx

21 lines
534 B
C++
Raw Normal View History

2006-03-28 13:23:10 -05:00
#include <stdio.h>
#include <CoreFoundation/CoreFoundation.h>
2006-03-28 13:23:10 -05:00
extern int foo(char* exec);
int main(int argc, char* argv[])
2005-07-13 15:43:40 -04:00
{
2006-03-28 13:23:10 -05:00
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;
2006-03-28 13:23:10 -05:00
return foo(argv[0]);
2005-07-13 15:43:40 -04:00
}