pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: pkgsrc/devel/cmake
> Modified Files:
> pkgsrc/devel/cmake: build.mk configure-settings.mk
>
> Log Message:
> devel/cmake/build.mk: Limit cmake's perspective to buildlink3.
>
> Hide LOCALBASE from cmake functions like find_package, find_path, &c.
> But don't hide COMPILER_INCLUDE_DIRS and COMPILER_LIB_DIRS -- we only
> want to hide undeclared pkgsrc packages, not system libraries.
>
> Pass pkgsrc-defined CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH through
> to cmake as environment variables rather than as cmake variables, and
> do the same with CMAKE_PREFIX_PATH. This way, the project can define
> its own paths -- as cmake intends -- without overriding pkgsrc's
> BUILDLINK_DIR paths.
>
> As a next step, we should set CMAKE_IGNORE_PREFIX_PATH to ignore
> ${LOCALBASE} in order to conceal it harder. It won't stop cmake from
> finding things it shouldn't through paths exposed by pkg-config but
> it might stop cmake from finding things it shouldn't by other paths
> like projects putting ${PREFIX} or /usr/pkg in CMAKE_PREFIX_PATH
> explicitly. However, that step will have more fallout, so I'll do it
> separately.
>
> Almost all the fallout has been resolved for this revision of the
> change, either by tweaking the mechanism (like setting CMAKE_*
> environemnt variables instead of cmake variables) or by tweaking
> buildlink3 files. Let me know if anything else pops up -- usually in
> the form of `CMake Error' at configure time failing to find
> dependencies.
>
> XXX Need mass revbump of all packages that use devel/cmake/build.mk
> just in case this changed anything about the build.
>
> Proposed on tech-pkg:
> https://mail-index.netbsd.org/tech-pkg/2024/12/25/msg030256.html
This breaks builds on macOS (Darwin).
games/wesnoth:
CMake Error at CMakeLists.txt:90 (find_library):
Could not find APPKIT_LIBRARY using the following names: AppKit
Apparently, system frameworks cannot be found.
net/wireshark:
CMake Error at CMakeLists.txt:1314 (find_package):
Found package configuration file:
/dist/pkg/qt6/lib/cmake/Qt6/Qt6Config.cmake
but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
FOUND. Reason given by package:
Failed to find required Qt component "Gui".
Expected Config file at "/dist/pkg/qt6/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake"
exists
Configuring with --debug-find-pkg=Qt6Gui might reveal details why the
package was not found.
Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some
of the path variables that find_package uses to try and find the package.
I fix these issues by commenting out these lines in cmake/build.mk:
CMAKE_CONFIGURE_ARGS+= -DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH:BOOL=OFF
CMAKE_PREFIX_PATH+= ${BUILDLINK_DIR}
Please, provide a proper fix or revert.
Kind regards,
Adam
Home |
Main Index |
Thread Index |
Old Index