mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:49:08 +08:00
[openmama] Feature use cmake for openmama (#13034)
This commit is contained in:
parent
1999412506
commit
fc7bab58e2
@ -1,5 +1,7 @@
|
||||
Source: openmama
|
||||
Version: 6.3.0
|
||||
Port-Version: 1
|
||||
Build-Depends: libevent, apr, qpid-proton
|
||||
Supports: windows&(x64|x86)
|
||||
Homepage: https://github.com/OpenMAMA/OpenMAMA
|
||||
Description: OpenMAMA is a high performance vendor neutral lightweight wrapper that provides a common API interface to different middleware and messaging solutions across a variety of platforms and languages.
|
||||
|
@ -11,74 +11,43 @@ vcpkg_from_github(
|
||||
HEAD_REF next
|
||||
)
|
||||
|
||||
set(OPENMAMA_TARGET_ARCH ${TRIPLET_SYSTEM_ARCH})
|
||||
if(${TRIPLET_SYSTEM_ARCH} STREQUAL x64)
|
||||
set(OPENMAMA_TARGET_ARCH x86_64)
|
||||
endif()
|
||||
|
||||
# Clean from any previous builds
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${SCONS}
|
||||
-c
|
||||
target_arch=${OPENMAMA_TARGET_ARCH}
|
||||
libevent_home=${CURRENT_INSTALLED_DIR}
|
||||
apr_home=${CURRENT_INSTALLED_DIR}
|
||||
qpid_home=${CURRENT_INSTALLED_DIR}
|
||||
vcpkg_build=y
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}
|
||||
LOGNAME clean-${TARGET_TRIPLET}.log
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DPROTON_ROOT=${CURRENT_INSTALLED_DIR}
|
||||
-DAPR_ROOT=${CURRENT_INSTALLED_DIR}
|
||||
-DINSTALL_RUNTIME_DEPENDENCIES=OFF
|
||||
-DFLEX_EXECUTABLE=${FLEX}
|
||||
-DWITH_EXAMPLES=OFF
|
||||
-DWITH_TESTTOOLS=OFF
|
||||
)
|
||||
|
||||
# This build
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${SCONS}
|
||||
with_unittest=False
|
||||
with_examples=False
|
||||
product=mamda
|
||||
lex=${FLEX}
|
||||
middleware=qpid
|
||||
buildtype=dynamic,dynamic-debug
|
||||
prefix=\#install
|
||||
with_dependency_runtimes=False
|
||||
target_arch=${OPENMAMA_TARGET_ARCH}
|
||||
libevent_home=${CURRENT_INSTALLED_DIR}
|
||||
apr_home=${CURRENT_INSTALLED_DIR}
|
||||
qpid_home=${CURRENT_INSTALLED_DIR}
|
||||
vcpkg_build=y
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}
|
||||
LOGNAME build-${TARGET_TRIPLET}.log
|
||||
)
|
||||
|
||||
# Remove dependency files which build system creates for convenience
|
||||
file(REMOVE ${SOURCE_PATH}/install/bin/dynamic/libapr-1.dll)
|
||||
file(REMOVE ${SOURCE_PATH}/install/bin/dynamic/libapr-1.pdb)
|
||||
file(REMOVE ${SOURCE_PATH}/install/bin/dynamic-debug/libapr-1.dll)
|
||||
file(REMOVE ${SOURCE_PATH}/install/bin/dynamic-debug/libapr-1.pdb)
|
||||
file(REMOVE ${SOURCE_PATH}/install/bin/dynamic/qpid-proton.dll)
|
||||
file(REMOVE ${SOURCE_PATH}/install/bin/dynamic-debug/qpid-protond.dll)
|
||||
|
||||
# Custom install target - the build system doesn't really
|
||||
# do prefixes properly and it has a different directory
|
||||
# structure than vcpkg expects so reorganizing here
|
||||
file(COPY ${SOURCE_PATH}/install/include
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${SOURCE_PATH}/install/lib/dynamic/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(COPY ${SOURCE_PATH}/install/lib/dynamic-debug/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(COPY ${SOURCE_PATH}/install/bin/dynamic/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
||||
FILES_MATCHING PATTERN "*.dll")
|
||||
file(COPY ${SOURCE_PATH}/install/bin/dynamic-debug/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
FILES_MATCHING PATTERN "*.dll")
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Copy across license files and copyright
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/openmama)
|
||||
file(COPY ${SOURCE_PATH}/install/LICENSE.md
|
||||
${SOURCE_PATH}/install/LICENSE-3RD-PARTY.txt
|
||||
file(COPY ${SOURCE_PATH}/LICENSE.md
|
||||
${SOURCE_PATH}/LICENSE-3RD-PARTY.txt
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmama/)
|
||||
file(COPY ${SOURCE_PATH}/install/LICENSE.md
|
||||
file(COPY ${SOURCE_PATH}/LICENSE.md
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmama/copyright)
|
||||
|
||||
# Clean up LICENSE file - vcpkg doesn't expect it to be there
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE.MD ${CURRENT_PACKAGES_DIR}/debug/LICENSE.MD)
|
||||
|
||||
# Temporary workaround until upstream project puts dll in right place
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libmamaplugindqstrategymd.dll")
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libmamaplugindqstrategymd.dll ${CURRENT_PACKAGES_DIR}/bin/libmamaplugindqstrategymd.dll)
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libmamaplugindqstrategymd.dll")
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmamaplugindqstrategymd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmamaplugindqstrategymd.dll)
|
||||
endif()
|
||||
|
||||
# Vcpkg does not expect include files to be in the debug directory
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# Vcpkg does not like this header name and shouldn't be required anyway, so remove it
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/platform.h")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
@ -1214,10 +1214,6 @@ openexr:arm-uwp=fail
|
||||
openexr:x64-uwp=fail
|
||||
opengl:arm64-windows=fail
|
||||
opengl:arm-uwp=fail
|
||||
openmama:x64-windows=fail
|
||||
openmama:x86-windows=fail
|
||||
openmama:x64-linux=fail
|
||||
openmama:x64-osx=fail
|
||||
openmesh:arm64-windows=fail
|
||||
openmesh:arm-uwp=fail
|
||||
openmesh:x64-uwp=fail
|
||||
|
Loading…
Reference in New Issue
Block a user