mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
[paho-mqtt][cfitsio][ccfits] Reduce conflicts in headers (unistd.h, etc)
This commit is contained in:
parent
7c6dc9543d
commit
0595f955cc
@ -1,4 +1,4 @@
|
|||||||
Source: ccfits
|
Source: ccfits
|
||||||
Version: 2.5-1
|
Version: 2.5-2
|
||||||
Description: CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++.
|
Description: CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++.
|
||||||
Build-Depends: cfitsio
|
Build-Depends: cfitsio
|
||||||
|
@ -1,19 +1,6 @@
|
|||||||
# Common Ambient Variables:
|
|
||||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
|
||||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
|
||||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
|
||||||
# PORT = current port name (zlib, etc)
|
|
||||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
|
||||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
|
||||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
|
||||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
|
||||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
|
||||||
#
|
|
||||||
|
|
||||||
include(vcpkg_common_functions)
|
include(vcpkg_common_functions)
|
||||||
#removes current source to prevent static builds from using patched source code
|
#removes current source to prevent static builds from using patched source code
|
||||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits)
|
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src)
|
||||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits-2.5.tar.gz.extracted)
|
|
||||||
|
|
||||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits)
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits)
|
||||||
|
|
||||||
@ -31,18 +18,16 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
PREFER_NINJA
|
||||||
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
OPTIONS
|
||||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
-DCFITSIO_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/cfitsio
|
||||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
|
||||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/bin/CCfits.dll)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/bin/CCfits.dll)
|
||||||
@ -52,5 +37,13 @@ endif()
|
|||||||
# Remove duplicate include files
|
# Remove duplicate include files
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
|
|
||||||
|
# Patch installed headers to look in the correct subdirectory
|
||||||
|
file(GLOB HEADERS ${CURRENT_PACKAGES_DIR}/include/CCfits/*)
|
||||||
|
foreach(HEADER IN LISTS HEADERS)
|
||||||
|
file(READ "${HEADER}" _contents)
|
||||||
|
string(REPLACE "\"fitsio.h\"" "\"cfitsio/fitsio.h\"" _contents "${_contents}")
|
||||||
|
file(WRITE "${HEADER}" "${_contents}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
# Handle copyright
|
# Handle copyright
|
||||||
file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccfits RENAME copyright)
|
file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccfits RENAME copyright)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Source: cfitsio
|
Source: cfitsio
|
||||||
Version: 3.410-1
|
Version: 3.410-2
|
||||||
Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format
|
Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format
|
||||||
|
@ -15,14 +15,19 @@ vcpkg_configure_cmake(
|
|||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
|
||||||
# Remove duplicate include files
|
# Remove duplicate include files
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/unistd.h)
|
||||||
|
|
||||||
|
# cfitsio uses very common names for its headers, so they must be moved to a subdirectory
|
||||||
|
file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/cfitsio)
|
||||||
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include)
|
||||||
|
file(RENAME ${CURRENT_PACKAGES_DIR}/cfitsio ${CURRENT_PACKAGES_DIR}/include/cfitsio)
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||||
# move DLLs to bin directories for dynamic builds
|
# move DLLs to bin directories for dynamic builds
|
||||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll)
|
||||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Handle copyright
|
# Handle copyright
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Source: paho-mqtt
|
Source: paho-mqtt
|
||||||
Version: 1.2.0-2
|
Version: 1.2.0-3
|
||||||
Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things
|
Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things
|
||||||
Build-Depends: openssl
|
Build-Depends: openssl
|
||||||
|
@ -48,7 +48,6 @@ file(GLOB DEBUG_LIBS
|
|||||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib"
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib"
|
||||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib"
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib"
|
||||||
)
|
)
|
||||||
file(GLOB HEADERS "${SOURCE_PATH}/*/*.h")
|
|
||||||
if(DLLS)
|
if(DLLS)
|
||||||
file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||||
endif()
|
endif()
|
||||||
@ -61,7 +60,7 @@ endif()
|
|||||||
if(DEBUG_LIBS)
|
if(DEBUG_LIBS)
|
||||||
file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||||
endif()
|
endif()
|
||||||
file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
file(COPY ${SOURCE_PATH}/src/MQTTAsync.h ${SOURCE_PATH}/src/MQTTClient.h ${SOURCE_PATH}/src/MQTTClientPersistence.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user