summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-08-21 04:28:22 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-22 13:24:49 (GMT)
commit98e8b1755b2b8b3d9ff781ca997e8af28dc1ca8d (patch)
tree8ee635f4ab43ea4a353af99d10950ab5a8ae621c /Source/CPack
parent7df955315b6de04333c3c23a1601e3af4911ed32 (diff)
downloadCMake-98e8b1755b2b8b3d9ff781ca997e8af28dc1ca8d.zip
CMake-98e8b1755b2b8b3d9ff781ca997e8af28dc1ca8d.tar.gz
CMake-98e8b1755b2b8b3d9ff781ca997e8af28dc1ca8d.tar.bz2
Build: Move `HAVE_CoreServices` to `cmCPackConfigure.h`
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackConfigure.h.in1
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx7
2 files changed, 5 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackConfigure.h.in b/Source/CPack/cmCPackConfigure.h.in
index a5e36d3..2c1302d 100644
--- a/Source/CPack/cmCPackConfigure.h.in
+++ b/Source/CPack/cmCPackConfigure.h.in
@@ -4,3 +4,4 @@
#cmakedefine01 ENABLE_BUILD_WIX_GENERATOR
#cmakedefine01 ENABLE_BUILD_FREEBSD_PKG
+#cmakedefine01 HAVE_CoreServices
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 0f7acfb..0579066 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -14,6 +14,7 @@
#include "cmsys/FStream.hxx"
#include "cmsys/RegularExpression.hxx"
+#include "cmCPackConfigure.h"
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
#include "cmDuration.h"
@@ -23,7 +24,7 @@
#include "cmValue.h"
#include "cmXMLWriter.h"
-#ifdef HAVE_CoreServices
+#if HAVE_CoreServices
// For the old LocaleStringToLangAndRegionCodes() function, to convert
// to the old Script Manager RegionCode values needed for the 'LPic' data
// structure used for generating multi-lingual SLAs.
@@ -590,7 +591,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
kCFStringEncodingMacRoman);
LangCode lang = 0;
RegionCode region = 0;
-#ifdef HAVE_CoreServices
+#if HAVE_CoreServices
OSStatus err =
LocaleStringToLangAndRegionCodes(iso_language_cstr, &lang, &region);
if (err != noErr)
@@ -601,7 +602,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
<< iso_language_cstr << std::endl);
return 0;
}
-#ifdef HAVE_CoreServices
+#if HAVE_CoreServices
header_data.push_back(region);
header_data.push_back(i);
header_data.push_back(0);