From 894f110c02630310b5c614e362088e2a23970104 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Wed, 13 Mar 2019 06:46:54 +0800 Subject: [pangolin]Fix usage bug:include path has one more ../, add usage file. (#5647) --- ports/pangolin/CONTROL | 2 +- ports/pangolin/fix-includepath-error.patch | 13 +++++++++++++ ports/pangolin/portfile.cmake | 5 ++++- ports/pangolin/usage | 5 +++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 ports/pangolin/fix-includepath-error.patch create mode 100644 ports/pangolin/usage diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL index f7f242293..1cbf2ad98 100644 --- a/ports/pangolin/CONTROL +++ b/ports/pangolin/CONTROL @@ -1,4 +1,4 @@ Source: pangolin -Version: 0.5-4 +Version: 0.5-5 Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg Description: Lightweight GUI Library diff --git a/ports/pangolin/fix-includepath-error.patch b/ports/pangolin/fix-includepath-error.patch new file mode 100644 index 000000000..debb3348a --- /dev/null +++ b/ports/pangolin/fix-includepath-error.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index dd08d31..7f364a7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -506,7 +506,7 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY IMMEDIATE ) + + # Install tree config +-set( EXPORT_LIB_INC_DIR "\${PROJECT_CMAKE_DIR}/${REL_INCLUDE_DIR}" ) ++set( EXPORT_LIB_INC_DIR "\${PROJECT_CMAKE_DIR}/../../include" ) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake @ONLY ) + diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake index b25378c56..cd6a4fe78 100644 --- a/ports/pangolin/portfile.cmake +++ b/ports/pangolin/portfile.cmake @@ -6,7 +6,9 @@ vcpkg_from_github( REF v0.5 SHA512 7ebeec108f33f1aa8b1ad08e3ca128a837b22d33e3fc580021f981784043b023a1bf563bbfa8b51d46863db770b336d24fc84ee3d836b85e0da1848281b2a5b2 HEAD_REF master - PATCHES deprecated_constants.patch # Change from upstream pangolin to address build failures from latest ffmpeg library + PATCHES + deprecated_constants.patch # Change from upstream pangolin to address build failures from latest ffmpeg library + fix-includepath-error.patch # include path has one more ../ ) file(REMOVE ${SOURCE_PATH}/CMakeModules/FindGLEW.cmake) @@ -55,4 +57,5 @@ file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/include/pangolin/p # Put the license file where vcpkg expects it file(COPY ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/Pangolin/) +file(COPY ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/Pangolin/) file(RENAME ${CURRENT_PACKAGES_DIR}/share/Pangolin/LICENCE ${CURRENT_PACKAGES_DIR}/share/Pangolin/copyright) diff --git a/ports/pangolin/usage b/ports/pangolin/usage new file mode 100644 index 000000000..93db9b75b --- /dev/null +++ b/ports/pangolin/usage @@ -0,0 +1,5 @@ +The package pangolin is compatible with built-in CMake targets: + + find_package(Pangolin CONFIG REQUIRED) + target_link_libraries(main PRIVATE pangolin) + target_include_directories(main PRIVATE ${Pangolin_INCLUDE_DIRS}) -- cgit v1.2.3