poco/biicode/cmake/Data.cmake
Craig Scott 035177e1d2 Add POCO_VERBOSE_MESSAGES option (#1679)
Allows informational logging to be turned off. All find-related messages,
warnings, errors, etc. are still always logged. The option is ON by default
to preserve existing behaviour.
2017-07-06 15:56:39 +02:00

48 lines
1.4 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}")
if(POCO_VERBOSE_MESSAGES)
message(STATUS "MySQL Support Enabled")
endif()
include( MySQL )
elseif(POCO_VERBOSE_MESSAGES)
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")
if(POCO_VERBOSE_MESSAGES)
message(STATUS "Windows native ODBC Support Enabled")
endif()
include( ODBC )
else(WIN32 AND NOT WINCE)
if(ODBC_FOUND)
target_include_directories(${BII_BLOCK_TARGET} INTERFACE "${ODBC_INCLUDE_DIRECTORIES}")
if(POCO_VERBOSE_MESSAGES)
message(STATUS "ODBC Support Enabled")
endif()
include( ODBC )
elseif(POCO_VERBOSE_MESSAGES)
message(STATUS "ODBC Support Disabled - no ODBC runtime")
endif()
endif(WIN32 AND NOT WINCE)
endif(ENABLE_DATA_ODBC)