16 set_target_properties(foo PROPERTIES
18 FRAMEWORK_VERSION ${foo_ver}
19 PRIVATE_HEADER "fooPrivate.h;fooBoth.h"
20 PUBLIC_HEADER "foo.h;foo2.h;fooPublic.h;fooBoth.h"
23 # fooBoth.h is listed as both public and private... (private wins...)
24 # fooNeither.h is listed as neither public nor private...
26 add_executable(bar bar.cxx)
27 target_link_libraries(bar foo)
28 install(TARGETS foo bar
29 RUNTIME DESTINATION Applications/CMakeTestsFramework/bin
30 FRAMEWORK DESTINATION Library/Frameworks
31 LIBRARY DESTINATION lib
32 ARCHIVE DESTINATION lib
34 # These are ignored on the Mac... and things are automatically placed in
35 # their appropriate Framework sub-folder at build time. (And then the built
36 # framework is copied recursively when it is installed.)
37 PRIVATE_HEADER DESTINATION share/foo-${foo_ver}/PrivateHeaders
38 PUBLIC_HEADER DESTINATION include/foo-${foo_ver}
39 RESOURCE DESTINATION share/foo-${foo_ver}/Resources
40 # But they are required to be present so that installing a framework on other
41 # other platforms will install the pieces of the framework without having to
42 # duplicate install rules for the pieces of the framework.
45 # Make a static library and apply the framework properties to it to verify
46 # that everything still builds correctly, but it will not actually produce
47 # a framework... The framework properties only apply when the library type
50 add_library(fooStatic STATIC
60 set_target_properties(fooStatic PROPERTIES
62 FRAMEWORK_VERSION none
64 add_executable(barStatic bar.cxx)
65 target_link_libraries(barStatic fooStatic)