2007-05-08 18:58:35 +04:00
|
|
|
project(Framework)
|
2007-08-01 21:04:45 +04:00
|
|
|
|
2007-08-14 19:45:15 +04:00
|
|
|
add_library(foo SHARED
|
|
|
|
foo.cxx
|
|
|
|
foo.h
|
|
|
|
foo2.h
|
|
|
|
fooPublic.h
|
|
|
|
fooPrivate.h
|
|
|
|
fooNeither.h
|
|
|
|
fooBoth.h
|
|
|
|
test.lua
|
|
|
|
)
|
2007-08-01 21:04:45 +04:00
|
|
|
set_target_properties(foo PROPERTIES
|
2007-05-08 19:53:39 +04:00
|
|
|
FRAMEWORK TRUE
|
2007-08-14 19:45:15 +04:00
|
|
|
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
|
2007-05-08 18:58:35 +04:00
|
|
|
)
|
|
|
|
add_executable(bar bar.cxx)
|
|
|
|
target_link_libraries(bar foo)
|
2007-08-24 21:30:41 +04:00
|
|
|
install(TARGETS foo bar
|
|
|
|
RUNTIME DESTINATION /Applications/CMakeTestsFramework/bin
|
|
|
|
FRAMEWORK DESTINATION /Library/Frameworks
|
|
|
|
)
|
2007-08-01 21:04:45 +04:00
|
|
|
|
|
|
|
# Make a static library and apply the framework properties to it to verify
|
|
|
|
# that everything still builds correctly, but it will not actually produce
|
|
|
|
# a framework... The framework properties only apply when the library type
|
|
|
|
# is SHARED.
|
|
|
|
#
|
2007-08-14 19:45:15 +04:00
|
|
|
add_library(fooStatic STATIC
|
|
|
|
foo.cxx
|
|
|
|
foo.h
|
|
|
|
foo2.h
|
|
|
|
fooPublic.h
|
|
|
|
fooPrivate.h
|
|
|
|
fooNeither.h
|
|
|
|
fooBoth.h
|
|
|
|
test.lua
|
|
|
|
)
|
2007-08-01 21:04:45 +04:00
|
|
|
set_target_properties(fooStatic PROPERTIES
|
|
|
|
FRAMEWORK TRUE
|
2007-08-14 19:45:15 +04:00
|
|
|
FRAMEWORK_VERSION none
|
2007-08-01 21:04:45 +04:00
|
|
|
)
|
|
|
|
add_executable(barStatic bar.cxx)
|
|
|
|
target_link_libraries(barStatic fooStatic)
|