poco/biicode/cmake/Data.cmake
2015-04-07 16:01:31 +02:00

42 lines
1.2 KiB
CMake

if (NOT POCO_STATIC)
target_compile_definitions(${BII_BLOCK_TARGET} INTERFACE -DTHREADSAFE)
endif (NOT POCO_STATIC)
if(MSVC AND NOT(MSVC_VERSION LESS 1400))
set_source_files_properties(src/StatementImpl.cpp
PROPERTIES COMPILE_FLAGS "/bigobj")
endif()
if(ENABLE_DATA_SQLITE)
# SQlite3 is built in any case
include( SQLite )
endif(ENABLE_DATA_SQLITE)
if(ENABLE_DATA_MYSQL)
find_package(MySQL)
if(MYSQL_FOUND)
target_include_directories(${BII_BLOCK_TARGET} INTERFACE "${MYSQL_INCLUDE_DIR}")
message(STATUS "MySQL Support Enabled")
include( MySQL )
else()
message(STATUS "MySQL Support Disabled - no MySQL library")
endif(MYSQL_FOUND)
endif(ENABLE_DATA_MYSQL)
if(ENABLE_DATA_ODBC)
find_package(ODBC)
if(WIN32 AND NOT WINCE)
set(ODBC_LIBRARIES "odbc32" "odbccp32")
message(STATUS "Windows native ODBC Support Enabled")
include( ODBC )
else(WIN32 AND NOT WINCE)
if(ODBC_FOUND)
target_include_directories(${BII_BLOCK_TARGET} INTERFACE "${ODBC_INCLUDE_DIRECTORIES}")
message(STATUS "ODBC Support Enabled")
include( ODBC )
else()
message(STATUS "ODBC Support Disabled - no ODBC runtime")
endif()
endif(WIN32 AND NOT WINCE)
endif(ENABLE_DATA_ODBC)