|
From: | Rashad M |
Subject: | Re: [Mingw-cross-env-list] find_package() and Shared Builds in CMake |
Date: | Sat, 18 Jul 2015 19:14:36 +0200 |
I'm putting together an .mk file for a Qt library that uses CMake. I was able to fill in most of the $(PKG)_* variables without any issues. In particular, the library's only dependencies are gcc and qtbase.I was able to work around this by using the following line to invoke CMake:
However, I ran into some issues with $(PKG)_BUILD. The library uses "find_package(Qt5Network)" which causes the following error message:Could not find a package configuration file provided by "Qt5Network"...cmake .. \
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
-DCMAKE_PREFIX_PATH='$(PREFIX)/$(TARGET)/qt5/lib/cmake'
Is this the correct way of solving the issue?The second issue deals with building a shared version of the library. By default, the CMake script builds a shared library but it can be configured to build a static library by using "-DBUILD_STATIC=ON". Should this be enabled in the $(PKG)_BUILD variable? How would I disable this for a shared library?
- Nathan
[Prev in Thread] | Current Thread | [Next in Thread] |