diff options
author | marco.diiga <marco.diiga@gmail.com> | 2016-03-25 09:01:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-25 09:01:26 -0700 |
commit | cce49271124ff75c880dc0dfed1489f02c82890b (patch) | |
tree | 3d6d2b275d3a960dcb098f6e044d2ecd950aeea3 /cmake | |
parent | c1d0312b227328bee7240d1df4ceee55cf6e1858 (diff) |
[CMake fixes] Linux X11 pixel format and Windows compilation fix
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1835573002
Review URL: https://codereview.chromium.org/1835573002
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 5 | ||||
-rw-r--r-- | cmake/SkUserConfig.h.in | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index faeb2f8a75..8921254d15 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -292,6 +292,11 @@ if (CMAKE_BUILD_TYPE STREQUAL Release) else() set (SK_RELEASE 0) endif() +if (UNIX AND NOT APPLE) + set (SK_SAMPLES_FOR_X 1) +else() + set (SK_SAMPLES_FOR_X 0) +endif() configure_file ("SkUserConfig.h.in" "${userconfig_directory}/SkUserConfig.h") # skia_link_arguments.txt diff --git a/cmake/SkUserConfig.h.in b/cmake/SkUserConfig.h.in index 0649656e7f..99da2545c7 100644 --- a/cmake/SkUserConfig.h.in +++ b/cmake/SkUserConfig.h.in @@ -10,6 +10,15 @@ #undef SK_RELEASE #endif +/* Change the ordering to work in X windows. + */ +#if ${SK_SAMPLES_FOR_X} + #define SK_R32_SHIFT 16 + #define SK_G32_SHIFT 8 + #define SK_B32_SHIFT 0 + #define SK_A32_SHIFT 24 +#endif + #cmakedefine01 SK_MESA #endif |