diff options
author | evpobr <evpobr@users.noreply.github.com> | 2017-06-08 18:59:14 +0500 |
---|---|---|
committer | evpobr <evpobr@users.noreply.github.com> | 2017-06-08 19:00:37 +0500 |
commit | 5ebd3d5276ad86e36fddcb95217f6dbf62746633 (patch) | |
tree | aef27607620f6e7e7754018cf3fe52a0e503b09a /CMakeLists.txt | |
parent | 4891ee729d5bd98fbe8ff82b89e9758f00d18815 (diff) |
Fix WinRT configuring
Don't rely on _WIN32_WINNT value to enable WinRT support.
if _WIN32_WINNT is not set manually, it is defaulted to SDK version. So
if you use SDK > 8 you cannot use TagLib under Win7 and lower because of
CreateFile2 function dependency.
PLATFORM_WINRT option (OFF by default) was introduced to enable WinRT
build.
Related issues: https://github.com/Microsoft/vcpkg/issues/1240
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bbd7d7cc..3e081ea2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,11 @@ option(BUILD_BINDINGS "Build the bindings" ON) option(NO_ITUNES_HACKS "Disable workarounds for iTunes bugs" OFF) +option(PLATFORM_WINRT "Enable WinRT support" OFF) +if(PLATFORM_WINRT) + add_definitions(-DPLATFORM_WINRT) +endif() + add_definitions(-DHAVE_CONFIG_H) set(TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/") |