vcpkg/ports/pcl/pcl_config.patch

34 lines
1.5 KiB
Diff
Raw Normal View History

diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in
2020-08-19 06:20:22 +08:00
index 9f78fcf..0cbe94f 100644
--- a/PCLConfig.cmake.in
+++ b/PCLConfig.cmake.in
2020-08-19 06:20:22 +08:00
@@ -396,25 +396,16 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR)
if(WIN32 AND NOT MINGW)
# PCLConfig.cmake is installed to PCL_ROOT/cmake
get_filename_component(PCL_ROOT "${PCL_DIR}" PATH)
+ get_filename_component(PCL_ROOT "${PCL_ROOT}" PATH)
2020-08-19 06:20:22 +08:00
else()
# PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y
get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
2020-08-19 06:20:22 +08:00
endif()
# check whether PCLConfig.cmake is found into a PCL installation or in a build tree
-if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h")
2020-08-19 06:20:22 +08:00
- # Found a PCL installation
- # pcl_message("Found a PCL installation")
- set(PCL_CONF_INCLUDE_DIR "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
- set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@")
- if(EXISTS "${PCL_ROOT}/3rdParty")
- set(PCL_ALL_IN_ONE_INSTALLER ON)
2020-08-19 06:20:22 +08:00
- endif()
-elseif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h")
- # Found a non-standard (likely ANDROID) PCL installation
- # pcl_message("Found a PCL installation")
2020-08-19 06:20:22 +08:00
+if(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h")
set(PCL_CONF_INCLUDE_DIR "${PCL_ROOT}/include")
- set(PCL_LIBRARY_DIRS "${PCL_ROOT}/lib")
+ set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@" "${PCL_ROOT}/debug/@LIB_INSTALL_DIR@")
if(EXISTS "${PCL_ROOT}/3rdParty")
set(PCL_ALL_IN_ONE_INSTALLER ON)
2020-08-19 06:20:22 +08:00
endif()