Skip to content

Commit

Permalink
Use .dylib on macOS for PostgreSQL 16+ (rdkit#7869)
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m authored Nov 1, 2024
1 parent baa2a95 commit b16b602
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Code/PgSQL/rdkit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
find_package(PostgreSQL REQUIRED)

if(APPLE)
set (EXTENSION_PREFIX "")
set (EXTENSION_SUFFIX ".so")
set (EXTENSION_DEST_SUFFIX ".so")
if(${PostgreSQL_VERSION_STRING} VERSION_GREATER_EQUAL 16.0)
set (EXTENSION_SUFFIX ".dylib")
set (EXTENSION_DEST_SUFFIX ".dylib")
else()
set (EXTENSION_SUFFIX ".so")
set (EXTENSION_DEST_SUFFIX ".so")
endif()
elseif(WIN32)
set(REGEX_SEPARATOR "\\\\")
if(MSVC)
Expand All @@ -20,8 +27,6 @@ else()
set (EXTENSION_DEST_SUFFIX ".so")
endif()

find_package(PostgreSQL REQUIRED)

if(RDK_OPTIMIZE_POPCNT)
add_definitions(-DRDK_OPTIMIZE_POPCNT)
endif(RDK_OPTIMIZE_POPCNT)
Expand Down

0 comments on commit b16b602

Please sign in to comment.