2011-06-19 15:41:06 +03:00
|
|
|
#include <CoreFoundation/CoreFoundation.h>
|
2020-02-01 23:06:01 +01:00
|
|
|
#include <stdio.h>
|
2008-10-12 21:55:53 +03:00
|
|
|
|
2008-10-12 18:41:06 +02:00
|
|
|
extern int foo(char* exec);
|
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
printf("Started with: %d arguments\n", argc);
|
2008-10-12 21:55:53 +03:00
|
|
|
|
2016-07-09 11:21:54 +02:00
|
|
|
// Call a CoreFoundation function... but pull in the link dependency on
|
|
|
|
// "-framework
|
|
|
|
// CoreFoundation" via CMake's dependency chaining mechanism. This code
|
|
|
|
// exists to
|
2008-10-12 21:55:53 +03:00
|
|
|
// verify that the chaining mechanism works with "-framework blah" style
|
|
|
|
// link dependencies.
|
|
|
|
//
|
|
|
|
CFBundleRef br = CFBundleGetMainBundle();
|
2016-07-09 11:21:54 +02:00
|
|
|
(void)br;
|
2008-10-12 21:55:53 +03:00
|
|
|
|
2008-10-12 18:41:06 +02:00
|
|
|
return foo(argv[0]);
|
|
|
|
}
|