summaryrefslogtreecommitdiffstats
path: root/Tests/Framework
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2016-12-26 17:07:24 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-31 13:59:15 (GMT)
commit071f8e78dda152d8759539fa390b25c7f58d3cc5 (patch)
tree0f9e71cbe2e9556d44079a4311f53ec343bf3236 /Tests/Framework
parentd525754eabef7a9f6e6696ae323a8ed965e12f2e (diff)
downloadCMake-071f8e78dda152d8759539fa390b25c7f58d3cc5.zip
CMake-071f8e78dda152d8759539fa390b25c7f58d3cc5.tar.gz
CMake-071f8e78dda152d8759539fa390b25c7f58d3cc5.tar.bz2
Apple: Add support for static frameworks
Closes: #16432
Diffstat (limited to 'Tests/Framework')
-rw-r--r--Tests/Framework/CMakeLists.txt47
1 files changed, 24 insertions, 23 deletions
diff --git a/Tests/Framework/CMakeLists.txt b/Tests/Framework/CMakeLists.txt
index 271aaf1..a313c2c 100644
--- a/Tests/Framework/CMakeLists.txt
+++ b/Tests/Framework/CMakeLists.txt
@@ -57,29 +57,30 @@ add_custom_target(fooCustom ALL COMMAND ${CMAKE_COMMAND} -E copy foo-post-build
add_dependencies(fooCustom foo)
# 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.
+# that everything still builds correctly. Xcode prior to version 5 does not
+# support static Frameworks.
#
-add_library(fooStatic STATIC
- foo.cxx
- foo.h
- foo2.h
- fooExtensionlessResource
- fooPublic.h
- fooPublicExtensionlessHeader
- fooPrivate.h
- fooPrivateExtensionlessHeader
- fooNeither.h
- fooBoth.h
- test.lua
- fooDeepPublic.h
-)
-set_target_properties(fooStatic PROPERTIES
- FRAMEWORK TRUE
- FRAMEWORK_VERSION none
-)
-add_executable(barStatic bar.cxx)
-target_link_libraries(barStatic fooStatic)
+if(NOT XCODE OR NOT XCODE_VERSION VERSION_LESS 5)
+ add_library(fooStatic STATIC
+ foo.cxx
+ foo.h
+ foo2.h
+ fooExtensionlessResource
+ fooPublic.h
+ fooPublicExtensionlessHeader
+ fooPrivate.h
+ fooPrivateExtensionlessHeader
+ fooNeither.h
+ fooBoth.h
+ test.lua
+ fooDeepPublic.h
+ )
+ set_target_properties(fooStatic PROPERTIES
+ FRAMEWORK TRUE
+ FRAMEWORK_VERSION none
+ )
+ add_executable(barStatic bar.cxx)
+ target_link_libraries(barStatic fooStatic)
+endif()
include(CPack)