Skip to content

Commit

Permalink
Land #1084, Append version to dll on CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
busterb committed Oct 1, 2024
2 parents 663f6cf + 5b8d17b commit c04ca24
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: "Configure CMake"
shell: cmd
run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} DBUILD_SHARED_LIBS=${{ matrix.shared }} -DCMAKE_INSTALL_PREFIX=../local
run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -D BUILD_SHARED_LIBS=${{ matrix.shared }} -D CMAKE_INSTALL_PREFIX=../local

- name: "Build"
shell: cmd
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.16.4)
cmake_minimum_required (VERSION 3.27)
if(MSVC)
cmake_policy(SET CMP0091 NEW)
endif()
Expand Down
8 changes: 3 additions & 5 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -844,15 +844,13 @@ add_library(crypto $<TARGET_OBJECTS:crypto_obj> $<TARGET_OBJECTS:compat_obj> emp

export_symbol(crypto ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym)
target_link_libraries(crypto ${PLATFORM_LIBS})
if (WIN32)
set(CRYPTO_POSTFIX -${CRYPTO_MAJOR_VERSION} PARENT_SCOPE)
endif()
set_target_properties(crypto PROPERTIES
OUTPUT_NAME crypto${CRYPTO_POSTFIX}
ARCHIVE_OUTPUT_NAME crypto${CRYPTO_POSTFIX}
OUTPUT_NAME crypto
ARCHIVE_OUTPUT_NAME crypto
EXPORT_NAME Crypto
VERSION ${CRYPTO_VERSION}
SOVERSION ${CRYPTO_MAJOR_VERSION}
DLL_NAME_WITH_SOVERSION TRUE
)

target_include_directories(
Expand Down
8 changes: 3 additions & 5 deletions ssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,13 @@ endif()

export_symbol(ssl ${CMAKE_CURRENT_SOURCE_DIR}/ssl.sym)
target_link_libraries(ssl crypto ${PLATFORM_LIBS})
if (WIN32)
set(SSL_POSTFIX -${SSL_MAJOR_VERSION} PARENT_SCOPE)
endif()
set_target_properties(ssl PROPERTIES
OUTPUT_NAME ssl${SSL_POSTFIX}
ARCHIVE_OUTPUT_NAME ssl${SSL_POSTFIX}
OUTPUT_NAME ssl
ARCHIVE_OUTPUT_NAME ssl
EXPORT_NAME SSL
VERSION ${SSL_VERSION}
SOVERSION ${SSL_MAJOR_VERSION}
DLL_NAME_WITH_SOVERSION TRUE
)

target_include_directories(
Expand Down
8 changes: 3 additions & 5 deletions tls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,13 @@ endif()

export_symbol(tls ${CMAKE_CURRENT_BINARY_DIR}/tls.sym)
target_link_libraries(tls ${OPENSSL_LIBS})
if (WIN32)
set(TLS_POSTFIX -${TLS_MAJOR_VERSION} PARENT_SCOPE)
endif()
set_target_properties(tls PROPERTIES
OUTPUT_NAME tls${TLS_POSTFIX}
ARCHIVE_OUTPUT_NAME tls${TLS_POSTFIX}
OUTPUT_NAME tls
ARCHIVE_OUTPUT_NAME tls
EXPORT_NAME TLS
VERSION ${TLS_VERSION}
SOVERSION ${TLS_MAJOR_VERSION}
DLL_NAME_WITH_SOVERSION TRUE
)

target_include_directories(
Expand Down

0 comments on commit c04ca24

Please sign in to comment.