mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-23 11:19:43 +00:00
[oatpp] Add new port (#9402)
* improvement: has oatpp package * [oatpp] includes _CRT_SECURE_NO_WARNINGS compile-time flag * [oatpp] no curl submodule (until it catches up with core) * [oatpp] now version 0.19.11. Still no libretls module because of libretls3.0 dependency. * no accidentally added debug messages in vcpkg_execute_build_process.cmake * [oatpp] no empty depends line in CONTROL file * [oatpp] no dump_variables() function in portfile.cmake * [oatpp] no wwrning that only static libraries are supported * [oatpp] uses vcpkg_check_linkage(ONLY_STATIC_LIBRARY) call * [oatpp] curl submodule does not rely on pkg-config * [oatpp] curl-submodule-no-pkg-config-in-vcpkg works on linux and windows * [oatpp] portfile cleaned up * [oatpp] no carriage returns in patch * [oatpp]: split modules into their own ports * [oatpp-libressl]: remove variable dump * [libressl]: has check for UWP and ARM restored * [libressl]: has check for UWP and ARM restored * [libressl]: has check for UWP and ARM restored * [oatpp-libressl]: builds if libressl works * [oatpp]: version 1.0.0 * [oatpp]: no "Building ..." message Co-authored-by: heymamd1 <Michael.Heyman@jhuapl.edu>
This commit is contained in:
parent
99a832a161
commit
d1729dcaf5
4
ports/oatpp-consul/CONTROL
Normal file
4
ports/oatpp-consul/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: oatpp-consul
|
||||
Version: 1.0.0
|
||||
Description: OAT++ Modern web framework consul module
|
||||
Build-Depends: oatpp
|
32
ports/oatpp-consul/portfile.cmake
Normal file
32
ports/oatpp-consul/portfile.cmake
Normal file
@ -0,0 +1,32 @@
|
||||
set(OATPP_VERSION "1.0.0")
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO oatpp/oatpp-consul
|
||||
REF 4fb420fdf9286f0e0f8d2a1dbd30a56024f10529 # 1.0.0
|
||||
SHA512 fa26ed7b12ed1cc6bf0a969628b4e70a911bfba76562a6c7406a13875dae88f5125349107e3278362441b518d556ac75c926994b21f93e02e2decc80883e3bfa
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON")
|
||||
else()
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
"-DOATPP_BUILD_TESTS:BOOL=OFF"
|
||||
"-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS"
|
||||
"-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}"
|
||||
)
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-consul-${OATPP_VERSION})
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
4
ports/oatpp-curl/CONTROL
Normal file
4
ports/oatpp-curl/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: oatpp-curl
|
||||
Version: 1.0.0
|
||||
Description: Oat++ Modern web framework curl module to use libcurl as a RequestExecutor on the oatpp's ApiClient
|
||||
Build-Depends: curl,oatpp
|
33
ports/oatpp-curl/curl-submodule-no-pkg-config-in-vcpkg.patch
Normal file
33
ports/oatpp-curl/curl-submodule-no-pkg-config-in-vcpkg.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 477064a..5da99e9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -95,8 +95,26 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n")
|
||||
##############################
|
||||
## Find libcurl dependency
|
||||
|
||||
-include(FindPkgConfig)
|
||||
-pkg_check_modules(PKG_CURL REQUIRED libcurl)
|
||||
+if (VCPKG_TOOLCHAIN)
|
||||
+ find_package(CURL REQUIRED)
|
||||
+ if (CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$")
|
||||
+ get_filename_component(PKG_CURL_LIBRARIES ${CURL_LIBRARY_DEBUG} NAME)
|
||||
+ get_filename_component(PKG_CURL_LIBRARY_DIR ${CURL_LIBRARY_DEBUG} DIRECTORY)
|
||||
+ else()
|
||||
+ get_filename_component(PKG_CURL_LIBRARIES ${CURL_LIBRARY_RELEASE} NAME)
|
||||
+ get_filename_component(PKG_CURL_LIBRARY_DIR ${CURL_LIBRARY_RELEASE} DIRECTORY)
|
||||
+ endif()
|
||||
+ if (PKG_CURL_LIBRARIES MATCHES [[^.*\.a$]])
|
||||
+ string(LENGTH ${PKG_CURL_LIBRARIES} _LEN)
|
||||
+ math(EXPR _LEN "${_LEN} - 5")
|
||||
+ string(SUBSTRING ${PKG_CURL_LIBRARIES} 3 ${_LEN} PKG_CURL_LIBRARIES)
|
||||
+ endif()
|
||||
+ set(PKG_CURL_VERSION ${CURL_VERSION})
|
||||
+ set(PKG_CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIRS})
|
||||
+else()
|
||||
+ include(FindPkgConfig)
|
||||
+ pkg_check_modules(PKG_CURL REQUIRED libcurl)
|
||||
+endif()
|
||||
|
||||
message("[libcurl] libcurl found:")
|
||||
message("[libcurl] LIBRARIES=${PKG_CURL_LIBRARIES}")
|
33
ports/oatpp-curl/portfile.cmake
Normal file
33
ports/oatpp-curl/portfile.cmake
Normal file
@ -0,0 +1,33 @@
|
||||
set(OATPP_VERSION "1.0.0")
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO oatpp/oatpp-curl
|
||||
REF 03a3f336be70c71d0547489aa0ed50206f46dcf8 # 1.0.0
|
||||
SHA512 799cbddeb6e9d90eb43911845dd33ee272c4e86c86a07bb710ceb8c0e1722cda15412fdca10c4228a77f38e3b9e3d5d5248c8cd4366cbb9c369db4a830e29496
|
||||
HEAD_REF master
|
||||
PATCHES "curl-submodule-no-pkg-config-in-vcpkg.patch"
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON")
|
||||
else()
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
"-DOATPP_BUILD_TESTS:BOOL=OFF"
|
||||
"-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS"
|
||||
"-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}"
|
||||
)
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-curl-${OATPP_VERSION})
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
4
ports/oatpp-libressl/CONTROL
Normal file
4
ports/oatpp-libressl/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: oatpp-libressl
|
||||
Version: 1.0.0
|
||||
Build-Depends: libressl, oatpp
|
||||
Description: Oat++ libressl module providing secure server and client connection providers
|
@ -0,0 +1,63 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4663a65..b91077a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -95,19 +95,25 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n")
|
||||
##############################
|
||||
## Find Libressl dependency
|
||||
|
||||
-include(FindPkgConfig)
|
||||
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/module")
|
||||
-
|
||||
-find_package(LibreSSL 3.0.0 REQUIRED)
|
||||
-
|
||||
-message("LIBRESSL_INCLUDE_DIR=${LIBRESSL_INCLUDE_DIR}")
|
||||
-message("LIBRESSL_TLS_LIBRARY=${LIBRESSL_TLS_LIBRARY}")
|
||||
-message("LIBRESSL_SSL_LIBRARY=${LIBRESSL_SSL_LIBRARY}")
|
||||
-message("LIBRESSL_CRYPTO_LIBRARY=${LIBRESSL_CRYPTO_LIBRARY}")
|
||||
-message("LIBRESSL_LIBRARIES=${LIBRESSL_LIBRARIES}")
|
||||
-message("LIBRESSL_VERSION=${LIBRESSL_VERSION}")
|
||||
-
|
||||
-message("\n############################################################################\n")
|
||||
+find_file(LIBRESSL_INCLUDE_DIR tls.h)
|
||||
+if (NOT LIBRESSL_INCLUDE_DIR)
|
||||
+ find_file(_OPENSSL_SSL_INCLUDE_FILE openssl/ssl.h)
|
||||
+ if (NOT _OPENSSL_SSL_INCLUDE_FILE)
|
||||
+ message(FATAL_ERROR "LibreSSL and OpenSSL not found. LibreSSL must be installed.")
|
||||
+ else()
|
||||
+ message(FATAL_ERROR "OpenSSL installed instead of LibreSSL. oatpp-libressl requires LibreSSL.")
|
||||
+ endif()
|
||||
+endif()
|
||||
+get_filename_component(LIBRESSL_INCLUDE_DIR ${LIBRESSL_INCLUDE_DIR} DIRECTORY)
|
||||
+find_library(LIBRESSL_TLS_LIBRARY NAMES tls tls-21 tls-20 tls-19)
|
||||
+find_library(LIBRESSL_SSL_LIBRARY NAMES ssl ssl-49 ssl-48 ssl-47)
|
||||
+find_library(LIBRESSL_CRYPTO_LIBRARY NAMES crypto crypto-47 crypto-46 crypto-45)
|
||||
+find_library(LIBRESSL_LIBRARIES "${LIBRESSL_CRYPTO_LIBRARY};${LIBRESSL_SSL_LIBRARY};${LIBRESSL_TLS_LIBRARY}")
|
||||
+message(STATUS "LIBRESSL_INCLUDE_DIR=${LIBRESSL_INCLUDE_DIR}")
|
||||
+message(STATUS "LIBRESSL_TLS_LIBRARY=${LIBRESSL_TLS_LIBRARY}")
|
||||
+message(STATUS "LIBRESSL_SSL_LIBRARY=${LIBRESSL_SSL_LIBRARY}")
|
||||
+message(STATUS "LIBRESSL_CRYPTO_LIBRARY=${LIBRESSL_CRYPTO_LIBRARY}")
|
||||
+message(STATUS "LIBRESSL_LIBRARIES=${LIBRESSL_LIBRARIES}")
|
||||
|
||||
###################################################################################################
|
||||
## define targets
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index ace3b13..489fbb1 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -30,10 +30,12 @@ target_include_directories(${OATPP_THIS_MODULE_NAME}
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
||||
+target_include_directories(${OATPP_THIS_MODULE_NAME}
|
||||
+ SYSTEM PRIVATE "${LIBRESSL_INCLUDE_DIR}"
|
||||
+)
|
||||
+
|
||||
target_link_libraries(${OATPP_THIS_MODULE_NAME}
|
||||
- PUBLIC LibreSSL::TLS
|
||||
- PUBLIC LibreSSL::SSL
|
||||
- PUBLIC LibreSSL::Crypto
|
||||
+ PUBLIC "${LIBRESSL_TLS_LIBRARY}" "${LIBRESSL_SSL_LIBRARY}" "${LIBRESSL_CRYPTO_LIBRARY}"
|
||||
)
|
||||
|
||||
#######################################################################################################
|
36
ports/oatpp-libressl/portfile.cmake
Normal file
36
ports/oatpp-libressl/portfile.cmake
Normal file
@ -0,0 +1,36 @@
|
||||
set(OATPP_VERSION "1.0.0")
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
# get the source
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO oatpp/oatpp-libressl
|
||||
REF 2cf02b6fd08bb9be29bdbe5188f35f2155c0c843 # 1.0.0
|
||||
SHA512 053d017690d318edeeda63f782ee4845280b0f405e02249b18c30ac3d88cbfb1d3090bb6b60c0c8742f73357d60fa1695c369bef56a5ab7985d9773ea1fd52a2
|
||||
HEAD_REF master
|
||||
PATCHES "libress-submodule-downgrade-required-libressl-version.patch"
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON")
|
||||
else()
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
"-DOATPP_BUILD_TESTS:BOOL=OFF"
|
||||
"-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS"
|
||||
"-DLIBRESSL_ROOT_DIR=${CURRENT_INSTALLED_DIR}"
|
||||
"-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}"
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-libressl-${OATPP_VERSION})
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
4
ports/oatpp-mbedtls/CONTROL
Normal file
4
ports/oatpp-mbedtls/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: oatpp-mbedtls
|
||||
Version: 1.0.0
|
||||
Build-Depends: mbedtls, oatpp
|
||||
Description: Oat++ Mbed TLS submodule providing secure server and client connection providers
|
31
ports/oatpp-mbedtls/portfile.cmake
Normal file
31
ports/oatpp-mbedtls/portfile.cmake
Normal file
@ -0,0 +1,31 @@
|
||||
set(OATPP_VERSION "1.0.0")
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO oatpp/oatpp-mbedtls
|
||||
REF f4223fe43c3db3d5a8638f5682ab19ce9f2c8342 # 1.0.0
|
||||
SHA512 ff36d74d295f4351b2b10df585c76704f9f63a65fa91856c32f65d914e1cae8bcdd866310d8a2d6ac6f1b4af1ebc610b607327669be6d13b1773dd5117707c25
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON")
|
||||
else()
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
"-DOATPP_BUILD_TESTS:BOOL=OFF"
|
||||
"-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}"
|
||||
)
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-mbedtls-${OATPP_VERSION})
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
4
ports/oatpp-swagger/CONTROL
Normal file
4
ports/oatpp-swagger/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: oatpp-swagger
|
||||
Version: 1.0.0
|
||||
Description: Oat++ OpenApi (Swagger) UI submodule
|
||||
Build-Depends: oatpp
|
33
ports/oatpp-swagger/portfile.cmake
Normal file
33
ports/oatpp-swagger/portfile.cmake
Normal file
@ -0,0 +1,33 @@
|
||||
set(OATPP_VERSION "1.0.0")
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO oatpp/oatpp-swagger
|
||||
REF 8e4a5d32f82ff71ad645fbfb7e5257a6b611ecfd # 1.0.0
|
||||
SHA512 9ae31686689862667871531e92625239fd8b54a6ed77b54ab85ecb09633afae0d450be5bcee6e266d01b2edc602bae6c0ab59dd12f926d689f7183373a39bb21
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON")
|
||||
else()
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
"-DOATPP_BUILD_TESTS:BOOL=OFF"
|
||||
"-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS"
|
||||
"-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}"
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-swagger-${OATPP_VERSION})
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
4
ports/oatpp-websocket/CONTROL
Normal file
4
ports/oatpp-websocket/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: oatpp-websocket
|
||||
Version: 1.0.0
|
||||
Description: Oat++ websocket module
|
||||
Build-Depends: oatpp
|
32
ports/oatpp-websocket/portfile.cmake
Normal file
32
ports/oatpp-websocket/portfile.cmake
Normal file
@ -0,0 +1,32 @@
|
||||
set(OATPP_VERSION "1.0.0")
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO oatpp/oatpp-websocket
|
||||
REF d047321db5ca9194b0035eea481623983a59c82c # 1.0.0
|
||||
SHA512 76e411557a790fccbd346241826a89a01f707ecb6bf3295fd4c7af706d376d5cb21070ee375b45ce1aa14ad8d79db753c1adbc2b503b79c8b8e5ae59a044b03b
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON")
|
||||
else()
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
"-DOATPP_BUILD_TESTS:BOOL=OFF"
|
||||
"-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}"
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-websocket-${OATPP_VERSION})
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
3
ports/oatpp/CONTROL
Normal file
3
ports/oatpp/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: oatpp
|
||||
Version: 1.0.0
|
||||
Description: Modern web framework
|
33
ports/oatpp/portfile.cmake
Normal file
33
ports/oatpp/portfile.cmake
Normal file
@ -0,0 +1,33 @@
|
||||
set(OATPP_VERSION "1.0.0")
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO oatpp/oatpp
|
||||
REF 5a9f042a78e7a47d1788407c99f6257fc7b40fa9 # 1.0.0
|
||||
SHA512 133f69e43608b3b5eda929952c8fb49f08bbc114d75b326293a7ddf5f40b7b94ffcff7df2d999c91195ba9939166143ad173b27a962f4fb661f731f63a44116e
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON")
|
||||
else()
|
||||
set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
"-DOATPP_BUILD_TESTS:BOOL=OFF"
|
||||
"-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS"
|
||||
"-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}"
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-${OATPP_VERSION})
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
Loading…
Reference in New Issue
Block a user