Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Append version to dll on CMake #1084

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -860,15 +860,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
Loading