Skip to content

Commit

Permalink
try switching the mac CI to qt6; remove the cmake hardcoded deploy, u…
Browse files Browse the repository at this point in the history
…se macdeployqt instead
  • Loading branch information
ctrlaltca committed Mar 2, 2024
1 parent dcba7a1 commit 13012f8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 47 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.6.1
modules: qt5compat qtmultimedia

- name: Install other prerequisites
run: |
Expand All @@ -51,6 +54,11 @@ jobs:
cd build
cmake --install .
- name: Deployt Qt
run: |
cd '${{github.workspace}}\build'
macdeployqt "build/KVIrc.app"; if (!$?) { exit 1 }
- name: Detect version
shell: bash
run: |
Expand Down
32 changes: 4 additions & 28 deletions src/kvirc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ endif()

target_link_libraries(${KVIRC_BINARYNAME} ${KVILIB_BINARYNAME} ${LIBS} ${qt_kvirc_modules})

if(APPLE)
set_target_properties(${KVIRC_BINARYNAME} PROPERTIES MACOSX_BUNDLE TRUE)
endif()

if(MINGW)
# For some reason CMake doesn't do this itself...
# In case of MSVC, it does add /implib:kvirc.lib though
Expand Down Expand Up @@ -306,37 +310,9 @@ if(MSVC)
endif()

if(APPLE)
set(plugin_dest_dir ${CMAKE_INSTALL_PREFIX}/Contents/Plugins)
set(qtconf_dest_dir ${CMAKE_INSTALL_PREFIX}/Contents/Resources)
#fixme dirty hack
set(QT_PLUGINS_DIR "${Qt5Widgets_DIR}/../../../plugins")
set(QT_LIBRARY_DIR "${Qt5Widgets_DIR}/../../")
get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/.." ABSOLUTE)

# qt5: audio, iconengines, imageformats, mediaservice, platforms, sqldrivers
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
FILES_MATCHING
PATTERN "*.dSYM" EXCLUDE
PATTERN "*_debug.dylib" EXCLUDE
PATTERN "audio/*.dylib"
PATTERN "iconengines/*.dylib"
PATTERN "imageformats/*.dylib"
PATTERN "mediaservice/*.dylib"
PATTERN "platforms/*.dylib"
PATTERN "sqldrivers/*.dylib"
)

install(CODE "
file(WRITE \"${qtconf_dest_dir}/qt.conf\" \"[Paths]
Plugins = Plugins\")
" COMPONENT Runtime)

install(CODE "
file(GLOB_RECURSE QTPLUGINS
\"${plugin_dest_dir}/*.dylib\")
set(BU_CHMOD_BUNDLE_ITEMS ON)
include(BundleUtilities)
fixup_bundle(\"${CMAKE_INSTALL_PREFIX}\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR}\" IGNORE_ITEM \"Python;libqsqlodbc.dylib;libqsqlpsql.dylib\")
" COMPONENT Runtime)
endif()
7 changes: 1 addition & 6 deletions src/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,4 @@ endif()

if(COMPILE_ENCHANT_SUPPORT)
subdirs(spellchecker)
endif()

if(APPLE)
# This is a dirty trick ensure we get some code executed after the last module gets installed
subdirs(zzz_afterlastmodule)
endif()
endif()
13 changes: 0 additions & 13 deletions src/modules/zzz_afterlastmodule/CMakeLists.txt

This file was deleted.

0 comments on commit 13012f8

Please sign in to comment.