Skip to content

Commit

Permalink
owning the libs more
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannes Mühleisen committed May 2, 2024
1 parent dc031c0 commit 8ce5ae9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ if(ODBC_FOUND)
endif()
endif()


if(NOT MSVC)
set(LIB_DL -ldl)
set(DUCKDB_SYSTEM_LIBS ${CMAKE_DL_LIBS})
if(MSVC)
set(DUCKDB_SYSTEM_LIBS ${DUCKDB_SYSTEM_LIBS} ws2_32 rstrtmgr bcrypt)
endif()

if(OSX_BUILD_UNIVERSAL)
Expand All @@ -52,7 +52,7 @@ add_library(duckdb_odbc SHARED ${ALL_OBJECT_FILES} duckdb_odbc.def)

set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API")
target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} )
target_link_libraries(duckdb_odbc Threads::Threads ${LIB_DL})
target_link_libraries(duckdb_odbc Threads::Threads ${DUCKDB_SYSTEM_LIBS})

if(NOT CLANG_TIDY)
add_subdirectory(test)
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ if(ODBC_FOUND)
endif()
endif()


if(NOT MSVC)
set(LIB_DL -ldl)
set(DUCKDB_SYSTEM_LIBS ${CMAKE_DL_LIBS})
if(MSVC)
set(DUCKDB_SYSTEM_LIBS ${DUCKDB_SYSTEM_LIBS} ws2_32 rstrtmgr bcrypt)
endif()

if(OSX_BUILD_UNIVERSAL)
Expand All @@ -52,7 +52,7 @@ add_library(duckdb_odbc SHARED ${ALL_OBJECT_FILES} duckdb_odbc.def)

set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API")
target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} ${LIBRARY_FILES})
target_link_libraries(duckdb_odbc Threads::Threads ${LIB_DL})
target_link_libraries(duckdb_odbc Threads::Threads ${DUCKDB_SYSTEM_LIBS})

if(NOT CLANG_TIDY)
add_subdirectory(test)
Expand Down

0 comments on commit 8ce5ae9

Please sign in to comment.