-
Notifications
You must be signed in to change notification settings - Fork 82
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
MinGW fixes #230
MinGW fixes #230
Conversation
- CMake 3.4 is the bare minimum recommended, 3.1 enables pkg-config to search in CMAKE_PREFIX_PATH. - TOOLCHAIN_DEPS_DIR should be a cache variable since it's provided by the commandline. - Set the CMAKE_PREFIX_PATH instead of PKG_CONFIG_PATH.
This allows building on Windows through Msys.
Another Windows-related issue (which applies to Msys2): The workaround for this is to use a response file which contains all the object filenames, and pass it to Fixes #127 |
CI issue could be checked by @Princess-of-Sleeping @FtZPetruska hm... changed cmake version may make a trouble. can you cross check it? |
CI issue seems to come from: - uses: actions/checkout@v3 Since - uses: actions/checkout@v3
with:
submodules: true Checking previous CI runs, it seems that it also was an issue on older CMake versions, but not treated as an error for compatibility:
|
Can you also update workflow with this PR? |
Made the change in 51a2142 |
@d3m3vilurr I think good for now. |
When working on updating the buildscript to work again on MinGW, I noticed the following issues:
TOOLCHAIN_DEPS_DIR
, pkg-config is not able to find any .pc file.strndup
is simply not available.I addressed the dependency issues the following way:
pkg_check_modules
to search in prefixes specified inCMAKE_PREFIX_PATH
.TOOLCHAIN_DEPS_DIR
a cache entry. When it is passed through the command-line or via ExternalProject'sCMAKE_ARGS
, it is set as a cache entry already. Making it a cache entry when not provided avoids weird CMake shadowing issues.CMAKE_PREFIX_PATH
instead ofPKG_CONFIG_PATH
. This has the advantage of letting CMake use the correct lib paths for the current system (e.g. when a system useslib64
instead oflib
).For
strndup
, I added a wrapper functiondupstring
that either forwards the callstrndup
, or use a fallback implementation. The check for whetherstrndup
is available or not is made in CMake, and passed to the wrapper source file only.