Imported Upstream version 17.22.1
[platform/upstream/libzypp.git] / tests / lib / CMakeLists.txt
1 find_program( NGINX nginx )
2 find_library( LIBFCGI NAMES fcgi )
3 find_library( LIBFCGI++ NAMES fcgi++ )
4
5 if ( NOT NGINX )
6   message( FATAL_ERROR "nginx not found" )
7 else()
8   message ( "Using nginx binary at: ${NGINX}" )
9   ADD_DEFINITIONS( -DWEBSRV_BINARY="${NGINX}" )
10 endif()
11
12 if ( NOT LIBFCGI )
13   message( FATAL_ERROR "libfcgi not found" )
14 else()
15   message ( "Using libfcgi library at: ${LIBFCGI}" )
16 endif()
17
18 if ( NOT LIBFCGI++ )
19   message( FATAL_ERROR "libfcgi++ not found" )
20 else()
21   message ( "Using libfcgi++ library at: ${LIBFCGI++}" )
22 endif()
23
24 add_definitions( -DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
25
26 ADD_LIBRARY(zypp_test_utils
27  TestSetup.h
28  WebServer.h
29  WebServer.cc
30 )
31
32 TARGET_LINK_LIBRARIES( zypp_test_utils zypp-allsym ${LIBFCGI} ${LIBFCGI++} pthread )