summaryrefslogtreecommitdiffstats
path: root/Tests/iOSNavApp/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-09-12 17:47:13 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-09-12 19:46:24 (GMT)
commit64c9b318bf6062aa1a451d15af9e7016057168c1 (patch)
tree7c9984d86075396476a842b8c1409204574cfe25 /Tests/iOSNavApp/CMakeLists.txt
parent59a22655765a46c48dc3f45189101f2e9a265776 (diff)
downloadCMake-64c9b318bf6062aa1a451d15af9e7016057168c1.zip
CMake-64c9b318bf6062aa1a451d15af9e7016057168c1.tar.gz
CMake-64c9b318bf6062aa1a451d15af9e7016057168c1.tar.bz2
Xcode: Add test to demonstrate iOS project in Xcode
Presently, this test is only run manually because not all machines have an iOS SDK, complications associated with certificates and code signing, having a device attached, ... If you're setup to do iOS dev work, you can easily run this test manually on your Mac using the Xcode generator and run the result in the simulator or on your attached device.
Diffstat (limited to 'Tests/iOSNavApp/CMakeLists.txt')
-rw-r--r--Tests/iOSNavApp/CMakeLists.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/Tests/iOSNavApp/CMakeLists.txt b/Tests/iOSNavApp/CMakeLists.txt
new file mode 100644
index 0000000..12c3ada
--- /dev/null
+++ b/Tests/iOSNavApp/CMakeLists.txt
@@ -0,0 +1,38 @@
+cmake_minimum_required(VERSION 2.8.5)
+project(NavApp3)
+
+set(CMAKE_OSX_SYSROOT iphoneos4.3)
+set(CMAKE_OSX_ARCHITECTURES "armv6;armv7;i386")
+set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/Classes
+ )
+
+add_library(Functions STATIC TotalFunction.c TotalFunction.h)
+
+set(M_SRCS main.m Classes/NavApp3AppDelegate.m Classes/RootViewController.m)
+set(HEADERS Classes/NavApp3AppDelegate.h Classes/RootViewController.h)
+set(RESOURCES MainWindow.xib RootViewController.xib)
+
+add_executable(NavApp3 MACOSX_BUNDLE ${M_SRCS} ${HEADERS} ${RESOURCES})
+
+target_link_libraries(NavApp3
+ Functions
+ "-framework CoreGraphics"
+ "-framework Foundation"
+ "-framework UIKit"
+ )
+
+set_target_properties(NavApp3 PROPERTIES
+ MACOSX_BUNDLE_GUI_IDENTIFIER "com.yourcompany.NavApp3"
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
+ RESOURCE "${RESOURCES}"
+ XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
+ XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
+ XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES
+ XCODE_ATTRIBUTE_GCC_PREFIX_HEADER ${CMAKE_CURRENT_LIST_DIR}/NavApp3_Prefix.pch
+ XCODE_ATTRIBUTE_INFOPLIST_PREPROCESS YES
+ XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET 3.0
+ )