Fix getopt.h error when not needed

This commit is contained in:
M-BELLAHCENE 2022-09-27 10:13:53 +02:00
parent f86548d7c9
commit 18d0993638

View file

@ -231,8 +231,8 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
link_directories( /usr/local/lib ) link_directories( /usr/local/lib )
ENDIF() ENDIF()
IF (CMAKE_SYSTEM_NAME STREQUAL Windows) IF (CMAKE_SYSTEM_NAME STREQUAL Windows AND LSQUIC_TESTS AND LSQUIC_BIN)
FIND_PATH(GETOPT_INCLUDE_DIR NAMES getopt.h AND LSQUIC_TESTS AND LSQUIC_BIN) FIND_PATH(GETOPT_INCLUDE_DIR NAMES getopt.h)
IF (GETOPT_INCLUDE_DIR) IF (GETOPT_INCLUDE_DIR)
INCLUDE_DIRECTORIES(${GETOPT_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${GETOPT_INCLUDE_DIR})
ELSE() ELSE()