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/odbc/CMakeLists.txt

39 lines
1006 B
CMake
Raw Normal View History

if (WITH_ODBC)
set( YAPODBC_SOURCES
myddas_odbc.c
)
2015-11-05 17:06:15 +00:00
set(SO_MAJOR 1)
set(SO_MINOR 0)
set(SO_PATCH 0)
2015-11-05 17:06:15 +00:00
macro_optional_find_package(ODBC ON)
2015-11-05 17:06:15 +00:00
if (ODBC_FOUND)
# ODBC_INCLUDE_DIRECTORIES, where to find sql.h
# ODBC_LIBRARIES, the libraries to link against to use ODBC
# ODBC_FOUND. If false, you cannot build anything that requires Odbc.
2019-01-09 09:32:09 +00:00
add_library(YAPodbc ${YAPODBC_SOURCES})
target_link_libraries(YAPodbc libYap ${ODBC_LIBRARIES})
2019-01-09 09:32:09 +00:00
set_property(DIRECTORY
APPEND PROPERTY
INCLUDE_DIRECTORIES ${ODBC_INCLUDE_DIRECTORIES} ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR} )
set_target_properties (YAPodbc PROPERTIES
POSITION_INDEPENDENT_CODE ON
PREFIX ""
)
2015-11-05 17:06:15 +00:00
install(TARGETS YAPodbc
2018-11-16 14:02:56 +00:00
LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR}
RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR}
)
2015-11-05 17:06:15 +00:00
else()
add_definitions (-DMYDDAS_ODBC=0)
2016-02-16 14:20:41 +00:00
endif (ODBC_FOUND)
endif()