From: Fletcher T. Penney Date: Tue, 3 Nov 2015 17:17:19 +0000 (-0500) Subject: reorganize OS specific configuration X-Git-Tag: 0.1.0a~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af29f5038309618914726ea1e5ba4eec885c0448;p=multimarkdown reorganize OS specific configuration --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e1797b..a6b1450 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,38 +54,6 @@ 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 # ============= @@ -183,6 +151,49 @@ if (DEFINED TEST) endif() +# ======================= +# 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) + +# Linux (but not cross-compiling for Windows) +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + + # Create zip archive + set (CPACK_GENERATOR ZIP) + + # Some libraries need to be linked on some Linux builds + if (DEFINED TEST) + # target_link_libraries(run_tests m) + endif (DEFINED TEST) + +endif (WIN32) + + # ========================== # Build Installer with CPack # ==========================