Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Tests / Framework / CMakeLists.txt
bloba6707a491bfa1d689b29c79cdb0a69192d8ed8a2
1 project(Framework)
3 add_library(foo SHARED
4   foo.cxx
5   foo.h
6   foo2.h
7   fooPublic.h
8   fooPrivate.h
9   fooNeither.h
10   fooBoth.h
11   test.lua
14 set(foo_ver ver4)
16 set_target_properties(foo PROPERTIES
17   FRAMEWORK TRUE
18   FRAMEWORK_VERSION ${foo_ver}
19   PRIVATE_HEADER "fooPrivate.h;fooBoth.h"
20   PUBLIC_HEADER "foo.h;foo2.h;fooPublic.h;fooBoth.h"
21   RESOURCE "test.lua"
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
48 # is SHARED.
50 add_library(fooStatic STATIC
51   foo.cxx
52   foo.h
53   foo2.h
54   fooPublic.h
55   fooPrivate.h
56   fooNeither.h
57   fooBoth.h
58   test.lua
60 set_target_properties(fooStatic PROPERTIES
61   FRAMEWORK TRUE
62   FRAMEWORK_VERSION none
64 add_executable(barStatic bar.cxx)
65 target_link_libraries(barStatic fooStatic)
67 include(CPack)