Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,18 @@ check_include_file(stdint.h HAVE_STDINT_H )
check_include_file(stdlib.h HAVE_STDLIB_H )
check_include_file(strings.h HAVE_STRINGS_H )
check_include_file(string.h HAVE_STRING_H )
check_include_file(getopt.h HAVE_GETOPT_H )
check_include_file(sys/time.h HAVE_SYS_TIME_H)
if(WITH_TOOLS)
if(MSVC)
find_path(GETOPT_INCLUDE_DIR getopt.h PATH_SUFFIXES include)
find_library(GETOPT_LIBRARIES wingetopt PATH_SUFFIXES lib)
include_directories(${GETOPT_INCLUDE_DIR})
else()
check_include_file(getopt.h HAVE_GETOPT_H)
endif()
endif()
if(WITH_TESTS)
check_include_file(sys/time.h HAVE_SYS_TIME_H)
endif()

check_function_exists(strdup HAVE_STRDUP)

Expand Down Expand Up @@ -70,12 +80,6 @@ if(MSVC)
add_definitions(-Dstrncasecmp=_strnicmp)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)

if(WITH_TOOLS)
find_path(GETOPT_INCLUDE_DIR getopt.h PATH_SUFFIXES include)
find_library(GETOPT_LIBRARIES wingetopt PATH_SUFFIXES lib)
include_directories(${GETOPT_INCLUDE_DIR})
endif(WITH_TOOLS)
endif(MSVC)

set(QRENCODE_SRCS qrencode.c
Expand Down