aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Fitzgerald <connorwadefitzgerald@gmail.com>2019-03-17 20:05:57 -0400
committerPhil Christensen <philc@microsoft.com>2019-03-17 17:05:57 -0700
commitdcd9f41388cab5a7c7cb29d41f8502fd1187eff1 (patch)
tree57465041338c268a73a96a27fdfd717281b51772
parentd7bf0e581942fca27ef9bf79c6684c8d19ae1967 (diff)
downloadvcpkg-dcd9f41388cab5a7c7cb29d41f8502fd1187eff1.tar.gz
vcpkg-dcd9f41388cab5a7c7cb29d41f8502fd1187eff1.zip
[cppfs] Fix debug exports (#5708)
-rw-r--r--ports/cppfs/cmake-export-fix.patch46
-rw-r--r--ports/cppfs/portfile.cmake3
2 files changed, 49 insertions, 0 deletions
diff --git a/ports/cppfs/cmake-export-fix.patch b/ports/cppfs/cmake-export-fix.patch
new file mode 100644
index 000000000..344700002
--- /dev/null
+++ b/ports/cppfs/cmake-export-fix.patch
@@ -0,0 +1,46 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ea9fd15..c62c6fd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,7 +124,7 @@ endif()
+ if((UNIX AND SYSTEM_DIR_INSTALL) OR OPTION_FORCE_SYSTEM_DIR_INSTALL)
+ # Install into the system (/usr/bin or /usr/local/bin)
+ set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project>
+- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake
++ set(INSTALL_CMAKE "share/${project}") # /usr/[local]/share/<project>
+ set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/<project>
+ set(INSTALL_DATA "share/${project}") # /usr/[local]/share/<project>
+ set(INSTALL_BIN "bin") # /usr/[local]/bin
+@@ -183,7 +183,7 @@ add_subdirectory(deploy)
+ install(FILES "${PROJECT_BINARY_DIR}/VERSION" DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
+
+ # Install cmake find script for the project
+-install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev)
++# install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev)
+
+ # Install the project meta files
+ install(FILES AUTHORS DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
+diff --git a/source/cppfs/CMakeLists.txt b/source/cppfs/CMakeLists.txt
+index aa37eda..e8a59e0 100644
+--- a/source/cppfs/CMakeLists.txt
++++ b/source/cppfs/CMakeLists.txt
+@@ -283,7 +283,7 @@ perform_health_checks(
+
+ # Library
+ install(TARGETS ${target}
+- EXPORT "${target}-export" COMPONENT dev
++ EXPORT "${target}-config" COMPONENT dev
+ RUNTIME DESTINATION ${INSTALL_BIN} COMPONENT runtime
+ LIBRARY DESTINATION ${INSTALL_SHARED} COMPONENT runtime
+ ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT dev
+@@ -302,8 +302,8 @@ install(DIRECTORY
+ )
+
+ # CMake config
+-install(EXPORT ${target}-export
++install(EXPORT ${target}-config
+ NAMESPACE ${META_PROJECT_NAME}::
+- DESTINATION ${INSTALL_CMAKE}/${target}
++ DESTINATION ${INSTALL_CMAKE}
+ COMPONENT dev
+ )
diff --git a/ports/cppfs/portfile.cmake b/ports/cppfs/portfile.cmake
index 9716b6bbe..33ea7e605 100644
--- a/ports/cppfs/portfile.cmake
+++ b/ports/cppfs/portfile.cmake
@@ -8,6 +8,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
LibCrypto-fix.patch
+ cmake-export-fix.patch
)
if(${TARGET_TRIPLET} MATCHES "uwp")
@@ -40,6 +41,8 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
+vcpkg_fixup_cmake_targets()
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppfs RENAME copyright)