mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-02 19:48:00 +00:00
* Take changes from 1.9.1 for check cxxyy compiler support * Get change from 1.9.1 branch. _DEBUG is set on Foundation library * CMake improve find third-party libraries (#2478) * Add additional settings for thirdparty paths and fix windows build * Fix postgresql build on AppVeyor * Add additional path for odbc windows kits * Add test_compiler cpp * Take changes from 1.9.1 for find MySQL modul * Take changes from 1.9.1 for find ODBC modul * Take changes from 1.9.1 for find PCRE modul * Take changes from 1.9.1 for find PostgreSQL modul * Take changes from 1.9.1 for find Apache2 modul * Take cmake SQL changes from 1.9.1 * Take changes from 1.9.1 for MySQL cmake * Take changes from 1.9.1 for ODBC cmake * Take changes from 1.9.1 for PostgreSQL cmake * Fix compile with c++11 standard * Rename DISABLE_CPP14 to POCO_DISABLE_CPP14 * Fix cmake compile features * Remove POCO_ENABLE_CPP11 * Enable compile 64bit in cmake for AppVeyor build * Remove copy data directory for encoding test. It doesnt exists anymore * Move __LCC__ define to MySQL
45 lines
1.4 KiB
CMake
45 lines
1.4 KiB
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(SQLMySQL ${MYSQL_SRCS} )
|
|
add_library(Poco::SQLMySQL ALIAS SQLMySQL)
|
|
set_target_properties(SQLMySQL
|
|
PROPERTIES
|
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
|
OUTPUT_NAME PocoSQLMySQL
|
|
DEFINE_SYMBOL MySQL_EXPORTS
|
|
)
|
|
|
|
target_link_libraries(SQLMySQL PUBLIC Poco::SQL MySQL::client)
|
|
target_include_directories(SQLMySQL
|
|
PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
$<INSTALL_INTERFACE:include>
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
)
|
|
target_compile_definitions(SQLMySQL PUBLIC THREADSAFE NO_TCL)
|
|
|
|
if(WIN32)
|
|
target_compile_definitions(SQLMySQL PUBLIC __LCC__) #__LCC__ define used by MySQL.h
|
|
endif()
|
|
if(MINGW) # MinGW supports 'mariadb-connector-c' only with OpenSSL
|
|
target_link_libraries(SQLMySQL PUBLIC ws2_32 OpenSSL::SSL)
|
|
endif()
|
|
|
|
POCO_INSTALL(SQLMySQL)
|
|
POCO_GENERATE_PACKAGE(SQLMySQL)
|
|
|
|
if (POCO_ENABLE_TESTS)
|
|
add_subdirectory(testsuite)
|
|
endif ()
|
|
|
|
configure_file(PocoSQLMySQL.pc.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/PocoSQLMySQL.pc @ONLY)
|
|
list(APPEND POCO_PKG_CONFIG_FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/PocoSQLMySQL.pc)
|
|
set(POCO_PKG_CONFIG_FILES ${POCO_PKG_CONFIG_FILES} PARENT_SCOPE)
|