-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[glib] Use meson build system. #11477
Conversation
I'm using this PR to see if things build with all platforms. |
4be3ed6
to
bba81ce
Compare
How can I fix linux build ? It complains that meson is not installed by apt. |
arm64 fails because cross compilation is not enabled in meson so far... |
Meson needs to be installed on the Linux build host. CMake Error at scripts/cmake/vcpkg_find_acquire_program.cmake:367 (message):
Could not find meson. Please install it via your package manager:
sudo apt-get install meson |
I think we should fix meson cross compilation first. |
not latest version |
But how can I do that ? Is there a script that control what is installed on azure agents ? |
I changed include pathes, meson build added a glib-2.0/ prefix to very glib file but every packages in vcpkg expected glib includes to be in include/ |
By the way the osx64 build fails but it doesn't tell why ? |
https://cmake.org/cmake/help/latest/variable/CMAKE_HOST_UNIX.html
...
? |
ah man ..... and i was just doing that
|
ports/glib/CONTROL
Outdated
Homepage: https://developer.gnome.org/glib/ | ||
Description: Portable, general-purpose utility library. | ||
Build-Depends: zlib, pcre, libffi, gettext, libiconv | ||
Build-Depends: zlib, pcre, libffi, gettext, libiconv, tool-meson |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add dirent
to Build-Depends
, which removes the following error message in meson-log.txt
:
testfile.c(4): fatal error C1189: #error: "Header 'dirent.h' could not be found"
Has header "dirent.h" : NO
|
How about adding the following to if(CMAKE_HOST_WIN32)
set(MESON_COMMON_CFLAGS "${MESON_COMMON_CFLAGS} /I${CURRENT_INSTALLED_DIR}/include")
set(MESON_DEBUG_LDFLAGS "${MESON_DEBUG_LDFLAGS} /LIBPATH:${CURRENT_INSTALLED_DIR}/debug/lib")
set(MESON_RELEASE_LDFLAGS "${MESON_RELEASE_LDFLAGS} /LIBPATH:${CURRENT_INSTALLED_DIR}/lib")
endif() This will enable e.g. the following (see meson-log.txt): Has header "dirent.h" : YES
Library pcre found: YES |
Are these defines not done by vcpkg_configure_meson ? |
Not yet ... |
I reverted the include path to their original location. |
I found some explanation concerning |
I fixed most build error except for atkmm for now (it's a msbuild like ports so I need some time to figure out how to fix it) |
if do, then the whole GNOME, under MESON |
? |
@vlj He is saying to also switch the other ports to meson. But that is a different PR in my opinion |
@vlj Here is a workaround for diff --git a/ports/atkmm/CONTROL b/ports/atkmm/CONTROL
index caf3abb43..3ffe29ba2 100644
--- a/ports/atkmm/CONTROL
+++ b/ports/atkmm/CONTROL
@@ -1,5 +1,5 @@
Source: atkmm
-Version: 2.24.2-2
+Version: 2.24.2-3
Homepage: https://www.gtkmm.org
Description: atkmm is the official C++ interface for the ATK accessibility toolkit library. It may be used, for instance, by user interfaces implemented with gtkmm.
Build-Depends: glib, gettext, atk, glibmm
diff --git a/ports/atkmm/fix_properties.patch b/ports/atkmm/fix_properties.patch
index a03924386..d1a18da91 100644
--- a/ports/atkmm/fix_properties.patch
+++ b/ports/atkmm/fix_properties.patch
@@ -16,7 +16,7 @@ index 421f5c3..0275e6e 100644
<ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>.\atkmm;..\atk;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>.\atkmm;..\atk;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>.\atkmm;..\atk;.;$(CurrentInstalledDir)\include\glib-2.0;$(CurrentInstalledDir)\lib\glib-2.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>
diff --git a/ports/atkmm/portfile.cmake b/ports/atkmm/portfile.cmake
index f8e9df294..6d9fc541a 100644
--- a/ports/atkmm/portfile.cmake
+++ b/ports/atkmm/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_download_distfile(ARCHIVE
@@ -26,6 +24,10 @@ vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/atkmm.sln
TARGET atkmm
PLATFORM ${VS_PLATFORM}
+ OPTIONS
+ # Remark: This is a workaround for now. When updating atkmm to a newer version, meson should be used instead
+ # CurrentInstalledDir is used by fix_properties.patch for glib-2.0 include dirs
+ /p:CurrentInstalledDir=${CURRENT_INSTALLED_DIR}
USE_VCPKG_INTEGRATION
)
|
Sorry for the delay, I added you patch thanks ! |
I needed to fix glib gdbus-codegen because it hardcoded path to package. |
I fixed gtkmm. |
It seems like all dependent project are fixed (at least on windows). |
mind trying out #12945? |
What do you mean ? |
Could you please solve these regressions? |
Describe the pull request
What does your PR fix? Fixes [glib] Upgrade glib and use meson build system. #11476
Which triplets are supported/not supported? Have you updated the CI baseline?
Normally all previous triplets are supported (at least tested x64 and ported arm patches, hopefully mac works out of the box)
About the PR:
It ditches CMakeLists.txt (apparently some files like gfilemonitor were not even included by glib) and use meson instead. To preserve backward compatibility I added some targets.cmake files which are copied after installation, they allow others ports to maintain compatibility.
There is no more config.h.win32.in with meson but several .in files, I think that it's now responsible to handle arm64.