Add macOS runtime bins. Try to link the GTK Mac integration lib
parent
a80d47a801
commit
c86f642413
|
@ -18,6 +18,7 @@ jobs:
|
|||
run: |
|
||||
brew install \
|
||||
gtkmm3 \
|
||||
gtk-mac-integration \
|
||||
ninja
|
||||
|
||||
# Workaround for now, we create our own features.h file (macos image either is missing this file, or some include folder is missing during the build)
|
||||
|
@ -38,8 +39,4 @@ jobs:
|
|||
with:
|
||||
name: macOS-dmg-package
|
||||
path: build_prod_macos/libreweb-browser-v*.dmg
|
||||
|
||||
#xcodebuild \
|
||||
# -project "libreweb-browser.xcodeproj" \
|
||||
# -scheme libreweb-browser \
|
||||
# -configuration Debug
|
||||
|
||||
|
|
|
@ -218,7 +218,8 @@ For more info, see also: [Windows readme file](windows.md).
|
|||
* Brew (`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"`)
|
||||
* CMake (brew: `cmake`)
|
||||
* Libcurl (brew: `curl`)
|
||||
* Gtk3/Gtkmm3 (brew: `gtkmm3`)
|
||||
* Gtk3/Gtkmm3 (brew: `gtkmm3`)
|
||||
* GTK Mac Integration (brew: `gtk-mac-integration`)
|
||||
* Ninja (brew: `ninja`)
|
||||
|
||||
#### MacOS Build
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -7,6 +7,15 @@ mkdir build_prod_macos
|
|||
cd build_prod_macos
|
||||
|
||||
cmake -G Ninja -DDOXYGEN:BOOL=FALSE -DCMAKE_BUILD_TYPE=Release ..
|
||||
# TODO:
|
||||
# cmake -G Xcode -DCODE_SIGN_IDENTITY="codesign ID..." -DDEVELOPMENT_TEAM_ID="team ID..."
|
||||
|
||||
|
||||
#TODO: xcodebuild \
|
||||
# -project "libreweb-browser.xcodeproj" \
|
||||
# -scheme libreweb-browser \
|
||||
# -configuration Release
|
||||
|
||||
ninja &&
|
||||
echo "INFO: Start Drag & Drop packaging for MacOS...";
|
||||
cpack -C Release -G DragNDrop
|
||||
|
|
|
@ -7,6 +7,10 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|||
find_package(Threads REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0)
|
||||
# Only for macOS
|
||||
if(APPLE)
|
||||
pkg_check_modules(MAC_INTEGRATION REQUIRED gtk-mac-integration-gtk3)
|
||||
endif()
|
||||
|
||||
# Generate Project version header file
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/project_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/project_config.h)
|
||||
|
@ -130,6 +134,17 @@ if(NOT UNITTEST)
|
|||
nlohmann_json::nlohmann_json
|
||||
)
|
||||
target_compile_options(${PROJECT_TARGET} PRIVATE ${GTKMM_CFLAGS_OTHER})
|
||||
if (APPLE)
|
||||
# Add GTK Mac Integration for macOS
|
||||
target_include_directories(${PROJECT_TARGET} PRIVATE ${MAC_INTEGRATION_INCLUDE_DIRS})
|
||||
target_link_libraries(${PROJECT_TARGET} PRIVATE ${MAC_INTEGRATION_LIBRARIES})
|
||||
target_compile_options(${PROJECT_TARGET} PRIVATE ${MAC_INTEGRATION_CFLAGS_OTHER})
|
||||
# Sign target for macOS
|
||||
set_target_properties(${PROJECT_TARGET} PROPERTIES
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${CODE_SIGN_IDENTITY}
|
||||
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${DEVELOPMENT_TEAM_ID}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Install browser binary
|
||||
install(TARGETS ${PROJECT_TARGET} RUNTIME DESTINATION bin)
|
||||
|
|
Loading…
Reference in New Issue