From 53d6ebb36079bd30c9033e4374fd8d31a2928b6a Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Fri, 1 Nov 2013 05:31:07 -0600 Subject: [PATCH] cpack: For DragNDrop generator, add sysroot option when calling Rez. --- Modules/CPack.cmake | 4 ++-- Source/CPack/cmCPackDragNDropGenerator.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index cd98f4975..2d641f5d6 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -519,9 +519,9 @@ cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") # WiX specific variables cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}") -# osx sysroot +# set sysroot so SDK tools can be used if(CMAKE_OSX_SYSROOT) - set(CPACK_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") + cpack_set_if_not_set(CPACK_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") endif() if(DEFINED CPACK_COMPONENTS_ALL) diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index ab386d3f3..dfb2f153e 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -505,7 +505,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, cmOStringStream embed_sla_command; embed_sla_command << this->GetOption("CPACK_COMMAND_REZ"); const char* sysroot = this->GetOption("CPACK_OSX_SYSROOT"); - if(sysroot) + if(sysroot && sysroot[0] != '\0') { embed_sla_command << " -isysroot \"" << sysroot << "\""; }