Skip to content

Commit 156d736

Browse files
committed
Merge pull request opencv#8176 from alalek:cmake_cleanup_msvc_checks
2 parents b794582 + 28f9ce4 commit 156d736

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

3rdparty/libtiff/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ check_include_file(assert.h HAVE_ASSERT_H)
1111
check_include_file(fcntl.h HAVE_FCNTL_H)
1212
check_include_file(io.h HAVE_IO_H)
1313
check_function_exists(jbg_newlen HAVE_JBG_NEWLEN)
14-
check_function_exists(mmap HAVE_MMAP)
1514
check_include_file(search.h HAVE_SEARCH_H)
1615
check_include_file(string.h HAVE_STRING_H)
1716
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
18-
check_include_file(unistd.h HAVE_UNISTD_H)
17+
if(NOT MSVC)
18+
check_include_file(unistd.h HAVE_UNISTD_H)
19+
check_function_exists(mmap HAVE_MMAP)
20+
endif()
1921

2022
if(WIN32 AND NOT WINRT)
2123
set(USE_WIN32_FILEIO 1)

3rdparty/zlib/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ endif()
2121
#
2222
# Check for unistd.h
2323
#
24-
check_include_file(unistd.h Z_HAVE_UNISTD_H)
24+
if(NOT MSVC)
25+
check_include_file(unistd.h Z_HAVE_UNISTD_H)
26+
endif()
2527

2628
if(MSVC)
2729
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)

0 commit comments

Comments
 (0)