1 cmake_minimum_required (VERSION 2.6)
15 set_property(SOURCE fooDeepPublic.h
16 PROPERTY MACOSX_PACKAGE_LOCATION Headers/Deep
20 set_target_properties(foo PROPERTIES
22 FRAMEWORK_VERSION ${foo_ver}
23 PRIVATE_HEADER "fooPrivate.h;fooBoth.h"
24 PUBLIC_HEADER "foo.h;foo2.h;fooPublic.h;fooBoth.h"
26 INSTALL_NAME_DIR "@executable_path/../../../Library/Frameworks"
29 # fooBoth.h is listed as both public and private... (private wins...)
30 # fooNeither.h is listed as neither public nor private...
32 add_executable(bar bar.cxx)
33 target_link_libraries(bar foo)
34 install(TARGETS foo bar
35 RUNTIME DESTINATION Applications/CMakeTestsFramework/bin
36 FRAMEWORK DESTINATION Library/Frameworks
37 LIBRARY DESTINATION lib
38 ARCHIVE DESTINATION lib
40 # These are ignored on the Mac... and things are automatically placed in
41 # their appropriate Framework sub-folder at build time. (And then the built
42 # framework is copied recursively when it is installed.)
43 PRIVATE_HEADER DESTINATION share/foo-${foo_ver}/PrivateHeaders
44 PUBLIC_HEADER DESTINATION include/foo-${foo_ver}
45 RESOURCE DESTINATION share/foo-${foo_ver}/Resources
46 # But they are required to be present so that installing a framework on other
47 # other platforms will install the pieces of the framework without having to
48 # duplicate install rules for the pieces of the framework.
51 # Make a static library and apply the framework properties to it to verify
52 # that everything still builds correctly, but it will not actually produce
53 # a framework... The framework properties only apply when the library type
56 add_library(fooStatic STATIC
66 set_target_properties(fooStatic PROPERTIES
68 FRAMEWORK_VERSION none
70 add_executable(barStatic bar.cxx)
71 target_link_libraries(barStatic fooStatic)