Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Link odbc-cpp-wrapper library statically
  • Loading branch information
Maksim Rylov authored and mrylov committed Dec 7, 2020
1 parent f601083 commit 9a380df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/FindODBCCPP.cmake
Expand Up @@ -18,7 +18,7 @@ IF (NOT ODBCCPP_INCLUDE_DIR)
ENDIF (NOT ODBCCPP_INCLUDE_DIR)

IF (NOT ODBCCPP_LIBRARY)
FIND_LIBRARY(ODBCCPP_LIBRARY odbccpp
FIND_LIBRARY(ODBCCPP_LIBRARY odbccpp_static
PATHS
/usr/lib
/usr/local/lib
Expand Down
8 changes: 6 additions & 2 deletions src/providers/hana/CMakeLists.txt
Expand Up @@ -53,6 +53,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/gui/auth
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
Expand All @@ -69,16 +70,19 @@ INCLUDE_DIRECTORIES (SYSTEM
ADD_LIBRARY(hanaprovider MODULE ${HANA_SRCS} ${HANA_HDRS} ${HANA_MOC_SRCS})
ADD_LIBRARY(hanaprovider_a STATIC ${HANA_SRCS} ${HANA_HDRS} ${HANA_MOC_SRCS})

TARGET_COMPILE_DEFINITIONS(hanaprovider PUBLIC ODBC_STATIC)
TARGET_COMPILE_DEFINITIONS(hanaprovider_a PUBLIC ODBC_STATIC)

TARGET_LINK_LIBRARIES(hanaprovider
qgis_core
${ODBC_LIBRARIES}
${ODBCCPP_LIBRARY}
${ODBC_LIBRARIES}
)

TARGET_LINK_LIBRARIES(hanaprovider_a
qgis_core
${ODBC_LIBRARIES}
${ODBCCPP_LIBRARY}
${ODBC_LIBRARIES}
)

IF (WITH_GUI)
Expand Down

0 comments on commit 9a380df

Please sign in to comment.