diff options
author | David Cole <david.cole@kitware.com> | 2007-10-10 15:06:15 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2007-10-10 15:06:15 (GMT) |
commit | 8e4c7b99e1b73c641308c0177673dac33fe57df1 (patch) | |
tree | ad00c757835a3ac785fd1b3e78ca3b75c2f1a354 /Tests/Framework | |
parent | aa9ba5c3efcd32ea631435318f63dc476ac39798 (diff) | |
download | CMake-8e4c7b99e1b73c641308c0177673dac33fe57df1.zip CMake-8e4c7b99e1b73c641308c0177673dac33fe57df1.tar.gz CMake-8e4c7b99e1b73c641308c0177673dac33fe57df1.tar.bz2 |
ENH: Finish up the Framework creation code restructuring. Frameworks build and install now. More work needed on the packaging step. See Tests/Framework for example use.
Diffstat (limited to 'Tests/Framework')
-rw-r--r-- | Tests/Framework/CMakeLists.txt | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/Tests/Framework/CMakeLists.txt b/Tests/Framework/CMakeLists.txt index 57028d7..4f42b97 100644 --- a/Tests/Framework/CMakeLists.txt +++ b/Tests/Framework/CMakeLists.txt @@ -10,26 +10,34 @@ add_library(foo SHARED fooBoth.h test.lua ) + +set(foo_ver ver4) + set_target_properties(foo PROPERTIES FRAMEWORK TRUE - FRAMEWORK_VERSION ver3 -) -# fooNeither.h is marked neither public nor private... -# fooBoth.h is marked both public and private... (private wins...) -set_source_files_properties(foo.h foo2.h fooPublic.h fooBoth.h PROPERTIES - FRAMEWORK_PUBLIC_HEADER TRUE -) -set_source_files_properties(fooPrivate.h fooBoth.h PROPERTIES - FRAMEWORK_PRIVATE_HEADER TRUE -) -set_source_files_properties(test.lua PROPERTIES - FRAMEWORK_RESOURCE TRUE + FRAMEWORK_VERSION ${foo_ver} + PRIVATE_HEADER "fooPrivate.h;fooBoth.h" + PUBLIC_HEADER "foo.h;foo2.h;fooPublic.h;fooBoth.h" + RESOURCE "test.lua" ) +# fooBoth.h is listed as both public and private... (private wins...) +# fooNeither.h is listed as neither public nor private... + add_executable(bar bar.cxx) target_link_libraries(bar foo) install(TARGETS foo bar - RUNTIME DESTINATION /Applications/CMakeTestsFramework/bin - FRAMEWORK DESTINATION /Library/Frameworks + RUNTIME DESTINATION Applications/CMakeTestsFramework/bin + FRAMEWORK DESTINATION Library/Frameworks + + # These are ignored on the Mac... and things are automatically placed in + # their appropriate Framework sub-folder at build time. (And then the built + # framework is copied recursively when it is installed.) + PRIVATE_HEADER DESTINATION share/foo-${foo_ver}/PrivateHeaders + PUBLIC_HEADER DESTINATION include/foo-${foo_ver} + RESOURCE DESTINATION share/foo-${foo_ver}/Resources + # But they are required to be present so that installing a framework on other + # other platforms will install the pieces of the framework without having to + # duplicate install rules for the pieces of the framework. ) # Make a static library and apply the framework properties to it to verify @@ -53,3 +61,5 @@ set_target_properties(fooStatic PROPERTIES ) add_executable(barStatic bar.cxx) target_link_libraries(barStatic fooStatic) + +include(CPack) |