1 cmake_minimum_required (VERSION 2.6)
8 fooExtensionlessResource
10 fooPublicExtensionlessHeader
12 fooPrivateExtensionlessHeader
18 set_property(SOURCE fooDeepPublic.h
19 PROPERTY MACOSX_PACKAGE_LOCATION Headers/Deep
23 set_target_properties(foo PROPERTIES
25 FRAMEWORK_VERSION ${foo_ver}
26 PRIVATE_HEADER "fooPrivate.h;fooBoth.h;fooPrivateExtensionlessHeader"
27 PUBLIC_HEADER "foo.h;foo2.h;fooPublic.h;fooBoth.h;fooPublicExtensionlessHeader"
28 RESOURCE "fooExtensionlessResource;test.lua"
29 INSTALL_NAME_DIR "@executable_path/../../../Library/Frameworks"
32 # fooBoth.h is listed as both public and private... (private wins...)
33 # fooNeither.h is listed as neither public nor private...
35 add_executable(bar bar.cxx)
36 target_link_libraries(bar foo)
37 install(TARGETS foo bar
38 RUNTIME DESTINATION Applications/CMakeTestsFramework/bin
39 FRAMEWORK DESTINATION Library/Frameworks
40 LIBRARY DESTINATION lib
41 ARCHIVE DESTINATION lib
43 # These are ignored on the Mac... and things are automatically placed in
44 # their appropriate Framework sub-folder at build time. (And then the built
45 # framework is copied recursively when it is installed.)
46 PRIVATE_HEADER DESTINATION share/foo-${foo_ver}/PrivateHeaders
47 PUBLIC_HEADER DESTINATION include/foo-${foo_ver}
48 RESOURCE DESTINATION share/foo-${foo_ver}/Resources
49 # But they are required to be present so that installing a framework on other
50 # other platforms will install the pieces of the framework without having to
51 # duplicate install rules for the pieces of the framework.
54 # Make a static library and apply the framework properties to it to verify
55 # that everything still builds correctly, but it will not actually produce
56 # a framework... The framework properties only apply when the library type
59 add_library(fooStatic STATIC
63 fooExtensionlessResource
65 fooPublicExtensionlessHeader
67 fooPrivateExtensionlessHeader
73 set_target_properties(fooStatic PROPERTIES
75 FRAMEWORK_VERSION none
77 add_executable(barStatic bar.cxx)
78 target_link_libraries(barStatic fooStatic)