fix useless getopt.h check (#424)

* link fix when using lsquic in a cpp project

* Update CMakeLists.txt

* Fix getopt.h error when not needed

Co-authored-by: MBellahcene <moussa.bellahcene@4d.com>
This commit is contained in:
M-BELLAHCENE 2022-09-29 15:15:30 +02:00 committed by GitHub
parent 5c669eea50
commit 108c4e7629
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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()