2016-11-07 21:54:23 -08:00
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/portfile-uwp.cmake)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2016-09-18 20:50:08 -07:00
|
|
|
include(vcpkg_common_functions)
|
2017-01-28 17:25:17 +01:00
|
|
|
set(OPENSSL_VERSION 1.0.2k)
|
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION})
|
2016-09-18 20:50:08 -07:00
|
|
|
vcpkg_find_acquire_program(PERL)
|
|
|
|
find_program(NMAKE nmake)
|
|
|
|
|
|
|
|
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
2017-02-08 17:39:31 -08:00
|
|
|
set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}")
|
2016-09-18 20:50:08 -07:00
|
|
|
|
|
|
|
vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE
|
2017-01-28 17:25:17 +01:00
|
|
|
URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz"
|
|
|
|
FILENAME "openssl-${OPENSSL_VERSION}.tar.gz"
|
|
|
|
SHA512 0d314b42352f4b1df2c40ca1094abc7e9ad684c5c35ea997efdd58204c70f22a1abcb17291820f0fff3769620a4e06906034203d31eb1a4d540df3e0db294016
|
2016-09-18 20:50:08 -07:00
|
|
|
)
|
|
|
|
|
2016-10-18 21:20:16 -07:00
|
|
|
file(COPY
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/PerlScriptSpaceInPathFixes.patch
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch
|
|
|
|
DESTINATION ${SOURCE_PATH})
|
2016-09-18 20:50:08 -07:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2016-09-28 17:05:56 -07:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2016-09-18 20:50:08 -07:00
|
|
|
GENERATOR "NMake Makefiles"
|
|
|
|
OPTIONS
|
|
|
|
-DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}
|
|
|
|
-DCURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR}
|
|
|
|
-DCURRENT_BUILDTREES_DIR=${CURRENT_BUILDTREES_DIR}
|
|
|
|
-DOPENSSL_SOURCE_ARCHIVE=${OPENSSL_SOURCE_ARCHIVE}
|
|
|
|
-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
|
|
|
|
-DTRIPLET_SYSTEM_ARCH=${TRIPLET_SYSTEM_ARCH}
|
2017-01-28 17:25:17 +01:00
|
|
|
-DVERSION=${OPENSSL_VERSION}
|
2016-09-18 20:50:08 -07:00
|
|
|
-DTARGET_TRIPLET=${TARGET_TRIPLET}
|
|
|
|
)
|
|
|
|
|
2016-09-19 17:38:38 -07:00
|
|
|
message(STATUS "Build ${TARGET_TRIPLET}-rel")
|
|
|
|
vcpkg_execute_required_process(
|
|
|
|
COMMAND ${CMAKE_COMMAND} --build .
|
|
|
|
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
|
|
|
LOGNAME build-${TARGET_TRIPLET}-rel
|
|
|
|
)
|
|
|
|
message(STATUS "Build ${TARGET_TRIPLET}-rel done")
|
|
|
|
|
|
|
|
message(STATUS "Build ${TARGET_TRIPLET}-dbg")
|
|
|
|
vcpkg_execute_required_process(
|
|
|
|
COMMAND ${CMAKE_COMMAND} --build .
|
|
|
|
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
|
|
|
LOGNAME build-${TARGET_TRIPLET}-dbg
|
|
|
|
)
|
|
|
|
message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
|
2016-09-18 20:50:08 -07:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(REMOVE
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe
|
|
|
|
${CURRENT_PACKAGES_DIR}/bin/openssl.exe
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/openssl.cnf
|
|
|
|
${CURRENT_PACKAGES_DIR}/openssl.cnf
|
|
|
|
)
|
2016-10-25 16:10:43 -07:00
|
|
|
|
2016-09-18 20:50:08 -07:00
|
|
|
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright)
|
2016-10-25 16:10:43 -07:00
|
|
|
|
2016-10-31 12:34:04 -07:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2016-10-25 16:10:43 -07:00
|
|
|
# They should be empty, only the exes deleted above were in these directories
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/)
|
|
|
|
endif()
|
2016-10-31 12:34:04 -07:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|