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

Fixes crypto install #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
23 changes: 23 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.19041.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64",
"configurationProvider": "ms-vscode.cmake-tools",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cmake.generator": "Ninja"
}
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ configure_file( ${PROJECT_BINARY_DIR}/opensslconf.h.cmake
${PROJECT_BINARY_DIR}/include/openssl/opensslconf.h )
# End configure public headers

set(OPENSSL_LIB_INSTALL_DIR lib)
set(OPENSSL_AR_INSTALL_DIR lib)
if (MSVC)
set(OPENSSL_LIB_INSTALL_DIR lib/VC)
set(OPENSSL_AR_INSTALL_DIR lib/VC)
endif()

add_subdirectory(crypto)
add_subdirectory(ssl)

Expand All @@ -191,7 +198,11 @@ if( WITH_APPS AND NOT ANDROID AND NOT IOS )
install( CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/ssl/certs)" )
install( CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/ssl/misc)" )
install( CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/ssl/private)" )
install( FILES ${PROJECT_BINARY_DIR}/c_rehash DESTINATION bin )
if( WIN32 )
install( FILES ${PROJECT_BINARY_DIR}/c_rehash DESTINATION bin RENAME c_rehash.pl)
else()
install( FILES ${PROJECT_BINARY_DIR}/c_rehash DESTINATION bin)
endif()
endif()

file( GLOB PUBLIC_HEADERS "${PROJECT_BINARY_DIR}/include/openssl/*.h" )
Expand Down
13 changes: 8 additions & 5 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,18 @@ if( ANDROID )
set_target_properties( crypto PROPERTIES OUTPUT_NAME "crypto_1_1" )
elseif( MSVC )
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set_target_properties( crypto PROPERTIES OUTPUT_NAME "crypto-1_1-x64" )
set_target_properties( crypto PROPERTIES RUNTIME_OUTPUT_NAME "crypto-1_1-x64" )
set_target_properties( crypto PROPERTIES ARCHIVE_OUTPUT_NAME "libcrypto64MD" )
elseif( CMAKE_SIZEOF_VOID_P EQUAL 4 )
set_target_properties( crypto PROPERTIES OUTPUT_NAME "crypto-1_1" )
set_target_properties( crypto PROPERTIES RUNTIME_OUTPUT_NAME "crypto-1_1" )
set_target_properties( crypto PROPERTIES ARCHIVE_OUTPUT_NAME "libcrypto32MD" )
endif()
else()
set_target_properties( crypto PROPERTIES OUTPUT_NAME "crypto" )
endif()

install( TARGETS crypto
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib )
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${OPENSSL_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${OPENSSL_AR_INSTALL_DIR}
)
13 changes: 8 additions & 5 deletions ssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,18 @@ if( ANDROID )
set_target_properties( ssl PROPERTIES OUTPUT_NAME "ssl_1_1" )
elseif( MSVC )
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set_target_properties( ssl PROPERTIES OUTPUT_NAME "ssl-1_1-x64" )
set_target_properties( ssl PROPERTIES RUNTIME_OUTPUT_NAME "ssl-1_1-x64" )
set_target_properties( ssl PROPERTIES ARCHIVE_OUTPUT_NAME "libssl64MD" )
elseif( CMAKE_SIZEOF_VOID_P EQUAL 4 )
set_target_properties( ssl PROPERTIES OUTPUT_NAME "ssl-1_1" )
set_target_properties( ssl PROPERTIES RUNTIME_OUTPUT_NAME "ssl-1_1" )
set_target_properties( ssl PROPERTIES ARCHIVE_OUTPUT_NAME "libssl32MD" )
endif()
else()
set_target_properties( ssl PROPERTIES OUTPUT_NAME "ssl" )
endif()

install( TARGETS ssl
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib )
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${OPENSSL_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${OPENSSL_AR_INSTALL_DIR}
)