Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proj: support for conan v2 #13795

Merged
merged 28 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
72b2e11
proj: support for conan v2
paulharris Oct 27, 2022
8f00fc2
Fix linter
paulharris Oct 27, 2022
5c60adc
Upgrade to conan 1.53.0
paulharris Nov 6, 2022
44eb7cf
Bump dependencies
paulharris Nov 6, 2022
fb3f4a4
Fix SQLite3 find-module usage
paulharris Nov 6, 2022
7364c1a
Add patch metadata
paulharris Nov 6, 2022
d264426
(#13422) Add new sources
ElliotMugner Nov 7, 2022
f73a7fa
(#13422) Update config
ElliotMugner Nov 7, 2022
94c43e7
(#13422) Reproduce patch from v9.0.1
ElliotMugner Nov 7, 2022
7c2d5c8
(#13422) Add link to patch file
ElliotMugner Nov 7, 2022
9621ea5
(#13422) Update git patch for 9.1.0
ElliotMugner Nov 7, 2022
c140aad
Fixup patch and some things for 9.1.0
paulharris Nov 8, 2022
d306c4b
Fixes for 9.1.0 data deploy (it insists on share/proj, not res)
paulharris Nov 8, 2022
56280e8
Use conan.tools.build.stdcpp_library
paulharris Nov 29, 2022
6510b23
Use f-strings
paulharris Nov 29, 2022
688baae
Apply suggestions from code review
paulharris Nov 30, 2022
0fbbd24
Removed TODO + workaround as suggested by SpaceIm, not needed thanks …
paulharris Nov 30, 2022
057ad3f
Revert previous commit, this time just remove TODO and if
paulharris Nov 30, 2022
d3fe2a2
Apply suggestions from code review
paulharris Dec 1, 2022
a5115e3
Put generate() before build()
paulharris Dec 1, 2022
21e220f
Require conan >= 1.54 and use new stdcpp_library
paulharris Dec 13, 2022
b002f29
Reverse 1.54 upgrade, CI is still on 1.53
paulharris Dec 13, 2022
abd112a
fix sqlite3 utilily injection
SpaceIm Dec 13, 2022
19e4e85
Merge pull request #4 from SpaceIm/fix/proj-sqlite3-usage-build-time
paulharris Dec 14, 2022
00f7352
Apply suggestions from code review
paulharris Dec 14, 2022
d656606
Simplify 6.x.x patch
paulharris Dec 14, 2022
7723dcd
Fix up all the scripts, take out excessive find_package() calls
paulharris Dec 14, 2022
8b06e6d
Bump libcurl dep version
paulharris Dec 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions recipes/proj/all/CMakeLists.txt

This file was deleted.

40 changes: 29 additions & 11 deletions recipes/proj/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"9.1.0":
url: "https://github.com/OSGeo/PROJ/releases/download/9.1.0/proj-9.1.0.tar.gz"
sha256: 81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553db2315
"9.0.1":
url: "https://github.com/OSGeo/PROJ/releases/download/9.0.1/proj-9.0.1.tar.gz"
sha256: "737eaacbe7906d0d6ff43f0d9ebedc5c734cccc9e6b8d7beefdec3ab22d9a6a3"
Expand Down Expand Up @@ -30,35 +33,50 @@ sources:
url: "https://github.com/OSGeo/PROJ/releases/download/6.3.1/proj-6.3.1.tar.gz"
sha256: "6de0112778438dcae30fcc6942dee472ce31399b9e5a2b67e8642529868c86f8"
patches:
"9.1.0":
- patch_file: "patches/0001-use-cmake-targets-9.1.0.patch"
patch_type: "conan"
patch_description: "Use cmake targets"
"9.0.1":
- patch_file: "patches/0001-use-cmake-targets-9.0.1.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Use cmake targets"
"9.0.0":
- patch_file: "patches/0001-use-cmake-targets-9.0.0.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Use cmake targets"
- patch_file: "patches/0002-cmake-configure-proj-pc.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "cmake configure proj pc (fixed by https://github.com/OSGeo/PROJ/pull/3087)"
"8.2.1":
- patch_file: "patches/0001-use-cmake-targets-8.2.0.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Use cmake targets"
"8.2.0":
- patch_file: "patches/0001-use-cmake-targets-8.2.0.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Use cmake targets"
"8.1.1":
- patch_file: "patches/0001-use-cmake-targets-8.1.1.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Use cmake targets"
"8.1.0":
- patch_file: "patches/0001-use-cmake-targets-8.1.0.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Use cmake targets"
"8.0.1":
- patch_file: "patches/0001-use-cmake-targets-8.0.0.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Use cmake targets"
"8.0.0":
- patch_file: "patches/0001-use-cmake-targets-8.0.0.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Use cmake targets"
"7.2.1":
- patch_file: "patches/0001-use-cmake-targets-7.2.1.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Use cmake targets"
"6.3.1":
- patch_file: "patches/0001-use-cmake-targets-6.x.x.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Use cmake targets"
216 changes: 113 additions & 103 deletions recipes/proj/all/conanfile.py

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions recipes/proj/all/patches/0001-use-cmake-targets-6.x.x.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@

include_directories(${CMAKE_CURRENT_BINARY_DIR})
source_group("CMake Files" FILES CMakeLists.txt)
@@ -440,8 +440,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
@@ -440,8 +440,9 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
target_link_libraries(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT})
endif()

-include_directories(${SQLITE3_INCLUDE_DIR})
-target_link_libraries(${PROJ_CORE_TARGET} ${SQLITE3_LIBRARY})
+target_link_libraries(${PROJ_CORE_TARGET} CONAN_PKG::nlohmann_json CONAN_PKG::sqlite3)
+find_package(nlohmann_json REQUIRED CONFIG)
+find_package(SQLite3 REQUIRED)
+target_link_libraries(${PROJ_CORE_TARGET} nlohmann_json::nlohmann_json SQLite::SQLite3)

if(MSVC AND BUILD_LIBPROJ_SHARED)
target_compile_definitions(${PROJ_CORE_TARGET}
8 changes: 6 additions & 2 deletions recipes/proj/all/patches/0001-use-cmake-targets-7.2.1.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -414,19 +414,16 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
@@ -414,19 +414,20 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
target_link_libraries(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT})
endif()

-target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${SQLITE3_INCLUDE_DIR})
-target_link_libraries(${PROJ_CORE_TARGET} ${SQLITE3_LIBRARY})
+target_link_libraries(${PROJ_CORE_TARGET} CONAN_PKG::nlohmann_json CONAN_PKG::sqlite3)
+find_package(nlohmann_json REQUIRED CONFIG)
+find_package(SQLite3 REQUIRED)
+target_link_libraries(${PROJ_CORE_TARGET} nlohmann_json::nlohmann_json SQLite::SQLite3)

if(TIFF_ENABLED)
target_compile_definitions(${PROJ_CORE_TARGET} PRIVATE -DTIFF_ENABLED)
- target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${TIFF_INCLUDE_DIR})
- target_link_libraries(${PROJ_CORE_TARGET} ${TIFF_LIBRARY})
+ find_package(TIFF REQUIRED)
+ target_link_libraries(${PROJ_CORE_TARGET} TIFF::TIFF)
endif()

if(CURL_ENABLED)
target_compile_definitions(${PROJ_CORE_TARGET} PRIVATE -DCURL_ENABLED)
- target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${CURL_INCLUDE_DIR})
- target_link_libraries(${PROJ_CORE_TARGET} ${CURL_LIBRARY})
+ find_package(CURL REQUIRED)
paulharris marked this conversation as resolved.
Show resolved Hide resolved
+ target_link_libraries(${PROJ_CORE_TARGET} CURL::libcurl)
endif()

Expand Down
8 changes: 6 additions & 2 deletions recipes/proj/all/patches/0001-use-cmake-targets-8.0.0.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -394,21 +394,18 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
@@ -394,21 +394,22 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()

-target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR})
-target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY})
+target_link_libraries(proj PUBLIC CONAN_PKG::nlohmann_json PRIVATE CONAN_PKG::sqlite3)
+find_package(nlohmann_json REQUIRED CONFIG)
+find_package(SQLite3 REQUIRED)
+target_link_libraries(proj PUBLIC nlohmann_json::nlohmann_json PRIVATE SQLite::SQLite3)

if(TIFF_ENABLED)
target_compile_definitions(proj PRIVATE -DTIFF_ENABLED)
- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR})
- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY})
+ find_package(TIFF REQUIRED)
+ target_link_libraries(proj PRIVATE TIFF::TIFF)
endif()

if(CURL_ENABLED)
target_compile_definitions(proj PRIVATE -DCURL_ENABLED)
+ find_package(CURL REQUIRED)
- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIR})
target_link_libraries(proj
PRIVATE
Expand Down
9 changes: 6 additions & 3 deletions recipes/proj/all/patches/0001-use-cmake-targets-8.1.0.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -393,8 +393,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
@@ -393,8 +393,8 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()

-target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR})
-target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY})
+target_link_libraries(proj PRIVATE CONAN_PKG::sqlite3)
+find_package(SQLite3 REQUIRED)
+target_link_libraries(proj PRIVATE SQLite::SQLite3)

if(NLOHMANN_JSON STREQUAL "external")
target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON)
@@ -403,16 +402,14 @@ endif()
@@ -403,16 +402,16 @@ endif()

if(TIFF_ENABLED)
target_compile_definitions(proj PRIVATE -DTIFF_ENABLED)
- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR})
- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY})
+ find_package(TIFF REQUIRED)
+ target_link_libraries(proj PRIVATE TIFF::TIFF)
endif()

if(CURL_ENABLED)
target_compile_definitions(proj PRIVATE -DCURL_ENABLED)
- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIR})
+ find_package(CURL REQUIRED)
target_link_libraries(proj
PRIVATE
- ${CURL_LIBRARY}
Expand Down
9 changes: 6 additions & 3 deletions recipes/proj/all/patches/0001-use-cmake-targets-8.1.1.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -393,8 +393,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
@@ -393,8 +393,8 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()

-target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR})
-target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY})
+target_link_libraries(proj PRIVATE CONAN_PKG::sqlite3)
+find_package(SQLite3 REQUIRED)
+target_link_libraries(proj PRIVATE SQLite::SQLite3)

if(NLOHMANN_JSON STREQUAL "external")
target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON)
@@ -404,16 +403,14 @@ endif()
@@ -404,16 +403,16 @@ endif()

if(TIFF_ENABLED)
target_compile_definitions(proj PRIVATE -DTIFF_ENABLED)
- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR})
- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY})
+ find_package(TIFF REQUIRED)
+ target_link_libraries(proj PRIVATE TIFF::TIFF)
endif()

if(CURL_ENABLED)
target_compile_definitions(proj PRIVATE -DCURL_ENABLED)
- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIR})
+ find_package(CURL REQUIRED)
target_link_libraries(proj
PRIVATE
- ${CURL_LIBRARY}
Expand Down
9 changes: 6 additions & 3 deletions recipes/proj/all/patches/0001-use-cmake-targets-8.2.0.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -453,8 +453,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
@@ -453,8 +453,8 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()

-target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR})
-target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY})
+target_link_libraries(proj PRIVATE CONAN_PKG::sqlite3)
+find_package(SQLite3 REQUIRED)
+target_link_libraries(proj PRIVATE SQLite::SQLite3)

if(NLOHMANN_JSON STREQUAL "external")
target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON)
@@ -464,16 +463,14 @@ endif()
@@ -464,16 +463,16 @@ endif()

if(TIFF_ENABLED)
target_compile_definitions(proj PRIVATE -DTIFF_ENABLED)
- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR})
- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY})
+ find_package(TIFF REQUIRED)
+ target_link_libraries(proj PRIVATE TIFF::TIFF)
endif()

if(CURL_ENABLED)
target_compile_definitions(proj PRIVATE -DCURL_ENABLED)
- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIR})
+ find_package(CURL REQUIRED)
target_link_libraries(proj
PRIVATE
- ${CURL_LIBRARY}
Expand Down
9 changes: 6 additions & 3 deletions recipes/proj/all/patches/0001-use-cmake-targets-9.0.0.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -444,8 +444,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
@@ -444,8 +444,8 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()

-target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR})
-target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY})
+target_link_libraries(proj PRIVATE CONAN_PKG::sqlite3)
+find_package(SQLite3 REQUIRED)
+target_link_libraries(proj PRIVATE SQLite::SQLite3)

if(NLOHMANN_JSON STREQUAL "external")
target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON)
@@ -455,16 +454,14 @@ endif()
@@ -455,16 +454,16 @@ endif()

if(TIFF_ENABLED)
target_compile_definitions(proj PRIVATE -DTIFF_ENABLED)
- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR})
- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY})
+ find_package(TIFF REQUIRED)
+ target_link_libraries(proj PRIVATE TIFF::TIFF)
endif()

if(CURL_ENABLED)
target_compile_definitions(proj PRIVATE -DCURL_ENABLED)
- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIR})
+ find_package(CURL REQUIRED)
target_link_libraries(proj
PRIVATE
- ${CURL_LIBRARY}
Expand Down
9 changes: 6 additions & 3 deletions recipes/proj/all/patches/0001-use-cmake-targets-9.0.1.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -444,8 +444,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
@@ -444,8 +444,8 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
paulharris marked this conversation as resolved.
Show resolved Hide resolved
target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()

-target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR})
-target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY})
+target_link_libraries(proj PRIVATE CONAN_PKG::sqlite3)
+find_package(SQLite3 REQUIRED)
paulharris marked this conversation as resolved.
Show resolved Hide resolved
+target_link_libraries(proj PRIVATE SQLite::SQLite3)

if(NLOHMANN_JSON STREQUAL "external")
target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON)
@@ -455,16 +454,14 @@ endif()
@@ -455,16 +454,16 @@ endif()
paulharris marked this conversation as resolved.
Show resolved Hide resolved

if(TIFF_ENABLED)
target_compile_definitions(proj PRIVATE -DTIFF_ENABLED)
- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR})
- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY})
+ find_package(TIFF REQUIRED)
paulharris marked this conversation as resolved.
Show resolved Hide resolved
+ target_link_libraries(proj PRIVATE TIFF::TIFF)
endif()

if(CURL_ENABLED)
target_compile_definitions(proj PRIVATE -DCURL_ENABLED)
- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIRS})
+ find_package(CURL REQUIRED)
paulharris marked this conversation as resolved.
Show resolved Hide resolved
target_link_libraries(proj
PRIVATE
- ${CURL_LIBRARIES}
Expand Down
34 changes: 34 additions & 0 deletions recipes/proj/all/patches/0001-use-cmake-targets-9.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
--- a/src/src/lib_proj.cmake 2022-08-29 01:53:05.000000000 +0800
+++ b/src/lib_proj.cmake 2022-11-09 00:03:25.165493175 +0800
@@ -447,8 +447,8 @@
target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()

-target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR})
-target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY})
+find_package(SQLite3 REQUIRED)
+target_link_libraries(proj PRIVATE SQLite::SQLite3)

if(NLOHMANN_JSON STREQUAL "external")
target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON)
@@ -458,16 +458,16 @@

if(TIFF_ENABLED)
target_compile_definitions(proj PRIVATE -DTIFF_ENABLED)
- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR})
- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY})
+ find_package(TIFF REQUIRED)
+ target_link_libraries(proj PRIVATE TIFF::TIFF)
endif()

if(CURL_ENABLED)
target_compile_definitions(proj PRIVATE -DCURL_ENABLED)
- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIRS})
+ find_package(CURL REQUIRED)
target_link_libraries(proj
PRIVATE
- ${CURL_LIBRARIES}
+ CURL::libcurl
$<$<CXX_COMPILER_ID:MSVC>:ws2_32>
$<$<CXX_COMPILER_ID:MSVC>:wldap32>
$<$<CXX_COMPILER_ID:MSVC>:advapi32>
9 changes: 3 additions & 6 deletions recipes/proj/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.8)
project(test_package C)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)

add_executable(test_package test_package.c)
if(PROJ_VERSION_GE_7)
find_package(proj REQUIRED CONFIG)
target_link_libraries(test_package PROJ::proj)
target_link_libraries(test_package PRIVATE PROJ::proj)
else()
find_package(proj4 REQUIRED CONFIG)
target_link_libraries(test_package PROJ4::proj)
target_link_libraries(test_package PRIVATE PROJ4::proj)
endif()
Loading