Only include WIN32 getopt where it is used.

getopt is only used in the benchmark tests, don't include it in the core
lib...
This commit is contained in:
Joakim Soderberg 2013-12-16 11:34:14 +01:00
parent c259d53c82
commit 9bbce0b63c

View File

@ -573,8 +573,6 @@ if(WIN32)
event_iocp.c
evthread_win32.c
win32select.c
WIN32-Code/getopt.c
WIN32-Code/getopt_long.c
)
list(APPEND HDR_PRIVATE WIN32-Code/getopt.h)
@ -651,7 +649,13 @@ endif()
if (NOT EVENT__DISABLE_BENCHMARK)
foreach (BENCHMARK bench bench_cascade bench_http bench_httpclient)
add_executable(${BENCHMARK} test/${BENCHMARK}.c)
set(BENCH_SRC test/${BENCHMARK}.c)
if (WIN32)
list(APPEND BENCH_SRC WIN32-Code/getopt.c WIN32-Code/getopt_long.c)
endif()
add_executable(${BENCHMARK} ${BENCH_SRC})
target_link_libraries(${BENCHMARK} event ${LIB_PLATFORM})
endforeach()
endif()