Skip to content

Commit e13cce3

Browse files
committed
Fixed a failing build on macOS (AArch64)
- Bump cmake-maven-plugin from 3.19.2-b1 to 4.0.3-b1 - Workaround for macOS to propagate a correct OpenSSL lib path to Reindexer Issue gh-122
1 parent 9e131b5 commit e13cce3

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

builtin-adapter/CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.5)
22

33
project(builtin-adapter)
44

@@ -17,3 +17,17 @@ add_library(${TARGET} SHARED BuiltinAdapter.cpp)
1717
include_directories(${JNI_INCLUDE_DIRS} ${REINDEXER_INCLUDE_DIRS})
1818

1919
target_link_libraries(${TARGET} reindexer_server_library reindexer_server_resources ${REINDEXER_LIBRARIES})
20+
21+
# Workaround for macOS to propagate a correct OpenSSL lib path to Reindexer.
22+
if(APPLE)
23+
find_package(OpenSSL)
24+
if(OpenSSL_FOUND)
25+
if(NOT DEFINED OPENSSL_LIB_PATH)
26+
get_filename_component(OPENSSL_LIB_PATH ${OPENSSL_CRYPTO_LIBRARY} DIRECTORY)
27+
endif()
28+
set_target_properties(${TARGET} PROPERTIES
29+
BUILD_WITH_INSTALL_RPATH TRUE
30+
INSTALL_RPATH ${OPENSSL_LIB_PATH}
31+
)
32+
endif()
33+
endif()

pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,12 @@
179179
</plugin>
180180

181181
<plugin>
182-
<groupId>com.googlecode.cmake-maven-project</groupId>
182+
<groupId>io.github.cmake-maven-plugin</groupId>
183183
<artifactId>cmake-maven-plugin</artifactId>
184-
<version>3.19.2-b1</version>
184+
<version>4.0.3-b1</version>
185185
<configuration>
186186
<generator>Unix Makefiles</generator>
187187
<sourcePath>${cmake.source.directory}</sourcePath>
188-
<targetPath>${cmake.binary.directory}</targetPath>
189188
<projectDirectory>${cmake.binary.directory}</projectDirectory>
190189
</configuration>
191190
<executions>

0 commit comments

Comments
 (0)