2009-02-15 15:49:19 +00:00
|
|
|
set(LIBNAME "PocoNet")
|
2012-01-08 19:10:15 +00:00
|
|
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
2009-02-15 15:49:19 +00:00
|
|
|
|
2009-02-19 20:35:03 +00:00
|
|
|
aux_source_directory(src BASE_SRCS)
|
2009-02-15 15:49:19 +00:00
|
|
|
|
|
|
|
set( WIN_SRCS
|
|
|
|
)
|
|
|
|
|
|
|
|
set( LIN_SRCS
|
|
|
|
)
|
|
|
|
|
|
|
|
if(CMAKE_SYSTEM MATCHES "Windows")
|
|
|
|
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
2009-02-22 19:58:27 +00:00
|
|
|
set(SYSLIBS ${SYSLIBS} ws2_32)
|
2009-02-15 15:49:19 +00:00
|
|
|
else (CMAKE_SYSTEM MATCHES "Windows")
|
|
|
|
set(SRCS ${BASE_SRCS} ${LIN_SRCS})
|
2012-02-04 21:15:22 +00:00
|
|
|
add_definitions(-DPOCO_HAVE_FD_POLL)
|
2009-02-15 15:49:19 +00:00
|
|
|
endif(CMAKE_SYSTEM MATCHES "Windows")
|
|
|
|
|
|
|
|
if (NOT POCO_STATIC)
|
|
|
|
add_definitions(-DNet_EXPORTS)
|
|
|
|
endif (NOT POCO_STATIC)
|
|
|
|
|
|
|
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|
|
|
set_target_properties( ${LIBNAME}
|
2012-01-07 13:45:03 +00:00
|
|
|
PROPERTIES
|
2011-09-15 08:31:51 +00:00
|
|
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
2012-01-08 19:10:15 +00:00
|
|
|
target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT} ${SYSLIBS})
|
2009-02-15 15:49:19 +00:00
|
|
|
|
2009-02-18 20:47:32 +00:00
|
|
|
install(
|
|
|
|
DIRECTORY include/Poco
|
|
|
|
DESTINATION include
|
2009-04-27 19:22:30 +00:00
|
|
|
PATTERN ".svn" EXCLUDE
|
2009-02-18 20:47:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
2012-01-07 13:45:03 +00:00
|
|
|
TARGETS ${LIBNAME}
|
2009-02-18 20:47:32 +00:00
|
|
|
DESTINATION lib
|
|
|
|
)
|
|
|
|
|
2011-01-22 11:46:03 +00:00
|
|
|
if (ENABLE_TESTS)
|
|
|
|
add_subdirectory(samples)
|
|
|
|
add_subdirectory(testsuite)
|
|
|
|
endif ()
|
|
|
|
|