Skip to content

Commit

Permalink
Only build and use odbccpp_static
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanuhrig committed Jan 12, 2021
1 parent d4494e5 commit 4bf57f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -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()
Expand Down
22 changes: 0 additions & 22 deletions external/odbccpp/src/odbc/CMakeLists.txt
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions src/providers/hana/CMakeLists.txt
Expand Up @@ -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}
)

Expand Down

0 comments on commit 4bf57f7

Please sign in to comment.