aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Budin <francois.budin@kitware.com>2018-04-30 10:01:39 -0400
committerFrancois Budin <francois.budin@kitware.com>2018-05-04 08:31:33 -0400
commitc02405da491c22e1337e12e02c116d65c03d777a (patch)
tree9aec70a7535ff5d6cf28eb202d75e3b5360beaa0
parenta9d989ec056246ea320a56ca7d02b161a6fee387 (diff)
downloadvcpkg-c02405da491c22e1337e12e02c116d65c03d777a.tar.gz
vcpkg-c02405da491c22e1337e12e02c116d65c03d777a.zip
Update proj4 portfile to compile on other platforms than MSVC
-rw-r--r--ports/proj4/portfile.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake
index bc4e66fcd..66b3a099b 100644
--- a/ports/proj4/portfile.cmake
+++ b/ports/proj4/portfile.cmake
@@ -40,13 +40,13 @@ vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/proj4)
# Rename library and adapt cmake configuration
-if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
+if(MSVC AND NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake _contents)
string(REPLACE "proj_4_9.lib" "proj.lib" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake "${_contents}")
endif()
-if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+if(MSVC AND NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake _contents)
string(REPLACE "proj_4_9_d.lib" "projd.lib" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake "${_contents}")
@@ -59,10 +59,10 @@ string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")"
)
file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake "${_contents}")
-if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
+if(MSVC AND NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib)
endif()
-if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+if(MSVC AND NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib)
endif()