[platform] migrating macOS launcher to CMake

GitOrigin-RevId: 9b0e84cedeba9c92e903c4038f1f9fdced338bcf
This commit is contained in:
Roman Shevchenko
2021-01-27 14:15:00 +01:00
committed by intellij-monorepo-bot
parent 5dd8534140
commit c972ebde6a
4 changed files with 17 additions and 268 deletions

2
native/MacLauncher/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/.idea/
/cmake-build-*/

View File

@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.1)
project(MacLauncher OBJC)
if (NOT APPLE)
message(FATAL_ERROR "macOS only.")
endif ()
set(CMAKE_C_STANDARD 11)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)
add_compile_options("-fno-objc-arc" "-flto=full" "-Wall" "-Wextra" "-Wpedantic")
add_executable(MacLauncher main.m Launcher.m VMOptionsReader.m PropertyFileReader.m utils.m)
target_link_libraries(MacLauncher "-framework Foundation" "-framework AppKit" "-framework Cocoa")

View File

@@ -1,7 +0,0 @@
//
// Prefix header for all source files of the 'Launcher' target in the 'Launcher' project
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif

View File

@@ -1,261 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1A5645DB6F789D018FF4A4AF /* PropertyFileReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A5645FEAD4A0FF166644D97 /* PropertyFileReader.m */; };
1A564BCFE66693BF0B2DD4A9 /* VMOptionsReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A564EDDE28564EF1AEBCD13 /* VMOptionsReader.m */; };
1A564C27F0BA05F900F34907 /* utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A564EEF77B93DBD7FD23161 /* utils.m */; };
50E17738155444B900E97451 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50E17737155444B900E97451 /* Cocoa.framework */; };
C0B58A123544A15DA59B13E4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C0B58A123544A15DA59B13DC /* main.m */; };
C0B58A123544A15DA59B13E5 /* Launcher.m in Sources */ = {isa = PBXBuildFile; fileRef = C0B58A123544A15DA59B13E0 /* Launcher.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
1A5645FEAD4A0FF166644D97 /* PropertyFileReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PropertyFileReader.m; sourceTree = "<group>"; };
1A564A1031F4C91C464C1B75 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = "<group>"; };
1A564D7CEEAA02F14A6D4F20 /* VMOptionsReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMOptionsReader.h; sourceTree = "<group>"; };
1A564EDDE28564EF1AEBCD13 /* VMOptionsReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VMOptionsReader.m; sourceTree = "<group>"; };
1A564EEF77B93DBD7FD23161 /* utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = utils.m; sourceTree = "<group>"; };
1A564F6D5833A0B9CE6E2839 /* PropertyFileReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PropertyFileReader.h; sourceTree = "<group>"; };
50E17735155444B900E97451 /* Launcher.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Launcher.app; sourceTree = BUILT_PRODUCTS_DIR; };
50E17737155444B900E97451 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
50E17745155444B900E97451 /* Launcher.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Launcher.pch; sourceTree = "<group>"; };
C0B58A123544A15DA59B13DC /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
C0B58A123544A15DA59B13DE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
C0B58A123544A15DA59B13E0 /* Launcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Launcher.m; sourceTree = "<group>"; };
C0B58A123544A15DA59B13E2 /* Launcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Launcher.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
50E17732155444B900E97451 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
50E17738155444B900E97451 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
C0B58A123544A15DA59B13CA = {
isa = PBXGroup;
children = (
C0B58A123544A15DA59B13DC /* main.m */,
C0B58A123544A15DA59B13E0 /* Launcher.m */,
C0B58A123544A15DA59B13E2 /* Launcher.h */,
50E17745155444B900E97451 /* Launcher.pch */,
C0B58A123544A15DA59B13CB /* Products */,
C0B58A123544A15DA59B13D6 /* Frameworks */,
1A5645FEAD4A0FF166644D97 /* PropertyFileReader.m */,
1A564F6D5833A0B9CE6E2839 /* PropertyFileReader.h */,
1A564EDDE28564EF1AEBCD13 /* VMOptionsReader.m */,
1A564D7CEEAA02F14A6D4F20 /* VMOptionsReader.h */,
1A564A1031F4C91C464C1B75 /* utils.h */,
1A564EEF77B93DBD7FD23161 /* utils.m */,
);
sourceTree = "<group>";
};
C0B58A123544A15DA59B13CB /* Products */ = {
isa = PBXGroup;
children = (
50E17735155444B900E97451 /* Launcher.app */,
);
name = Products;
sourceTree = "<group>";
};
C0B58A123544A15DA59B13D6 /* Frameworks */ = {
isa = PBXGroup;
children = (
C0B58A123544A15DA59B13DE /* Foundation.framework */,
50E17737155444B900E97451 /* Cocoa.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
50E17734155444B900E97451 /* Launcher */ = {
isa = PBXNativeTarget;
buildConfigurationList = 50E17751155444BA00E97451 /* Build configuration list for PBXNativeTarget "Launcher" */;
buildPhases = (
50E17731155444B900E97451 /* Sources */,
50E17732155444B900E97451 /* Frameworks */,
50E17733155444B900E97451 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Launcher;
productName = Launcher;
productReference = 50E17735155444B900E97451 /* Launcher.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
C0B58A123544A15DA59B13C8 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
};
buildConfigurationList = C0B58A123544A15DA59B13C9 /* Build configuration list for PBXProject "MacLauncher" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = C0B58A123544A15DA59B13CA;
productRefGroup = C0B58A123544A15DA59B13CB /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
50E17734155444B900E97451 /* Launcher */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
50E17733155444B900E97451 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
50E17731155444B900E97451 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C0B58A123544A15DA59B13E4 /* main.m in Sources */,
C0B58A123544A15DA59B13E5 /* Launcher.m in Sources */,
1A5645DB6F789D018FF4A4AF /* PropertyFileReader.m in Sources */,
1A564BCFE66693BF0B2DD4A9 /* VMOptionsReader.m in Sources */,
1A564C27F0BA05F900F34907 /* utils.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
50E1774F155444BA00E97451 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = NO;
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Launcher.pch;
GCC_VERSION = "";
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
};
name = Release;
};
50E17750155444BA00E97451 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = NO;
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Launcher.pch;
GCC_VERSION = "";
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
};
name = Debug;
};
C0B58A123544A15DA59B13CC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_LINK_OBJC_RUNTIME = NO;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
SDKROOT = macosx;
};
name = Release;
};
C0B58A123544A15DA59B13CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_LINK_OBJC_RUNTIME = NO;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
50E17751155444BA00E97451 /* Build configuration list for PBXNativeTarget "Launcher" */ = {
isa = XCConfigurationList;
buildConfigurations = (
50E1774F155444BA00E97451 /* Release */,
50E17750155444BA00E97451 /* Debug */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C0B58A123544A15DA59B13C9 /* Build configuration list for PBXProject "MacLauncher" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C0B58A123544A15DA59B13CC /* Release */,
C0B58A123544A15DA59B13CD /* Debug */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = C0B58A123544A15DA59B13C8 /* Project object */;
}