This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/myddas/mysql/CMakeLists.txt

47 lines
1.1 KiB
CMake
Raw Normal View History

2015-11-05 17:06:15 +00:00
set( YAPMYSQL_SOURCES
myddas_mysql.c
2016-01-03 02:06:09 +00:00
myddas_util.c
myddas_util.c
myddas_wkb2prolog.c
)
2015-11-05 17:06:15 +00:00
set(SO_MAJOR 1)
set(SO_MINOR 0)
set(SO_PATCH 0)
macro_optional_find_package(MySQL ON)
2015-11-05 17:06:15 +00:00
macro_log_feature (MYSQL_FOUND "MySQL"
"MYSQL Driver for MYDDAS Data-Base Interface "
"http://www.mysql.org" FALSE)
if (MYSQL_FOUND)
# MYSQL_INCLUDE_DIR - where to find mysql.h, etc.
# MYSQL_LIBRARIES - List of libraries when using MySQL.
# MYSQL_FOUND - True if MySQL found.
add_definitions (-DMYDDAS_MYSQL=1)
add_library (Yapmysql SHARED ${YAPMYSQL_SOURCES})
2016-01-03 02:06:09 +00:00
target_link_libraries(Yapmysql ${MYSQL_LIBRARIES} libYap)
2015-11-05 17:06:15 +00:00
include_directories (${MYSQL_INCLUDE_DIR} ..)
set_target_properties (Yapmysql PROPERTIES
POSITION_INDEPENDENT_CODE ON
VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}"
SOVERSION ${SO_MAJOR}
)
install(TARGETS Yapmysql
LIBRARY DESTINATION ${libdir}
2016-01-20 22:25:25 +00:00
ARCHIVE DESTINATION ${libdir}
2015-11-05 17:06:15 +00:00
)
2016-01-03 02:06:09 +00:00
else()
add_definitions (-DMYDDAS_MYSQL=0)
endif (MYSQL_FOUND)
2015-11-05 17:06:15 +00:00
cmake_dependent_option (USE_MYDDAS_top_level
"enable the MYDDAS top-level (REPL) support for MySQL" OFF
'USE_MYDDAS AND MYSQL_FOUND' OFF)
#TODO: