Skip to content

Commit

Permalink
cmake: cleanup MSVC checks
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Feb 10, 2017
1 parent a347569 commit 28f9ce4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions 3rdparty/libtiff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ check_include_file(assert.h HAVE_ASSERT_H)
check_include_file(fcntl.h HAVE_FCNTL_H)
check_include_file(io.h HAVE_IO_H)
check_function_exists(jbg_newlen HAVE_JBG_NEWLEN)
check_function_exists(mmap HAVE_MMAP)
check_include_file(search.h HAVE_SEARCH_H)
check_include_file(string.h HAVE_STRING_H)
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(unistd.h HAVE_UNISTD_H)
if(NOT MSVC)
check_include_file(unistd.h HAVE_UNISTD_H)
check_function_exists(mmap HAVE_MMAP)
endif()

if(WIN32 AND NOT WINRT)
set(USE_WIN32_FILEIO 1)
Expand Down
4 changes: 3 additions & 1 deletion 3rdparty/zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ endif()
#
# Check for unistd.h
#
check_include_file(unistd.h Z_HAVE_UNISTD_H)
if(NOT MSVC)
check_include_file(unistd.h Z_HAVE_UNISTD_H)
endif()

if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
Expand Down

0 comments on commit 28f9ce4

Please sign in to comment.