]> granicus.if.org Git - multimarkdown/commitdiff
basic cpack configuration
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Mon, 15 Jun 2015 02:04:15 +0000 (22:04 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Mon, 15 Jun 2015 02:04:15 +0000 (22:04 -0400)
CMakeLists.txt

index b2c0d34fe916da6e562820b893f5af68821a0e47..96ff24549ab03b4fe58f54aeef3a7d467b7a1d76 100644 (file)
@@ -11,7 +11,7 @@ set (My_Project_Author "Somebody")
 set (My_Project_Revised_Date "2015-06-05")
 set (My_Project_Version_Major 1)
 set (My_Project_Version_Minor 0)
-set (My_Project_Version_Patch 0)
+set (My_Project_Version_Patch 1)
 
 set (My_Project_Version "${My_Project_Version_Major}.${My_Project_Version_Minor}.${My_Project_Version_Patch}")
 
@@ -54,6 +54,38 @@ configure_file (
 )
 
 
+# =======================
+# Configure for Target OS
+# =======================
+
+# OS X Machines
+if (APPLE)
+
+       # Configure backwards-compatible support (if your project allows it)
+       SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.4" CACHE STRING "Deployment target for OSX" FORCE)
+
+       # Compile for x86_64 and i386.  ppc no longer supported
+       if(CMAKE_BUILD_TYPE MATCHES "Release")
+               SET (CMAKE_OSX_ARCHITECTURES x86_64;i386)
+       endif(CMAKE_BUILD_TYPE MATCHES "Release")
+
+       # Use PackageMaker for installers?
+       # set (CPACK_GENERATOR PackageMaker)
+       set (CPACK_GENERATOR ZIP)
+
+
+endif (APPLE)
+
+# Windows Machines
+if (WIN32)
+
+       # Use NSIS to generate installers?
+       # set (CPACK_GENERATOR NSIS)
+       set (CPACK_GENERATOR ZIP)
+
+endif (WIN32)
+
+
 # =============
 # Build Targets
 # =============
@@ -149,4 +181,18 @@ endif()
 # Build Installer with CPack
 # ==========================
 
-# You're on your own here
+# You're largely on your own here
+
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/README.md ${PROJECT_SOURCE_DIR}/LICENSE.txt
+       DESTINATION .
+)
+
+set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${My_Project_Description}")
+set (CPACK_PACKAGE_VENDOR "${My_Project_Author}")
+set (CPACK_PACKAGE_VERSION "${My_Project_Version_Major}.${My_Project_Version_Minor}.${My_Project_Version_Patch}")
+set (CPACK_PACKAGE_VERSION_MAJOR "${My_Project_Version_Major}")
+set (CPACK_PACKAGE_VERSION_MINOR "${My_Project_Version_Minor}")
+set (CPACK_PACKAGE_VERSION_PATCH "My_Project_Version_Patch")
+       
+
+include (CPack)