summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Export
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-28 19:46:16 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-28 19:46:16 (GMT)
commite3b1bdb058ac23bc535b941fc2ed66a410932d74 (patch)
tree9cecfe783ed59bb4995c206967b5416c0ee689dc /Tests/ExportImport/Export
parent437043bb04da113bf822aa42d5cf3a3cc3366be1 (diff)
downloadCMake-e3b1bdb058ac23bc535b941fc2ed66a410932d74.zip
CMake-e3b1bdb058ac23bc535b941fc2ed66a410932d74.tar.gz
CMake-e3b1bdb058ac23bc535b941fc2ed66a410932d74.tar.bz2
ENH: Support exporting/importing of AppBundle targets.
- Imported bundles have the MACOSX_BUNDLE property set - Added cmTarget::IsAppBundleOnApple method to simplify checks - Document BUNDLE keyword in INSTALL command - Updated IMPORTED_LOCATION property documentation for bundles - Updated ExportImport test to test bundles
Diffstat (limited to 'Tests/ExportImport/Export')
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt8
-rw-r--r--Tests/ExportImport/Export/testExe3.c24
2 files changed, 30 insertions, 2 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index ac2f10f..24a3a56 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -21,14 +21,18 @@ add_library(testLib3 SHARED testLib3.c)
add_library(testLib4 SHARED testLib4.c)
set_property(TARGET testLib4 PROPERTY FRAMEWORK 1)
+add_executable(testExe3 testExe3.c)
+set_property(TARGET testExe3 PROPERTY MACOSX_BUNDLE 1)
+
# Install and export from install tree.
install(
- TARGETS testExe1 testLib1 testLib2 testExe2 testLib3 testLib4
+ TARGETS testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3
EXPORT exp
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
FRAMEWORK DESTINATION Frameworks
+ BUNDLE DESTINATION Applications
)
install(EXPORT exp NAMESPACE exp_ DESTINATION lib/exp)
@@ -37,7 +41,7 @@ export(TARGETS testExe1 testLib1 testLib2
NAMESPACE bld_
FILE ExportBuildTree.cmake
)
-export(TARGETS testExe2 testLib3 testLib4
+export(TARGETS testExe2 testLib3 testLib4 testExe3
NAMESPACE bld_
APPEND FILE ExportBuildTree.cmake
)
diff --git a/Tests/ExportImport/Export/testExe3.c b/Tests/ExportImport/Export/testExe3.c
new file mode 100644
index 0000000..895e2fc
--- /dev/null
+++ b/Tests/ExportImport/Export/testExe3.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+
+int main(int argc, const char* argv[])
+{
+ if(argc < 2)
+ {
+ fprintf(stderr, "Must specify output file.\n");
+ return 1;
+ }
+ {
+ FILE* f = fopen(argv[1], "w");
+ if(f)
+ {
+ fprintf(f, "int generated_by_testExe3() { return 0; }\n");
+ fclose(f);
+ }
+ else
+ {
+ fprintf(stderr, "Error writing to %s\n", argv[1]);
+ return 1;
+ }
+ }
+ return 0;
+}