Skip to content
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

[vcpkg] vcpkg_configure_meson not respecting VCPKG_C(XX)_FLAGS? #8271

Closed
Neumann-A opened this issue Sep 20, 2019 · 0 comments
Closed

[vcpkg] vcpkg_configure_meson not respecting VCPKG_C(XX)_FLAGS? #8271

Neumann-A opened this issue Sep 20, 2019 · 0 comments
Assignees
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Comments

@Neumann-A
Copy link
Contributor

Seems like vcpkg_configure_meson is not respecting VCPKG_C(XX)_FLAGS

if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic)
set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1")
set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1")
set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Z7")
set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Z7")
elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static)
set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1")
set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1")
set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Z7")
set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Z7")
endif()

set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_RELEASE_CFLAGS}")
set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_RELEASE_CXXFLAGS}")
set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_RELEASE_LDFLAGS}")
set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_RELEASE_CPPFLAGS}")
vcpkg_execute_required_process(

It should probably do exactly the same as vcpkg_configure_cmake which is simply loading a toolchain file and then set the flags accordingly. this way the flags are only ever set in one location. The same is probably true for vcpkg_configure_qmake where flags have to be passed via: QMAKE_CXXFLAGS+= etc.

@Neumann-A Neumann-A added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Sep 20, 2019
@Rastaban Rastaban assigned vicroms and unassigned Rastaban Sep 23, 2019
fungos added a commit to fungos/vcpkg that referenced this issue Nov 30, 2019
- Fixes microsoft#7412 by using gtk 3.24.10.

- Possibly fixes microsoft#6554, microsoft#7827, microsoft#8103 as now all the missing assets are
correctly copied into installed/<triplet>/share/ and should be deployed
with the final application.

This simplify the gtk port and correctly generate the missing files.

The source of the problem is with the underlying build system, as these
files were installed by the demo `icon-browser`, but the
gtk-update-icon-cache were executed by the main gtk project, failing if
the demo wasn't built or installed.

- This also fixes microsoft#7641 as now the meson build will correctly generate
the missing .pc files.

- This also fixes microsoft#9035, microsoft#7150 by fixing `vcpkg_configure_meson.cmake`
which fails on Linux/OSX because it indiscriminately try to pass msvc
cl arguments to the cmake c/xx flags. Although this works, it is not
the ideal fix. The correct fix would be to do as suggested in
issue microsoft#8271. Also see issue microsoft#8630.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

No branches or pull requests

4 participants
@vicroms @Rastaban @Neumann-A and others