mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 00:22:55 +08:00
3e2409f47d
* [vtk-m] new port vtk-m * [VTK] Update to 9.0 * include local buildtree changes * [pcl] disable VTK due to API changes in VTK 9.0 * [vtk-m] add supports field to be only x64 * [vtk-dicom] add python executable. * fix vtkm dependency * [vtk-dicom] fix missing std:: namespace * [vtk-m] add uwp to unsupported triplets * [vtk] add pegtl include patch, reenable IOMotionFX * remove hdf5 changes for testing * use different pgetl patch which redirects to the installed config of pegtl * [pegtl-2] version file needs renaming too * [vtk] change dependency to pgetl-2 and fix the patch * [vtk] put in hdf5 fix again and correct manually installed include files * remove deprecated function to retrigger CI * [lz4] correctly lowercase the lz4 config * [vtk] remove unnecessary code * [pegtl-2] add homepage * [pegtl] modernize portfiles * [vtk-dicom] add homepage * [vtk-dicom] modernize portfile * [vtk-m] remove empty build depends * [vtk] try fixing the permission issue * bump control * Update FindHDF5.cmake * Update pegtl.patch * Update ports/vtk/pegtl.patch Co-authored-by: nicole mazzuca <mazzucan@outlook.com> * [vtk] refactor portfile, added a few deps on [core] and added feature cuda * [vtk] pegtl.patch: Add additional found message * [vtk-m] add more documentation comments * [vtk] fix string replacement Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
72 lines
2.7 KiB
Diff
72 lines
2.7 KiB
Diff
diff --git a/CMake/FindPEGTL.cmake b/CMake/FindPEGTL.cmake
|
|
index 73eee02f7..22d8bc159 100644
|
|
--- a/CMake/FindPEGTL.cmake
|
|
+++ b/CMake/FindPEGTL.cmake
|
|
@@ -19,31 +19,40 @@
|
|
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
|
|
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
|
|
|
|
-find_path(PEGTL_INCLUDE_DIR
|
|
- NAMES pegtl/version.hpp
|
|
- PATH_SUFFIXES tao
|
|
- DOC "Path to PEGTL headers")
|
|
-mark_as_advanced(PEGTL_INCLUDE_DIR)
|
|
+message(STATUS "Searching for PEGTL")
|
|
+find_package(PEGTL CONFIG NAMES PEGTL-2)
|
|
+if(TARGET taocpp::pegtl)
|
|
+ message(STATUS "Searching for PEGTL - found target taocpp::pegtl")
|
|
+ set_target_properties(taocpp::pegtl PROPERTIES IMPORTED_GLOBAL TRUE)
|
|
+ add_library(PEGTL::PEGTL ALIAS taocpp::pegtl)
|
|
+else()
|
|
+ find_path(PEGTL_INCLUDE_DIR
|
|
+ NAMES pegtl/version.hpp
|
|
+ PATH_SUFFIXES tao
|
|
+ DOC "Path to PEGTL headers")
|
|
+ mark_as_advanced(PEGTL_INCLUDE_DIR)
|
|
|
|
-if (PEGTL_INCLUDE_DIR)
|
|
- file(STRINGS "${PEGTL_INCLUDE_DIR}/pegtl/version.hpp" _pegtl_version_header
|
|
- REGEX "TAO_PEGTL_VERSION")
|
|
- string(REGEX MATCH "define[ \t]+TAO_PEGTL_VERSION[ \t]+\"([0-9.]+)\"" _pegtl_version_match "${_pegtl_version_header}")
|
|
- set(PEGTL_VERSION "${CMAKE_MATCH_1}")
|
|
- unset(_pegtl_version_header)
|
|
- unset(_pegtl_version_match)
|
|
-endif ()
|
|
+ if (PEGTL_INCLUDE_DIR)
|
|
+ file(STRINGS "${PEGTL_INCLUDE_DIR}/pegtl/version.hpp" _pegtl_version_header
|
|
+ REGEX "TAO_PEGTL_VERSION")
|
|
+ string(REGEX MATCH "define[ \t]+TAO_PEGTL_VERSION[ \t]+\"([0-9.]+)\"" _pegtl_version_match "${_pegtl_version_header}")
|
|
+ set(PEGTL_VERSION "${CMAKE_MATCH_1}")
|
|
+ unset(_pegtl_version_header)
|
|
+ unset(_pegtl_version_match)
|
|
+ endif ()
|
|
|
|
-include(FindPackageHandleStandardArgs)
|
|
-find_package_handle_standard_args(PEGTL
|
|
- REQUIRED_VARS PEGTL_INCLUDE_DIR
|
|
- VERSION_VAR PEGTL_VERSION)
|
|
+ include(FindPackageHandleStandardArgs)
|
|
+ find_package_handle_standard_args(PEGTL
|
|
+ REQUIRED_VARS PEGTL_INCLUDE_DIR
|
|
+ VERSION_VAR PEGTL_VERSION)
|
|
|
|
-if (PEGTL_FOUND)
|
|
- set(PEGTL_INCLUDE_DIRS "${PEGTL_INCLUDE_DIR}")
|
|
- if (NOT TARGET PEGTL::PEGTL)
|
|
- add_library(PEGTL::PEGTL INTERFACE IMPORTED)
|
|
- set_target_properties(PEGTL::PEGTL PROPERTIES
|
|
- INTERFACE_INCLUDE_DIRECTORIES "${PEGTL_INCLUDE_DIR}")
|
|
- endif ()
|
|
-endif ()
|
|
+ if (PEGTL_FOUND)
|
|
+ set(PEGTL_INCLUDE_DIRS "${PEGTL_INCLUDE_DIR}")
|
|
+ if (NOT TARGET PEGTL::PEGTL)
|
|
+ add_library(PEGTL::PEGTL INTERFACE IMPORTED)
|
|
+ set_target_properties(PEGTL::PEGTL PROPERTIES
|
|
+ INTERFACE_INCLUDE_DIRECTORIES "${PEGTL_INCLUDE_DIR}")
|
|
+ endif ()
|
|
+ message(STATUS "Searching for PEGTL - found")
|
|
+ endif ()
|
|
+endif ()
|
|
\ No newline at end of file
|