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

40 lines
1003 B
CMake
Raw Normal View History

2015-11-05 17:06:15 +00:00
set( YAPODBC_SOURCES
myddas_odbc.c
)
set(SO_MAJOR 1)
set(SO_MINOR 0)
set(SO_PATCH 0)
macro_optional_find_package(ODBC ON)
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.
2018-06-28 12:48:29 +01:00
add_lib(YAPodbc ${YAPODBC_SOURCES})
target_link_libraries(YAPodbc libYap ${ODBC_LIBRARIES})
2015-11-05 17:06:15 +00:00
include_directories (${ODBC_INCLUDE_DIRECTORIES} ..)
2018-06-28 12:48:29 +01:00
set_target_properties (YAPodbc PROPERTIES
2015-11-05 17:06:15 +00:00
POSITION_INDEPENDENT_CODE ON
PREFIX ""
2015-11-05 17:06:15 +00:00
)
list (APPEND MYDDAS_FLAGS -DMYDDAS_ODBC=1)
set (MYDDAS_FLAGS ${MYDDAS_FLAGS} ON PARENT_SCOPE)
set_property(GLOBAL APPEND PROPERTY COMPILE_DEFINITIONS
-DMYDDAS_ODBC=1)
2018-06-28 12:48:29 +01:00
install(TARGETS YAPodbc
2017-12-05 15:14:57 +00:00
LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR}
RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR}
ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR}
2015-11-05 17:06:15 +00:00
)
2016-02-16 14:20:41 +00:00
else()
add_definitions (-DMYDDAS_ODBC=0)
endif (ODBC_FOUND)