2012-04-29 20:52:25 +02:00
|
|
|
set(LIBNAME "PocoData")
|
|
|
|
|
|
|
|
set(SRCS "")
|
|
|
|
aux_source_directory(src SRCS)
|
|
|
|
include_directories( SQLite/include )
|
|
|
|
|
|
|
|
if (NOT POCO_STATIC)
|
|
|
|
add_definitions(-DData_EXPORTS -DTHREADSAFE -DODBC_EXPORTS -DMySQL_EXPORTS -DSQLite_EXPORTS)
|
|
|
|
endif (NOT POCO_STATIC)
|
|
|
|
|
2014-02-22 20:31:23 +01:00
|
|
|
if(MSVC AND NOT(MSVC_VERSION LESS 1400))
|
|
|
|
set_source_files_properties(src/StatementImpl.cpp
|
|
|
|
PROPERTIES COMPILE_FLAGS "/bigobj")
|
|
|
|
endif()
|
|
|
|
|
2012-04-29 20:52:25 +02:00
|
|
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|
|
|
set_target_properties( ${LIBNAME}
|
|
|
|
PROPERTIES
|
|
|
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
2012-12-08 18:54:38 +01:00
|
|
|
target_link_libraries( ${LIBNAME} PocoFoundation)
|
2012-04-29 20:52:25 +02:00
|
|
|
|
|
|
|
install(
|
|
|
|
DIRECTORY include/Poco
|
|
|
|
DESTINATION include
|
|
|
|
PATTERN ".svn" EXCLUDE
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS ${LIBNAME}
|
|
|
|
DESTINATION lib
|
|
|
|
)
|
|
|
|
|
|
|
|
add_subdirectory( SQLite )
|
|
|
|
|
|
|
|
if(MYSQL_FOUND)
|
|
|
|
add_subdirectory( MySQL )
|
|
|
|
endif(MYSQL_FOUND)
|
|
|
|
|
2012-12-16 03:40:40 +01:00
|
|
|
include(FindODBC)
|
2012-04-29 20:52:25 +02:00
|
|
|
|
|
|
|
if(CMAKE_SYSTEM MATCHES "Windows")
|
|
|
|
message(STATUS "Windows native ODBC Support Enabled")
|
|
|
|
add_subdirectory( ODBC )
|
|
|
|
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()
|
|
|
|
|
|
|
|
if (ENABLE_TESTS)
|
|
|
|
add_subdirectory(samples)
|
|
|
|
add_subdirectory(testsuite)
|
|
|
|
endif ()
|