2012-06-26 12:37:02 +00:00
|
|
|
set(LIBNAME "PocoNet")
|
|
|
|
|
2014-08-22 17:10:24 +02:00
|
|
|
# Sources
|
|
|
|
file(GLOB SRCS_G "src/*.cpp")
|
|
|
|
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
2012-06-26 12:37:02 +00:00
|
|
|
|
2014-08-22 17:10:24 +02:00
|
|
|
# Headers
|
|
|
|
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
|
|
|
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
2012-06-26 12:37:02 +00:00
|
|
|
|
2014-08-22 17:10:24 +02:00
|
|
|
#TODO: Can WIN32 be used here?
|
2012-06-26 12:37:02 +00:00
|
|
|
if(CMAKE_SYSTEM MATCHES "Windows")
|
2014-08-22 17:10:24 +02:00
|
|
|
set(SYSLIBS ${SYSLIBS} "ws2_32.lib" "iphlpapi.lib")
|
2012-06-26 12:37:02 +00:00
|
|
|
endif(CMAKE_SYSTEM MATCHES "Windows")
|
|
|
|
|
|
|
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
2014-08-22 17:10:24 +02:00
|
|
|
set_target_properties( ${LIBNAME}
|
|
|
|
PROPERTIES
|
|
|
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
|
|
|
DEFINE_SYMBOL Net_EXPORTS)
|
2012-12-08 15:54:38 -02:00
|
|
|
target_link_libraries( ${LIBNAME} PocoFoundation ${SYSLIBS})
|
2012-06-26 12:37:02 +00:00
|
|
|
|
|
|
|
install(
|
|
|
|
DIRECTORY include/Poco
|
|
|
|
DESTINATION include
|
|
|
|
PATTERN ".svn" EXCLUDE
|
|
|
|
)
|
2014-08-22 17:10:24 +02:00
|
|
|
|
2012-06-26 12:37:02 +00:00
|
|
|
install(
|
|
|
|
TARGETS ${LIBNAME}
|
2014-05-21 14:16:34 -07:00
|
|
|
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
|
|
|
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
|
|
|
RUNTIME DESTINATION bin
|
2012-06-26 12:37:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if (ENABLE_TESTS)
|
|
|
|
add_subdirectory(samples)
|
|
|
|
add_subdirectory(testsuite)
|
|
|
|
endif ()
|
|
|
|
|