CMake: Improve checks for GTK3 on macOS MacOS (at least with homebrew gtk3) does not have gdk/gdkx.h. Check if the X11 (or any) back-end is used when enabling XTest/UIActionSimulator and OpenGL.
Add CI job to test CMake GTK3 macOS
Move wxOSX chkconf.h and evtloopsrc.h files to base library They are always used, independent of the toolkit. Fixes #24583
Merge branch 'cmake-gtk3-macos' Add CI job to test building wxGTK on macOS. Closes #26104.
| ... | ... | @@ -79,6 +79,12 @@ jobs: |
| 79 | 79 | cmake_samples: ALL
|
| 80 | 80 | cmake_tests: OFF
|
| 81 | 81 | cmake_build_toolkit: osx_cocoa
|
| 82 | + - name: macOS latest wxGTK 3 Unix Makefiles
|
|
| 83 | + runner: macos-latest
|
|
| 84 | + cmake_generator: Unix Makefiles
|
|
| 85 | + cmake_samples: SOME
|
|
| 86 | + cmake_tests: OFF
|
|
| 87 | + cmake_build_toolkit: gtk3
|
|
| 82 | 88 | - name: macOS 14 wxIOS
|
| 83 | 89 | runner: macos-14
|
| 84 | 90 | cmake_generator: Xcode
|
| ... | ... | @@ -151,6 +157,14 @@ jobs: |
| 151 | 157 | update: true
|
| 152 | 158 | install: mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang
|
| 153 | 159 | |
| 160 | + - name: Set up Homebrew
|
|
| 161 | + if: ${{ runner.os == 'macOS' && matrix.cmake_build_toolkit == 'gtk3' }}
|
|
| 162 | + uses: Homebrew/actions/setup-homebrew@main
|
|
| 163 | + |
|
| 164 | + - name: Install Homebrew packages
|
|
| 165 | + if: ${{ runner.os == 'macOS' && matrix.cmake_build_toolkit == 'gtk3' }}
|
|
| 166 | + run: brew install pkgconf gtk+3
|
|
| 167 | + |
|
| 154 | 168 | - name: Install Qt
|
| 155 | 169 | if: matrix.cmake_build_toolkit == 'qt'
|
| 156 | 170 | uses: jurplel/install-qt-action@v4
|
| ... | ... | @@ -993,6 +993,9 @@ ALL_PORTS_BASE_HEADERS = \ |
| 993 | 993 | wx/msw/wrapcdlg.h \
|
| 994 | 994 | wx/msw/wrapwin.h \
|
| 995 | 995 | wx/msw/fswatcher.h \
|
| 996 | + wx/osx/chkconf.h \
|
|
| 997 | + wx/osx/cocoa/chkconf.h \
|
|
| 998 | + wx/osx/iphone/chkconf.h \
|
|
| 996 | 999 | wx/osx/core/cfdataref.h \
|
| 997 | 1000 | wx/osx/core/cfref.h \
|
| 998 | 1001 | wx/osx/core/cfstring.h \
|
| ... | ... | @@ -1019,6 +1022,7 @@ ALL_PORTS_BASE_HEADERS = \ |
| 1019 | 1022 | wx/unix/stackwalk.h \
|
| 1020 | 1023 | wx/unix/fswatcher_kqueue.h \
|
| 1021 | 1024 | wx/osx/fswatcher_fsevents.h \
|
| 1025 | + wx/osx/evtloopsrc.h \
|
|
| 1022 | 1026 | wx/fs_inet.h \
|
| 1023 | 1027 | wx/protocol/file.h \
|
| 1024 | 1028 | wx/protocol/ftp.h \
|
| ... | ... | @@ -2683,6 +2687,9 @@ COND_PLATFORM_WIN32_1_GTK_PLATFORM_HDR = \ |
| 2683 | 2687 | @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@AUI_PLATFORM_HDR = wx/aui/tabartgtk.h
|
| 2684 | 2688 | @COND_TOOLKIT_MSW@AUI_PLATFORM_HDR = wx/aui/tabartmsw.h wx/aui/barartmsw.h
|
| 2685 | 2689 | COND_PLATFORM_MACOSX_1_BASE_PLATFORM_HDR = \
|
| 2690 | + wx/osx/chkconf.h \
|
|
| 2691 | + wx/osx/cocoa/chkconf.h \
|
|
| 2692 | + wx/osx/iphone/chkconf.h \
|
|
| 2686 | 2693 | wx/osx/core/cfdataref.h \
|
| 2687 | 2694 | wx/osx/core/cfref.h \
|
| 2688 | 2695 | wx/osx/core/cfstring.h \
|
| ... | ... | @@ -2708,7 +2715,8 @@ COND_PLATFORM_MACOSX_1_BASE_PLATFORM_HDR = \ |
| 2708 | 2715 | wx/unix/pipe.h \
|
| 2709 | 2716 | wx/unix/stackwalk.h \
|
| 2710 | 2717 | wx/unix/fswatcher_kqueue.h \
|
| 2711 | - wx/osx/fswatcher_fsevents.h
|
|
| 2718 | + wx/osx/fswatcher_fsevents.h \
|
|
| 2719 | + wx/osx/evtloopsrc.h
|
|
| 2712 | 2720 | @COND_PLATFORM_MACOSX_1@BASE_PLATFORM_HDR = $(COND_PLATFORM_MACOSX_1_BASE_PLATFORM_HDR)
|
| 2713 | 2721 | COND_PLATFORM_UNIX_1_BASE_PLATFORM_HDR = \
|
| 2714 | 2722 | wx/unix/fswatcher_inotify.h \
|
| ... | ... | @@ -3257,7 +3265,6 @@ COND_TOOLKIT_OSX_COCOA_GUI_HDR = \ |
| 3257 | 3265 | wx/osx/button.h \
|
| 3258 | 3266 | wx/osx/checkbox.h \
|
| 3259 | 3267 | wx/osx/checklst.h \
|
| 3260 | - wx/osx/chkconf.h \
|
|
| 3261 | 3268 | wx/osx/choice.h \
|
| 3262 | 3269 | wx/osx/clipbrd.h \
|
| 3263 | 3270 | wx/osx/colordlg.h \
|
| ... | ... | @@ -3277,7 +3284,6 @@ COND_TOOLKIT_OSX_COCOA_GUI_HDR = \ |
| 3277 | 3284 | wx/osx/dirdlg.h \
|
| 3278 | 3285 | wx/osx/dnd.h \
|
| 3279 | 3286 | wx/osx/evtloop.h \
|
| 3280 | - wx/osx/evtloopsrc.h \
|
|
| 3281 | 3287 | wx/osx/filedlg.h \
|
| 3282 | 3288 | wx/osx/font.h \
|
| 3283 | 3289 | wx/osx/fontdlg.h \
|
| ... | ... | @@ -3336,7 +3342,6 @@ COND_TOOLKIT_OSX_COCOA_GUI_HDR = \ |
| 3336 | 3342 | wx/osx/appprogress.h \
|
| 3337 | 3343 | wx/generic/icon.h \
|
| 3338 | 3344 | wx/generic/imaglist.h \
|
| 3339 | - wx/osx/cocoa/chkconf.h \
|
|
| 3340 | 3345 | wx/osx/cocoa/evtloop.h \
|
| 3341 | 3346 | wx/osx/cocoa/private.h \
|
| 3342 | 3347 | wx/generic/region.h \
|
| ... | ... | @@ -3362,7 +3367,6 @@ COND_TOOLKIT_OSX_IPHONE_GUI_HDR = \ |
| 3362 | 3367 | wx/osx/button.h \
|
| 3363 | 3368 | wx/osx/checkbox.h \
|
| 3364 | 3369 | wx/osx/checklst.h \
|
| 3365 | - wx/osx/chkconf.h \
|
|
| 3366 | 3370 | wx/osx/choice.h \
|
| 3367 | 3371 | wx/osx/clipbrd.h \
|
| 3368 | 3372 | wx/osx/colordlg.h \
|
| ... | ... | @@ -3382,7 +3386,6 @@ COND_TOOLKIT_OSX_IPHONE_GUI_HDR = \ |
| 3382 | 3386 | wx/osx/dirdlg.h \
|
| 3383 | 3387 | wx/osx/dnd.h \
|
| 3384 | 3388 | wx/osx/evtloop.h \
|
| 3385 | - wx/osx/evtloopsrc.h \
|
|
| 3386 | 3389 | wx/osx/filedlg.h \
|
| 3387 | 3390 | wx/osx/font.h \
|
| 3388 | 3391 | wx/osx/fontdlg.h \
|
| ... | ... | @@ -3441,7 +3444,6 @@ COND_TOOLKIT_OSX_IPHONE_GUI_HDR = \ |
| 3441 | 3444 | wx/osx/appprogress.h \
|
| 3442 | 3445 | wx/generic/icon.h \
|
| 3443 | 3446 | wx/generic/imaglist.h \
|
| 3444 | - wx/osx/iphone/chkconf.h \
|
|
| 3445 | 3447 | wx/osx/iphone/private.h \
|
| 3446 | 3448 | wx/generic/region.h \
|
| 3447 | 3449 | wx/osx/sound.h
|
| ... | ... | @@ -202,9 +202,13 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! |
| 202 | 202 | src/osx/core/mimetype.cpp
|
| 203 | 203 | </set>
|
| 204 | 204 | <set var="BASE_OSX_HDR" hints="files">
|
| 205 | + wx/osx/chkconf.h
|
|
| 206 | + wx/osx/cocoa/chkconf.h
|
|
| 207 | + wx/osx/iphone/chkconf.h
|
|
| 205 | 208 | $(BASE_COREFOUNDATION_HDR)
|
| 206 | 209 | $(BASE_UNIX_AND_DARWIN_HDR)
|
| 207 | 210 | wx/osx/fswatcher_fsevents.h
|
| 211 | + wx/osx/evtloopsrc.h
|
|
| 208 | 212 | </set>
|
| 209 | 213 | <!-- Base and GUI files used by OS X -->
|
| 210 | 214 | |
| ... | ... | @@ -2178,7 +2182,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! |
| 2178 | 2182 | wx/osx/button.h
|
| 2179 | 2183 | wx/osx/checkbox.h
|
| 2180 | 2184 | wx/osx/checklst.h
|
| 2181 | - wx/osx/chkconf.h
|
|
| 2182 | 2185 | wx/osx/choice.h
|
| 2183 | 2186 | wx/osx/clipbrd.h
|
| 2184 | 2187 | wx/osx/colordlg.h
|
| ... | ... | @@ -2198,7 +2201,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! |
| 2198 | 2201 | wx/osx/dirdlg.h
|
| 2199 | 2202 | wx/osx/dnd.h
|
| 2200 | 2203 | wx/osx/evtloop.h
|
| 2201 | - wx/osx/evtloopsrc.h
|
|
| 2202 | 2204 | wx/osx/filedlg.h
|
| 2203 | 2205 | wx/osx/font.h
|
| 2204 | 2206 | wx/osx/fontdlg.h
|
| ... | ... | @@ -2324,7 +2326,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! |
| 2324 | 2326 | src/osx/cocoa/power.mm
|
| 2325 | 2327 | </set>
|
| 2326 | 2328 | <set var="OSX_COCOA_HDR" hints="files">
|
| 2327 | - wx/osx/cocoa/chkconf.h
|
|
| 2328 | 2329 | wx/osx/cocoa/evtloop.h
|
| 2329 | 2330 | wx/osx/cocoa/private.h
|
| 2330 | 2331 | wx/generic/region.h
|
| ... | ... | @@ -2377,7 +2378,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! |
| 2377 | 2378 | </set>
|
| 2378 | 2379 | |
| 2379 | 2380 | <set var="OSX_IPHONE_HDR" hints="files">
|
| 2380 | - wx/osx/iphone/chkconf.h
|
|
| 2381 | 2381 | wx/osx/iphone/private.h
|
| 2382 | 2382 | wx/generic/region.h
|
| 2383 | 2383 | wx/osx/sound.h
|
| ... | ... | @@ -138,9 +138,13 @@ set(BASE_OSX_SRC |
| 138 | 138 | )
|
| 139 | 139 | |
| 140 | 140 | set(BASE_OSX_HDR
|
| 141 | - wx/osx/fswatcher_fsevents.h
|
|
| 141 | + wx/osx/chkconf.h
|
|
| 142 | + wx/osx/cocoa/chkconf.h
|
|
| 143 | + wx/osx/iphone/chkconf.h
|
|
| 142 | 144 | ${BASE_COREFOUNDATION_HDR}
|
| 143 | 145 | ${BASE_UNIX_AND_DARWIN_HDR}
|
| 146 | + wx/osx/fswatcher_fsevents.h
|
|
| 147 | + wx/osx/evtloopsrc.h
|
|
| 144 | 148 | )
|
| 145 | 149 | |
| 146 | 150 | set(BASE_AND_GUI_OSX_COCOA_SRC
|
| ... | ... | @@ -2044,7 +2048,6 @@ set(OSX_SHARED_HDR |
| 2044 | 2048 | wx/osx/button.h
|
| 2045 | 2049 | wx/osx/checkbox.h
|
| 2046 | 2050 | wx/osx/checklst.h
|
| 2047 | - wx/osx/chkconf.h
|
|
| 2048 | 2051 | wx/osx/choice.h
|
| 2049 | 2052 | wx/osx/clipbrd.h
|
| 2050 | 2053 | wx/osx/colordlg.h
|
| ... | ... | @@ -2064,7 +2067,6 @@ set(OSX_SHARED_HDR |
| 2064 | 2067 | wx/osx/dirdlg.h
|
| 2065 | 2068 | wx/osx/dnd.h
|
| 2066 | 2069 | wx/osx/evtloop.h
|
| 2067 | - wx/osx/evtloopsrc.h
|
|
| 2068 | 2070 | wx/osx/filedlg.h
|
| 2069 | 2071 | wx/osx/font.h
|
| 2070 | 2072 | wx/osx/fontdlg.h
|
| ... | ... | @@ -2187,7 +2189,6 @@ set(OSX_COCOA_SRC |
| 2187 | 2189 | )
|
| 2188 | 2190 | |
| 2189 | 2191 | set(OSX_COCOA_HDR
|
| 2190 | - wx/osx/cocoa/chkconf.h
|
|
| 2191 | 2192 | wx/osx/cocoa/evtloop.h
|
| 2192 | 2193 | wx/osx/cocoa/private.h
|
| 2193 | 2194 | wx/generic/region.h
|
| ... | ... | @@ -2236,7 +2237,6 @@ set(OSX_IPHONE_SRC |
| 2236 | 2237 | )
|
| 2237 | 2238 | |
| 2238 | 2239 | set(OSX_IPHONE_HDR
|
| 2239 | - wx/osx/iphone/chkconf.h
|
|
| 2240 | 2240 | wx/osx/iphone/private.h
|
| 2241 | 2241 | wx/generic/region.h
|
| 2242 | 2242 | wx/osx/sound.h
|
| ... | ... | @@ -544,9 +544,12 @@ if(wxUSE_GUI) |
| 544 | 544 | list(APPEND OPENGL_LIBRARIES ${WAYLANDEGL_LIBRARIES})
|
| 545 | 545 | endif()
|
| 546 | 546 | endif()
|
| 547 | + if(WXGTK3 AND APPLE AND (NOT wxHAVE_GDK_X11 OR NOT wxHAVE_GDK_WAYLAND))
|
|
| 548 | + set(OPENGL_FOUND OFF)
|
|
| 549 | + endif()
|
|
| 547 | 550 | endif()
|
| 548 | 551 | if(NOT OPENGL_FOUND)
|
| 549 | - message(WARNING "opengl not found, wxGLCanvas won't be available")
|
|
| 552 | + message(WARNING "OpenGL not found, wxGLCanvas won't be available")
|
|
| 550 | 553 | wx_option_force_value(wxUSE_OPENGL OFF)
|
| 551 | 554 | endif()
|
| 552 | 555 | if(UNIX AND (NOT WXGTK3 OR NOT OpenGL_EGL_FOUND))
|
| ... | ... | @@ -709,7 +712,7 @@ if(wxUSE_GUI) |
| 709 | 712 | endif()
|
| 710 | 713 | |
| 711 | 714 | if(wxUSE_UIACTIONSIMULATOR AND UNIX AND WXGTK)
|
| 712 | - if(wxUSE_XTEST)
|
|
| 715 | + if(wxHAVE_GDK_X11 AND wxUSE_XTEST)
|
|
| 713 | 716 | find_package(XTEST)
|
| 714 | 717 | if(XTEST_FOUND)
|
| 715 | 718 | list(APPEND wxTOOLKIT_INCLUDE_DIRS ${XTEST_INCLUDE_DIRS})
|
| ... | ... | @@ -161,9 +161,13 @@ BASE_OSX_SRC = |
| 161 | 161 | src/osx/fswatcher_fsevents.cpp
|
| 162 | 162 | |
| 163 | 163 | BASE_OSX_HDR =
|
| 164 | + wx/osx/chkconf.h
|
|
| 165 | + wx/osx/cocoa/chkconf.h
|
|
| 166 | + wx/osx/iphone/chkconf.h
|
|
| 164 | 167 | $(BASE_UNIX_AND_DARWIN_HDR)
|
| 165 | 168 | $(BASE_COREFOUNDATION_HDR)
|
| 166 | 169 | wx/osx/fswatcher_fsevents.h
|
| 170 | + wx/osx/evtloopsrc.h
|
|
| 167 | 171 | |
| 168 | 172 | # Base and GUI files used by OS X
|
| 169 | 173 | BASE_AND_GUI_OSX_COCOA_SRC =
|
| ... | ... | @@ -2043,7 +2047,6 @@ OSX_SHARED_HDR = |
| 2043 | 2047 | wx/osx/button.h
|
| 2044 | 2048 | wx/osx/checkbox.h
|
| 2045 | 2049 | wx/osx/checklst.h
|
| 2046 | - wx/osx/chkconf.h
|
|
| 2047 | 2050 | wx/osx/choice.h
|
| 2048 | 2051 | wx/osx/clipbrd.h
|
| 2049 | 2052 | wx/osx/colordlg.h
|
| ... | ... | @@ -2063,7 +2066,6 @@ OSX_SHARED_HDR = |
| 2063 | 2066 | wx/osx/dirdlg.h
|
| 2064 | 2067 | wx/osx/dnd.h
|
| 2065 | 2068 | wx/osx/evtloop.h
|
| 2066 | - wx/osx/evtloopsrc.h
|
|
| 2067 | 2069 | wx/osx/filedlg.h
|
| 2068 | 2070 | wx/osx/font.h
|
| 2069 | 2071 | wx/osx/fontdlg.h
|
| ... | ... | @@ -2187,7 +2189,6 @@ OSX_COCOA_SRC = |
| 2187 | 2189 | OSX_COCOA_HDR =
|
| 2188 | 2190 | wx/generic/region.h
|
| 2189 | 2191 | wx/osx/activityindicator.h
|
| 2190 | - wx/osx/cocoa/chkconf.h
|
|
| 2191 | 2192 | wx/osx/cocoa/dataview.h
|
| 2192 | 2193 | wx/osx/cocoa/evtloop.h
|
| 2193 | 2194 | wx/osx/cocoa/private.h
|
| ... | ... | @@ -2235,7 +2236,6 @@ OSX_IPHONE_SRC = |
| 2235 | 2236 | |
| 2236 | 2237 | OSX_IPHONE_HDR =
|
| 2237 | 2238 | wx/generic/region.h
|
| 2238 | - wx/osx/iphone/chkconf.h
|
|
| 2239 | 2239 | wx/osx/iphone/private.h
|
| 2240 | 2240 | wx/osx/sound.h
|
| 2241 | 2241 |
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help