Xpl0itU / WiiUDownloader

Allows to download encrypted wiiu files from nintendo's official servers
GNU General Public License v3.0
804 stars 21 forks source link

MacOS build - fatal error: 'gtkmm.h' file not found #19

Closed RobertoD91 closed 1 year ago

RobertoD91 commented 1 year ago

MacOS 13.1 xcode-select version 2396. gtk installed with brew:

$ cmake ..
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Found MbedTLS: /usr/local/bin/../lib/libmbedtls.dylib;/usr/local/bin/../lib/libmbedcrypto.dylib;/usr/local/bin/../lib/libmbedx509.dylib  
-- Checking for module 'gtkmm-3.0'
--   No package 'gtkmm-3.0' found
nfd Platform: PLATFORM_MACOS
nfd Compiler: COMPILER_GNU
-- Performing Test NFD_USE_ALLOWEDCONTENTTYPES
-- Performing Test NFD_USE_ALLOWEDCONTENTTYPES - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Roberto/Desktop/git/WiiUDownloader/build
Roberto@BobBook:build$ cmake --build .
[  6%] Building C object nativefiledialog-extended/src/CMakeFiles/nfd.dir/nfd_cocoa.m.o
[ 12%] Linking C static library libnfd.a
[ 12%] Built target nfd
[ 18%] Building CXX object CMakeFiles/WiiUDownloader.dir/src/GameList.cpp.o
In file included from /Users/Roberto/Desktop/git/WiiUDownloader/src/GameList.cpp:1:
/Users/Roberto/Desktop/git/WiiUDownloader/include/GameList.h:3:10: fatal error: 'gtkmm.h' file not found
#include <gtkmm.h>
         ^~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/WiiUDownloader.dir/src/GameList.cpp.o] Error 1
make[1]: *** [CMakeFiles/WiiUDownloader.dir/all] Error 2
make: *** [all] Error 2

workaround: paste the output of pkg-config gtkmm-3.0 --cflags in export CXXFLAGS="(here)" before running cmake .., in my case there is:

export CXXFLAGS="-I/usr/local/Cellar/libffi/3.4.4/include -I/usr/local/Cellar/gtkmm3/3.24.7/include/gtkmm-3.0 -I/usr/local/Cellar/gtkmm3/3.24.7/lib/gtkmm-3.0/include -I/usr/local/Cellar/atkmm@2.28/2.28.3/include/atkmm-1.6 -I/usr/local/Cellar/atkmm@2.28/2.28.3/lib/atkmm-1.6/include -I/usr/local/Cellar/gtk+3/3.24.36/include/gtk-3.0/unix-print -I/usr/local/Cellar/gtkmm3/3.24.7/include/gdkmm-3.0 -I/usr/local/Cellar/gtkmm3/3.24.7/lib/gdkmm-3.0/include -I/usr/local/Cellar/glibmm@2.66/2.66.5/include/giomm-2.4 -I/usr/local/Cellar/glibmm@2.66/2.66.5/lib/giomm-2.4/include -I/usr/local/Cellar/gtk+3/3.24.36/include/gtk-3.0 -I/usr/local/Cellar/glib/2.74.4/include/gio-unix-2.0 -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/libepoxy/1.5.10/include -I/usr/local/Cellar/atk/2.38.0/include/atk-1.0 -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/pangomm@2.46/2.46.3/include/pangomm-1.4 -I/usr/local/Cellar/pangomm@2.46/2.46.3/lib/pangomm-1.4/include -I/usr/local/Cellar/glibmm@2.66/2.66.5/include/glibmm-2.4 -I/usr/local/Cellar/glibmm@2.66/2.66.5/lib/glibmm-2.4/include -I/usr/local/Cellar/cairomm@1.14/1.14.4/include/cairomm-1.0 -I/usr/local/Cellar/cairomm@1.14/1.14.4/lib/cairomm-1.0/include -I/usr/local/Cellar/libsigc++@2/2.10.8/include/sigc++-2.0 -I/usr/local/Cellar/libsigc++@2/2.10.8/lib/sigc++-2.0/include -I/usr/local/Cellar/pango/1.50.12/include/pango-1.0 -I/usr/local/Cellar/harfbuzz/6.0.0/include/harfbuzz -I/usr/local/Cellar/pango/1.50.12/include/pango-1.0 -I/usr/local/Cellar/fribidi/1.0.12/include/fribidi -I/usr/local/Cellar/harfbuzz/6.0.0/include/harfbuzz -I/usr/local/Cellar/graphite2/1.3.14/include -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/pixman/0.42.2/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.14.1/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/libxcb/1.15/include -I/usr/local/Cellar/libxrender/0.9.11/include -I/usr/local/Cellar/libxext/1.3.5/include -I/usr/local/Cellar/libx11/1.8.3/include -I/usr/local/Cellar/libxcb/1.15/include -I/usr/local/Cellar/libxau/1.0.11/include -I/usr/local/Cellar/libxdmcp/1.1.4/include -I/usr/local/Cellar/gdk-pixbuf/2.42.10/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/libpng/1.6.39/include/libpng16 -I/usr/local/Cellar/jpeg-turbo/2.1.4/include -I/usr/local/Cellar/libtiff/4.4.0_1/include -I/usr/local/Cellar/glib/2.74.4/include -I/usr/local/Cellar/glib/2.74.4/include/glib-2.0 -I/usr/local/Cellar/glib/2.74.4/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre2/10.42/include -I/usr/local/Cellar/xorgproto/2022.2/include"

PS: please write somewhere which version of gtk you are using :)

Xpl0itU commented 1 year ago

Take look at .github/workflows/macos.yml in the repo for reference on how to build on macOS