cmake/Tests/BundleTest/BundleTest.cxx

22 lines
542 B
C++
Raw Normal View History

2011-06-19 15:41:06 +03:00
#include <CoreFoundation/CoreFoundation.h>
2020-02-01 23:06:01 +01:00
#include <stdio.h>
extern int foo(char* exec);
int main(int argc, char* argv[])
{
printf("Started with: %d arguments\n", argc);
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
// 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;
return foo(argv[0]);
}