mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
IDEA-283733 [build scripts] fix scripts for MacScreenMenu build, ensure modern CMake is used for that
GitOrigin-RevId: e19c6013a4c5945788192a679815058188a4fbb4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ad56f683f2
commit
2c72a7db71
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.21)
|
||||
project(MacScreenMenu OBJC)
|
||||
|
||||
if(NOT APPLE)
|
||||
@@ -18,8 +18,8 @@ endif ()
|
||||
include_directories(${JAVA_HOME}/include ${JAVA_HOME}/include/darwin)
|
||||
|
||||
add_compile_options("-fmodules" "-flto=full" "-Wall" "-Wextra" "-Wpedantic" "-Wno-newline-eof" "-Wno-unused-parameter")
|
||||
add_library(${MY_LIB_NAME} SHARED
|
||||
add_library(macscreenmenu64 SHARED
|
||||
src/MenuItem.h src/MenuItem.m src/Menu.m
|
||||
src/CustomMenuItemView.h src/CustomMenuItemView.m src/Menu.h)
|
||||
|
||||
install(FILES $<TARGET_FILE:${MY_LIB_NAME}> DESTINATION ${CMAKE_CURRENT_LIST_DIR}/../../bin/mac)
|
||||
install(FILES $<TARGET_FILE:macscreenmenu64> DESTINATION ${CMAKE_CURRENT_LIST_DIR}/../../bin/mac)
|
||||
|
||||
@@ -1,23 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
MY_LIB_NAME=macscreenmenu64
|
||||
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build || exit 1
|
||||
|
||||
# -G "Unix Makefiles" does not build a universal binary
|
||||
cmake -DMY_LIB_NAME=${MY_LIB_NAME} -G "Xcode" .. || exit 2
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .. || exit 2
|
||||
|
||||
make VERBOSE=1 || exit 3
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
MY_TARGET="install"
|
||||
MY_STRIP="YES"
|
||||
else
|
||||
MY_TARGET=${MY_LIB_NAME}
|
||||
MY_STRIP="NO"
|
||||
make install/strip VERBOSE=1 || exit 4
|
||||
fi
|
||||
|
||||
STRIP_INSTALLED_PRODUCT = YES
|
||||
STRIP_STYLE = non-global
|
||||
|
||||
xcodebuild -target ${MY_TARGET} -configuration Release STRIP_INSTALLED_PRODUCT=${MY_STRIP} STRIP_STYLE=non-global || exit 3
|
||||
|
||||
Reference in New Issue
Block a user