-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libjpeg-turbo] Disable GETENV/SETENV in UWP. See libjpeg-turbo/libjp…
- Loading branch information
1 parent
adb8edd
commit bae7c95
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Source: libjpeg-turbo | ||
Version: 1.5.3 | ||
Version: 1.5.3-1 | ||
Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bae7c95
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.
Please let people contribute to VCPKG, you're too quick :)
On the other hand I now have learnt that the distfile/patch trick, and the "direct-to-compiler" preprocessor definition !
bae7c95
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.
The
_CL_
trick is a bit unfortunate; I hope @dcommander adds cmake options for the two preprocessor defs :)bae7c95
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.
Ok ! I currently have a patch for the CMake file in my vcpkg working copy. I have to refine it a bit and submit another PR !
bae7c95
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.
I have no idea why it's necessary to set the
_CL_
environment variable here, or what that does. You should be able to simply calladd_definitions(-DNO_GETENV -DNO_PUTENV)
, and that will affect the whole project.bae7c95
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.
The script here is actually isolated from the underlying cmake build itself. This is unfortunately needed for compatibility because most libraries accidentally assume that they are the project root.
bae7c95
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.
OK, but bearing in mind that this is the first I've heard of vcpkg, does it eventually invoke CMake to perform the actual build? If so, then why can't it just manipulate
CMAKE_C_FLAGS
as I demonstrated in libjpeg-turbo/libjpeg-turbo#203? There is a lot more to a Windows Store-compliant build than simply settingNO_GETENV
andNO_PUTENV
. The rest of that process is, from an open source developer's point of view (hint: OSS developers don't always like using the Visual Studio IDE, as a general rule), a little esoteric. I need to understand how and why vcpkg is doing things like settingCMAKE_SYSTEM_NAME=WindowsStore
, since that affects other aspects of our build. Currently, if you setCMAKE_SYSTEM_NAME=WindowsStore
, it breaks CMake's CPU detection, and thus the libjpeg-turbo build cannot figure out which SIMD extensions (x86, x64) it should use. If I can nail down a less fragile way of handling all of this, I'd be happy to introduce a new CMake variable that serves as a one-stop shop for making libjpeg-turbo Windows Store-compatible (that could involve simply handlingCMAKE_SYSTEM_NAME=WindowsStore
, if we could figure out how to fix CPU detection), but also bear in mind that I'm not being paid for any of this work to support a proprietary operating system, so there is only a limited amount I can do.