Skip to content
Permalink
Browse files

Only build and use odbccpp_static

  • Loading branch information
stefanuhrig committed Jan 12, 2021
1 parent d4494e5 commit 4bf57f76e1d28cf643edf2f98d540cf9e4cb9105
Showing with 3 additions and 25 deletions.
  1. +1 −1 CMakeLists.txt
  2. +0 −22 external/odbccpp/src/odbc/CMakeLists.txt
  3. +2 −2 src/providers/hana/CMakeLists.txt
@@ -246,7 +246,7 @@ if(WITH_CORE)
if(ODBC_FOUND)
set(HAVE_HANA TRUE)
add_subdirectory(external/odbccpp)
set_target_properties(odbccpp odbccpp_static PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
set_target_properties(odbccpp_static PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
else()
message(STATUS "Couldn't find ODBC library")
endif()
@@ -55,25 +55,3 @@ TARGET_COMPILE_DEFINITIONS(odbccpp_static
ODBC_STATIC
)
SET_PROPERTY(TARGET odbccpp_static PROPERTY POSITION_INDEPENDENT_CODE ON)

# Shared library
ADD_LIBRARY(odbccpp
SHARED
${odbccpp_sources}
)
TARGET_COMPILE_DEFINITIONS(odbccpp
PRIVATE
ODBC_EXPORTS
)

TARGET_LINK_LIBRARIES(odbccpp
PUBLIC
${ODBC_LIBRARIES}
)

SET_PROPERTY(TARGET odbccpp PROPERTY public_headers ${public_headers})

# Installation
INSTALL(TARGETS odbccpp_static DESTINATION lib)
INSTALL(TARGETS odbccpp DESTINATION lib)
INSTALL(FILES ${public_headers} DESTINATION include/odbc)
@@ -97,13 +97,13 @@ TARGET_COMPILE_DEFINITIONS(hanaprovider_a PUBLIC ODBC_STATIC)

TARGET_LINK_LIBRARIES(hanaprovider
qgis_core
odbccpp
odbccpp_static
${ODBC_LIBRARIES}
)

TARGET_LINK_LIBRARIES(hanaprovider_a
qgis_core
odbccpp
odbccpp_static
${ODBC_LIBRARIES}
)

0 comments on commit 4bf57f7

Please sign in to comment.
You can’t perform that action at this time.