aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRichard Levitte <richard@levitte.org>2021-02-17 06:07:20 +0100
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>2021-02-17 11:43:17 +0100
commitfced7943558903bcd081cf8e78ef402862451e29 (patch)
tree05ef23ef6ce2f7facf48affad6c08e58797b5955 /CMakeLists.txt
parent4573bedad51d6978b26b5d420430d8e64f02d47b (diff)
downloadgost-engine-fced7943558903bcd081cf8e78ef402862451e29.zip
gost-engine-fced7943558903bcd081cf8e78ef402862451e29.tar.gz
gost-engine-fced7943558903bcd081cf8e78ef402862451e29.tar.bz2
Fix gost engine suffix (for MacOS X)
On MacOS X, OpenSSL and cmake have different ideas on what suffix a dynamically loadable module should have. OpenSSL expects .dylib, while cmake uses .so by default. Fixed by explicitly telling cmake to use the same suffix as for shared libraries.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7c3ec9..c32b90f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -276,7 +276,10 @@ add_library(gost_core STATIC ${GOST_LIB_SOURCE_FILES})
set_target_properties(gost_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_library(gost_engine MODULE ${GOST_ENGINE_SOURCE_FILES})
-set_target_properties(gost_engine PROPERTIES PREFIX "" OUTPUT_NAME "gost")
+# Set the suffix explicitly to adapt to OpenSSL's idea of what a
+# module suffix should be
+set_target_properties(gost_engine PROPERTIES
+ PREFIX "" OUTPUT_NAME "gost" SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
target_link_libraries(gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY})
set(GOST_SUM_SOURCE_FILES