LSQUIC_TESTS=OFF, LSQUIC_BIN=OFF : Remove getopt.h error : Build will succeed. (#420)

* link fix when using lsquic in a cpp project

* Update CMakeLists.txt

Co-authored-by: MBellahcene <moussa.bellahcene@4d.com>
This commit is contained in:
M-BELLAHCENE 2022-09-20 16:36:21 +02:00 committed by GitHub
parent a4aac39013
commit d5602cd335
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -232,7 +232,7 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
ENDIF()
IF (CMAKE_SYSTEM_NAME STREQUAL Windows)
FIND_PATH(GETOPT_INCLUDE_DIR NAMES getopt.h)
FIND_PATH(GETOPT_INCLUDE_DIR NAMES getopt.h AND LSQUIC_TESTS AND LSQUIC_BIN)
IF (GETOPT_INCLUDE_DIR)
INCLUDE_DIRECTORIES(${GETOPT_INCLUDE_DIR})
ELSE()