[cmake-commits] king committed CMakeLists.txt 1.4 1.5 testExe3.c NONE 1.1

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jan 28 14:46:18 EST 2008


Update of /cvsroot/CMake/CMake/Tests/ExportImport/Export
In directory public:/mounts/ram/cvs-serv26285/Tests/ExportImport/Export

Modified Files:
	CMakeLists.txt 
Added Files:
	testExe3.c 
Log Message:
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


--- NEW FILE: testExe3.c ---
#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;
}

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/ExportImport/Export/CMakeLists.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CMakeLists.txt	28 Jan 2008 18:37:59 -0000	1.4
+++ CMakeLists.txt	28 Jan 2008 19:46:16 -0000	1.5
@@ -21,14 +21,18 @@
 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 @@
   NAMESPACE bld_
   FILE ExportBuildTree.cmake
   )
-export(TARGETS testExe2 testLib3 testLib4
+export(TARGETS testExe2 testLib3 testLib4 testExe3
   NAMESPACE bld_
   APPEND FILE ExportBuildTree.cmake
   )



More information about the Cmake-commits mailing list