-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#19942) imagl: Patching sources' CMakeLists.txt to use find_package …
…instead of legacy conan 1.X cmake generator * Updating imagl recipe for conan 2.0 * adding src_folder parameter to cmake_layout to please linter * Back to minimum conan 1.59 * Inspired by zlib recipe and now it passes v1 hooks. * Do not use validate_build(), but validate() instead * Applying jwillikers suggestions. * Final endline added * add cmake_find_package_multi generator as jwillikers suggests it. Co-authored-by: Jordan Williams <jordan@jwillikers.com> * Removing base_path from patches and a useless _cmake member of ImaglConan class * -Switch to github URLs since my GitLab instance is temporarily down -Change license name to uppercase * Patching sources' CMakeLists.txt to make it compatible with conan 2.0+ by using find_package instead of old conan 1.X cmake generator * new-line forgotten * This time, one space too many... --------- Co-authored-by: Jordan Williams <jordan@jwillikers.com> Co-authored-by: Daniel <danimanzaneque@gmail.com>
- Loading branch information
1 parent
f1f5eb3
commit 4b6396d
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
recipes/imagl/all/patches/0002-use-findpackage-0.1.x.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- a/imaGL/CMakeLists.txt | ||
+++ b/imaGL/CMakeLists.txt | ||
@@ -12,9 +12,10 @@ set_property(TARGET libImaGL PROPERTY OUTPUT_NAME imaGL) | ||
set_property(TARGET libImaGL PROPERTY PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/public/imaGL/imaGL.h") | ||
target_include_directories(libImaGL INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/public") | ||
|
||
-if(TARGET CONAN_PKG::libpng) | ||
+find_package(PNG) | ||
+if(PNG_FOUND) | ||
add_compile_definitions(_HAS_PNG) | ||
- target_link_libraries (libImaGL CONAN_PKG::libpng) | ||
+ target_link_libraries (libImaGL PNG::PNG) | ||
endif() | ||
|
||
file(GLOB_RECURSE ImaGL_SRC "*.h" "*.cpp") |
23 changes: 23 additions & 0 deletions
23
recipes/imagl/all/patches/0002-use-findpackage-0.2.1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- a/imaGL/CMakeLists.txt | ||
+++ b/imaGL/CMakeLists.txt | ||
@@ -12,14 +12,16 @@ set_property(TARGET libImaGL PROPERTY OUTPUT_NAME imaGL) | ||
set_property(TARGET libImaGL PROPERTY PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/public/imaGL/imaGL.h") | ||
target_include_directories(libImaGL INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/public") | ||
|
||
-if(TARGET CONAN_PKG::libpng) | ||
+find_package(PNG) | ||
+if(PNG_FOUND) | ||
add_compile_definitions(_HAS_PNG) | ||
- target_link_libraries (libImaGL CONAN_PKG::libpng) | ||
+ target_link_libraries (libImaGL PNG::PNG) | ||
endif() | ||
|
||
-if(TARGET CONAN_PKG::libjpeg) | ||
+find_package(JPEG) | ||
+if(JPEG_FOUND) | ||
add_compile_definitions(_HAS_JPEG) | ||
- target_link_libraries (libImaGL CONAN_PKG::libjpeg) | ||
+ target_link_libraries (libImaGL JPEG::JPEG) | ||
endif() | ||
|
||
file(GLOB_RECURSE ImaGL_SRC "*.h" "*.cpp") |