poco/Data/MySQL/CMakeLists.txt
Joerg-Christian Boehme eec8dedbb8
Merge cmake changes from develop (#2504)
* Increase PostgreSQL version number

* Take changes from develop for Define Platform Specific cmake

* Take changes from develop for find MySQL modul

* Take changes from develop for find ODBC modul

* Cleanup standard language compile features

* Fix cmake compile features

* Improve to find ODBC on windows

* Enable 64-bit build on AppVeyor

* Switch MySQL off on AppVeyor because of error LNK2038: mismatch detected for _MSC_VER: value 1800 doesnt match value 1900

* Move LCC define to MySQL
2018-10-18 07:07:46 +02:00

37 lines
999 B
CMake

# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( MYSQL_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( MYSQL_SRCS ${HDRS_G})
add_library(DataMySQL ${MYSQL_SRCS} )
add_library(Poco::DataMySQL ALIAS DataMySQL)
set_target_properties(DataMySQL
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoDataMySQL
DEFINE_SYMBOL MySQL_EXPORTS
)
target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client)
target_include_directories(DataMySQL
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_compile_definitions(DataMySQL PUBLIC THREADSAFE NO_TCL)
if(WIN32)
target_compile_definitions(DataMySQL PUBLIC __LCC__) #__LCC__ define used by MySQL.h
endif()
POCO_INSTALL(DataMySQL)
POCO_GENERATE_PACKAGE(DataMySQL)
if (ENABLE_TESTS)
add_subdirectory(testsuite)
endif ()