Skip to content

Commit 108c4e7

Browse files
fix useless getopt.h check (litespeedtech#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>
1 parent 5c669ee commit 108c4e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
231231
link_directories( /usr/local/lib )
232232
ENDIF()
233233

234-
IF (CMAKE_SYSTEM_NAME STREQUAL Windows)
235-
FIND_PATH(GETOPT_INCLUDE_DIR NAMES getopt.h AND LSQUIC_TESTS AND LSQUIC_BIN)
234+
IF (CMAKE_SYSTEM_NAME STREQUAL Windows AND LSQUIC_TESTS AND LSQUIC_BIN)
235+
FIND_PATH(GETOPT_INCLUDE_DIR NAMES getopt.h)
236236
IF (GETOPT_INCLUDE_DIR)
237237
INCLUDE_DIRECTORIES(${GETOPT_INCLUDE_DIR})
238238
ELSE()

0 commit comments

Comments
 (0)