From 640cf85375a243699e0c7a74de5849a14d30924d Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Tue, 27 Jan 2026 23:24:28 +0100 Subject: [PATCH 1/4] Cleanup superfluous overarching NOT ANDROID conditional Signed-off-by: Andreas Sturmlechner --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb57f27ebb6..b77fb64a10f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,7 +226,6 @@ IF (OSG_MAINTAINER) ENDIF() -IF(NOT ANDROID) IF(APPLE) IF(OSG_BUILD_PLATFORM_IPHONE) @@ -271,12 +270,11 @@ IF(APPLE) OPTION(OSG_COMPILE_FRAMEWORKS "compile frameworks instead of dylibs (experimental)" OFF) SET(OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR "@executable_path/../Frameworks" CACHE STRING "install name dir for compiled frameworks") -ELSE() +ELSEIF(NOT ANDROID) # Non-Apple: Find OpenGL FIND_PACKAGE(OpenGL) FIND_PACKAGE(EGL) ENDIF() -ENDIF() From 952d59e8d0c6b9c1c93c97d19e403c42119a600d Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 29 Jan 2026 22:36:10 +0100 Subject: [PATCH 2/4] FindGTA.cmake: Fix CMake warnings CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:493 (message): The package name passed to find_package_handle_standard_args() (PkgConfig) does not match the name of the calling package (GTA). This can lead to problems in calling code that expects find_package() result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:562 (find_package_handle_standard_args) CMakeModules/FindGTA.cmake:11 (INCLUDE) CMakeLists.txt:760 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it. -- Found PkgConfig: /usr/bin/x86_64-pc-linux-gnu-pkg-config (found version "2.5.1") CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:493 (message): The package name passed to find_package_handle_standard_args() (PkgConfig) does not match the name of the calling package (GTA). This can lead to problems in calling code that expects find_package() result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:562 (find_package_handle_standard_args) CMakeModules/FindGTA.cmake:15 (INCLUDE) CMakeLists.txt:760 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it. Signed-off-by: Andreas Sturmlechner --- CMakeModules/FindGTA.cmake | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/CMakeModules/FindGTA.cmake b/CMakeModules/FindGTA.cmake index 086069c3244..2bf54902727 100644 --- a/CMakeModules/FindGTA.cmake +++ b/CMakeModules/FindGTA.cmake @@ -8,15 +8,10 @@ # correspond to the ./configure --prefix=$GTA_DIR # used in building libgta. -INCLUDE(FindPkgConfig OPTIONAL) - -IF(PKG_CONFIG_FOUND) - - INCLUDE(FindPkgConfig) - +find_package(PkgConfig QUIET) +if(PkgConfig_FOUND) PKG_CHECK_MODULES(GTA gta) - -ENDIF(PKG_CONFIG_FOUND) +endif() IF(NOT GTA_FOUND) FIND_PATH(GTA_INCLUDE_DIRS gta/gta.hpp @@ -54,4 +49,4 @@ IF(NOT GTA_FOUND) SET(GTA_FOUND "YES") ENDIF(GTA_LIBRARY AND GTA_INCLUDE_DIRS) -ENDIF(NOT GTA_FOUND) \ No newline at end of file +ENDIF(NOT GTA_FOUND) From 89bbe4c0556a5b48b7ef92475a63e73fc2df9c62 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 29 Jan 2026 22:39:50 +0100 Subject: [PATCH 3/4] FindPoppler-glib.cmake: Fix CMake warnings CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:493 (message): The package name passed to find_package_handle_standard_args() (PkgConfig) does not match the name of the calling package (Poppler-glib). This can lead to problems in calling code that expects find_package() result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:562 (find_package_handle_standard_args) CMakeModules/FindPoppler-glib.cmake:2 (INCLUDE) CMakeLists.txt:770 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:493 (message): The package name passed to find_package_handle_standard_args() (PkgConfig) does not match the name of the calling package (Poppler-glib). This can lead to problems in calling code that expects find_package() result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:562 (find_package_handle_standard_args) CMakeModules/FindPoppler-glib.cmake:6 (INCLUDE) CMakeLists.txt:770 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it. Signed-off-by: Andreas Sturmlechner --- CMakeModules/FindPoppler-glib.cmake | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeModules/FindPoppler-glib.cmake b/CMakeModules/FindPoppler-glib.cmake index d89a186f28c..017495c0c12 100644 --- a/CMakeModules/FindPoppler-glib.cmake +++ b/CMakeModules/FindPoppler-glib.cmake @@ -1,10 +1,7 @@ #use pkg-config to find various modues -INCLUDE(FindPkgConfig OPTIONAL) - -IF(PKG_CONFIG_FOUND) - - INCLUDE(FindPkgConfig) +find_package(PkgConfig QUIET) +IF(PkgConfig_FOUND) PKG_CHECK_MODULES(CAIRO cairo) PKG_CHECK_MODULES(POPPLER poppler-glib) From 76345671ad351c02193a58b02c2c2d2b275fbd85 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 29 Jan 2026 22:41:46 +0100 Subject: [PATCH 4/4] FindRSVG.cmake: Fix CMake warnings CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:493 (message): The package name passed to find_package_handle_standard_args() (PkgConfig) does not match the name of the calling package (RSVG). This can lead to problems in calling code that expects find_package() result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:562 (find_package_handle_standard_args) CMakeModules/FindRSVG.cmake:2 (INCLUDE) CMakeLists.txt:771 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:493 (message): The package name passed to find_package_handle_standard_args() (PkgConfig) does not match the name of the calling package (RSVG). This can lead to problems in calling code that expects find_package() result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:562 (find_package_handle_standard_args) CMakeModules/FindRSVG.cmake:6 (INCLUDE) CMakeLists.txt:771 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it. Signed-off-by: Andreas Sturmlechner --- CMakeModules/FindRSVG.cmake | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeModules/FindRSVG.cmake b/CMakeModules/FindRSVG.cmake index 8d219ff21d7..c3e130eea62 100644 --- a/CMakeModules/FindRSVG.cmake +++ b/CMakeModules/FindRSVG.cmake @@ -1,10 +1,7 @@ #use pkg-config to find various modues -INCLUDE(FindPkgConfig OPTIONAL) - -IF(PKG_CONFIG_FOUND) - - INCLUDE(FindPkgConfig) +find_package(PkgConfig QUIET) +IF(PkgConfig_FOUND) #Version 2.35 introduces the rsvg_cleanup function which is used PKG_CHECK_MODULES(RSVG librsvg-2.0>=2.35)