2009-02-15 15:49:19 +00:00
|
|
|
set(LIBNAME "PocoData")
|
|
|
|
set(LIBNAMED "${LIBNAME}d")
|
|
|
|
|
|
|
|
set(SRCS "")
|
|
|
|
aux_source_directory(src SRCS)
|
2009-03-08 18:57:55 +00:00
|
|
|
include_directories( SQLite/include )
|
2009-02-15 15:49:19 +00:00
|
|
|
|
|
|
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|
|
|
set_target_properties( ${LIBNAME}
|
2009-08-26 12:26:22 +00:00
|
|
|
PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS}
|
2009-02-15 15:49:19 +00:00
|
|
|
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
|
|
|
|
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
|
|
|
target_link_libraries( ${LIBNAME} PocoFoundation )
|
|
|
|
|
|
|
|
add_library( ${LIBNAMED} ${LIB_MODE} ${SRCS} )
|
|
|
|
set_target_properties( ${LIBNAMED}
|
2009-08-26 12:26:22 +00:00
|
|
|
PROPERTIES COMPILE_FLAGS "${DEBUG_CXX_FLAGS}"
|
2009-02-15 15:49:19 +00:00
|
|
|
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
|
|
|
|
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
|
|
|
target_link_libraries( ${LIBNAMED} PocoFoundationd )
|
|
|
|
|
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(
|
|
|
|
TARGETS ${LIBNAME} ${LIBNAMED}
|
|
|
|
DESTINATION lib
|
|
|
|
)
|
|
|
|
|
2009-02-15 15:49:19 +00:00
|
|
|
add_subdirectory( SQLite )
|
2009-03-08 17:03:18 +00:00
|
|
|
|
2009-02-18 20:47:32 +00:00
|
|
|
if(MYSQL_FOUND)
|
|
|
|
add_subdirectory( MySQL )
|
|
|
|
endif(MYSQL_FOUND)
|
2009-03-08 17:03:18 +00:00
|
|
|
|
|
|
|
include(../contrib/cmake/FindODBC.cmake)
|
|
|
|
|
2011-01-16 13:36:24 +00:00
|
|
|
if(CMAKE_SYSTEM MATCHES "Windows")
|
|
|
|
message(STATUS "Windows native ODBC Support Enabled")
|
2009-06-22 18:41:44 +00:00
|
|
|
add_subdirectory( ODBC )
|
2011-01-16 13:36:24 +00:00
|
|
|
else ()
|
|
|
|
if ( ${UNIX_ODBC_CONFIG} STREQUAL UNIX_ODBC_CONFIG-NOTFOUND AND ${IODBC_CONFIG} STREQUAL IODBC_CONFIG-NOTFOUND)
|
|
|
|
message(STATUS "ODBC Support Disabled - no ODBC runtime")
|
|
|
|
else ()
|
|
|
|
message(STATUS "ODBC Support Enabled")
|
|
|
|
add_subdirectory( ODBC )
|
|
|
|
endif ()
|
|
|
|
endif()
|
2009-02-18 20:47:32 +00:00
|
|
|
|
2011-01-22 11:46:03 +00:00
|
|
|
if (ENABLE_TESTS)
|
|
|
|
add_subdirectory(samples)
|
|
|
|
add_subdirectory(testsuite)
|
|
|
|
endif ()
|