From bad33461a302ed8db02e0d9875e7b59b9e8f6032 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 7 Nov 2017 20:10:31 +0300 Subject: [PATCH] Fixed build for Windows 10 UWP --- src/libjasper/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libjasper/CMakeLists.txt b/src/libjasper/CMakeLists.txt index 234ae67..9d0a522 100644 --- a/src/libjasper/CMakeLists.txt +++ b/src/libjasper/CMakeLists.txt @@ -145,6 +145,15 @@ target_include_directories(libjasper BEFORE PRIVATE set_target_properties(libjasper PROPERTIES OUTPUT_NAME jasper) set_target_properties(libjasper PROPERTIES LINKER_LANGUAGE C) +if(MSVC) + target_compile_definitions(libjasper PRIVATE + "-D_CRT_SECURE_NO_WARNINGS") + target_compile_definitions(libjasper PRIVATE + "-D_CRT_SECURE_NO_DEPRECATE") + target_compile_definitions(libjasper PRIVATE + "-D_CRT_NONSTDC_NO_DEPRECATE") +endif() + if (UNIX) set_target_properties(libjasper PROPERTIES VERSION ${JAS_SO_NAME} SOVERSION ${JAS_SO_VERSION}) -- 2.14.1.windows.1