build: Introduce SECP256k1_DLL_EXPORT macro
This change provides a way to build a shared library that is not tired to the Libtool-specific `DLL_EXPORT` macro.
This commit is contained in:
@@ -20,10 +20,9 @@ if(SECP256K1_ASM STREQUAL "arm32")
|
||||
target_link_libraries(secp256k1_asm INTERFACE secp256k1_asm_arm)
|
||||
endif()
|
||||
|
||||
# Define our export symbol only for Win32 and only for shared libs.
|
||||
# This matches libtool's usage of DLL_EXPORT
|
||||
if(WIN32)
|
||||
set_target_properties(secp256k1 PROPERTIES DEFINE_SYMBOL "DLL_EXPORT")
|
||||
# Define our export symbol only for shared libs.
|
||||
set_target_properties(secp256k1 PROPERTIES DEFINE_SYMBOL SECP256K1_DLL_EXPORT)
|
||||
target_compile_definitions(secp256k1 INTERFACE $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:SECP256K1_STATIC>)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user