#To make a solution file to navigate the SERF source code from the Visual Studio GUI: #copy d:\work\prep\serf\0.7.0\patch\*.* d:\work\serf-0.7.0 #cmake -G "Visual Studio 9 2008" -DCMAKE_INSTALL_PREFIX=d:\work\local d:\work\serf-0.7.0 project (serf) cmake_minimum_required(VERSION 2.8) find_package (OpenSSL REQUIRED) find_package (ZLIB REQUIRED) find_path (APR_INCLUDE_DIR apr/apr.h) if (NOT APR_INCLUDE_DIR) MESSAGE (FATAL_ERROR "Could not find Apache Portable Runtime (APR)") else () MESSAGE (STATUS "Found Apache Portable Runtime in " ${APR_INCLUDE_DIR}/apr) endif (NOT APR_INCLUDE_DIR) find_library (APR_LIBRARY apr-1) find_library (APR_UTIL_LIBRARY aprutil-1) include_directories ( ${OPENSSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} ${APR_INCLUDE_DIR}/apr ${CMAKE_CURRENT_LIST_DIR} ) #Header files which form the public interface to the library. #They will be installed by "make install". set (PUBLIC_HEADER_FILES serf.h serf_bucket_types.h ) set (HEADER_FILES ${PUBLIC_HEADER_FILES} serf_bucket_util.h serf_private.h auth/auth.h auth/auth_kerb.h ) set (SOURCE_FILES context.c incoming.c outgoing.c auth/auth.c auth/auth_basic.c auth/auth_digest.c auth/auth_kerb.c auth/auth_kerb_gss.c auth/auth_kerb_sspi.c buckets/aggregate_buckets.c buckets/allocator.c buckets/barrier_buckets.c buckets/buckets.c buckets/bwtp_buckets.c buckets/chunk_buckets.c buckets/dechunk_buckets.c buckets/deflate_buckets.c buckets/file_buckets.c buckets/headers_buckets.c buckets/limit_buckets.c buckets/mmap_buckets.c buckets/request_buckets.c buckets/response_buckets.c buckets/simple_buckets.c buckets/socket_buckets.c buckets/ssl_buckets.c ) add_library (serf ${SOURCE_FILES} ${HEADER_FILES} ) target_link_libraries (serf ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${APR_LIBRARY} ${APR_UTIL_LIBRARY} ) install (TARGETS serf ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) install (FILES ${PUBLIC_HEADER_FILES} DESTINATION include)