diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-03-23 06:53:43 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-03-23 15:11:17 -0700 |
| commit | 0595f955cc7bdecb807ab3d04404298a805ec4b6 (patch) | |
| tree | 637281021fc6eaf7918e94a9eddc7d926d01ef33 /ports/ccfits | |
| parent | 7c6dc9543d13bd4793cd9051f876666c6bb370c0 (diff) | |
| download | vcpkg-0595f955cc7bdecb807ab3d04404298a805ec4b6.tar.gz vcpkg-0595f955cc7bdecb807ab3d04404298a805ec4b6.zip | |
[paho-mqtt][cfitsio][ccfits] Reduce conflicts in headers (unistd.h, etc)
Diffstat (limited to 'ports/ccfits')
| -rw-r--r-- | ports/ccfits/CONTROL | 2 | ||||
| -rw-r--r-- | ports/ccfits/portfile.cmake | 33 |
2 files changed, 14 insertions, 21 deletions
diff --git a/ports/ccfits/CONTROL b/ports/ccfits/CONTROL index 16b36bc8a..5cd10f63d 100644 --- a/ports/ccfits/CONTROL +++ b/ports/ccfits/CONTROL @@ -1,4 +1,4 @@ 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++. Build-Depends: cfitsio diff --git a/ports/ccfits/portfile.cmake b/ports/ccfits/portfile.cmake index 6bd9bd170..6aeecfd62 100644 --- a/ports/ccfits/portfile.cmake +++ b/ports/ccfits/portfile.cmake @@ -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) #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/CCfits-2.5.tar.gz.extracted) +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits) @@ -31,18 +18,16 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) ) endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA + OPTIONS + -DCFITSIO_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/cfitsio ) 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}/debug/bin) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/bin/CCfits.dll) @@ -52,5 +37,13 @@ endif() # Remove duplicate include files 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 file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccfits RENAME copyright) |
