diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Source/CPack/cmCPackConfigure.h.in | 1 | ||||
-rw-r--r-- | Source/CPack/cmCPackDragNDropGenerator.cxx | 7 |
3 files changed, 5 insertions, 4 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index ec581e8..0afdf4c 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1144,7 +1144,6 @@ if(APPLE) # If it does not work, build with reduced functionality and warn. check_include_file("CoreServices/CoreServices.h" HAVE_CoreServices) if(HAVE_CoreServices) - set_property(SOURCE CPack/cmCPackDragNDropGenerator.cxx PROPERTY COMPILE_DEFINITIONS HAVE_CoreServices) target_link_libraries(CPackLib PUBLIC "-framework CoreServices") else() message(WARNING "This compiler does not appear to support\n" 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, ®ion); 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); |