View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015816CMakeCPackpublic2015-10-28 07:172016-03-07 09:12
ReporterNicolas François 
Assigned ToBrad King 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformAppleOSMac OS XOS Version10.11.1
Product VersionCMake 3.3.2 
Target VersionCMake 3.5Fixed in VersionCMake 3.5 
Summary0015816: When setting CMAKE_OSX_SYSROOT to macosx, CPack fails
DescriptionOn 10.11.1 and building against deployment target 10.9, the CMAKE_OSX_DEPLOYMENT_TARGET must be set to 10.9 and so CMAKE_OSX_SYSROOT to avoid the warning message from CMake.
Setting CMAKE_OSX_SYSROOT to macosx allows to select the latest SDK.
The compilation works and everything is fine.

But CPack fails because of the CPACK_OSX_SYSROOT variable set to CMAKE_OSX_SYSROOT, hence macosx; instead of being set to _CMAKE_OSX_SYSROOT_PATH which is the transformed variable in Darwin-Initialize.cmake.
Additional InformationStill in 3.4.0-rc2
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0039693)
Brad King (manager)
2015-10-28 08:24

Please try this patch:

diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 5756001..77f854d 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -586,7 +586,7 @@ _cpack_set_default(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}")
 
 # set sysroot so SDK tools can be used
 if(CMAKE_OSX_SYSROOT)
- _cpack_set_default(CPACK_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
+ _cpack_set_default(CPACK_OSX_SYSROOT "${_CMAKE_OSX_SYSROOT_PATH}")
 endif()
 
 if(DEFINED CPACK_COMPONENTS_ALL)
(0039695)
Nicolas François (reporter)
2015-10-28 10:10

This solved the problem, thank you.
(0039696)
Brad King (manager)
2015-10-28 10:17

Thanks for testing. Applied:

 CPack: Fix CPACK_OSX_SYSROOT with symbolic CMAKE_OSX_SYSROOT
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63e2af0f [^]
(0040629)
Robert Maynard (manager)
2016-03-07 09:12

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-10-28 07:17 Nicolas François New Issue
2015-10-28 08:24 Brad King Note Added: 0039693
2015-10-28 10:10 Nicolas François Note Added: 0039695
2015-10-28 10:17 Brad King Note Added: 0039696
2015-10-28 10:17 Brad King Assigned To => Brad King
2015-10-28 10:17 Brad King Status new => resolved
2015-10-28 10:17 Brad King Resolution open => fixed
2015-10-28 10:17 Brad King Fixed in Version => CMake 3.5
2015-10-28 10:17 Brad King Target Version => CMake 3.5
2016-03-07 09:12 Robert Maynard Note Added: 0040629
2016-03-07 09:12 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team