proj: fix unbalance cmake config

This commit is contained in:
Đoàn Trần Công Danh 2023-08-26 22:05:11 +07:00
parent 70147df32b
commit ad48cabf6d
2 changed files with 13 additions and 6 deletions

View file

@ -1,9 +1,15 @@
--- a/cmake/project-config.cmake.in --- a/cmake/project-config.cmake.in
+++ b/cmake/project-config.cmake.in +++ b/cmake/project-config.cmake.in
@@ -19,30 +19,6 @@ include(CMakeFindDependencyMacro) @@ -13,37 +13,6 @@ endif()
# Cf https://gitlab.kitware.com/cmake/cmake/-/issues/17612
cmake_policy(PUSH) include(CMakeFindDependencyMacro)
cmake_policy(SET CMP0012 NEW)
-# We cannot have a find_dependency() call between cmake_policy(PUSH)/cmake_policy(POP)
-# because find_dependency() issues a return() on failure, which results in
-# imbalanced push/pop
-# Cf https://gitlab.kitware.com/cmake/cmake/-/issues/17612
-cmake_policy(PUSH)
-cmake_policy(SET CMP0012 NEW)
-if("@ENABLE_TIFF@") -if("@ENABLE_TIFF@")
- set(PROJ_CONFIG_FIND_TIFF_DEP ON) - set(PROJ_CONFIG_FIND_TIFF_DEP ON)
-endif() -endif()
@ -28,6 +34,7 @@
- ) - )
- endif() - endif()
-endif() -endif()
-
function(set_variable_from_rel_or_absolute_path var root rel_or_abs_path) function(set_variable_from_rel_or_absolute_path var root rel_or_abs_path)
if(IS_ABSOLUTE "${rel_or_abs_path}") if(IS_ABSOLUTE "${rel_or_abs_path}")
set(${var} "${rel_or_abs_path}" PARENT_SCOPE)

View file

@ -1,7 +1,7 @@
# Template file for 'proj' # Template file for 'proj'
pkgname=proj pkgname=proj
version=9.2.1 version=9.2.1
revision=2 revision=3
build_style=cmake build_style=cmake
configure_args="-DBUILD_TESTING=OFF" configure_args="-DBUILD_TESTING=OFF"
hostmakedepends="python3" hostmakedepends="python3"