This PR fixes the CMake's install() logic for allowing usage of find_package() and add_subdirectory() for importing library.
Now library can be installed with CMake export config via cmake --install <build-dir-with-QtAwesome> --prefix <install-prefix> (or old good cmake --build install, but it requires CMAKE_INSTALL_PREFIX to exist in CMakeCache). After installation the library user now is able to use library in their project with this CMake code snippet:
This PR fixes the CMake's
install()
logic for allowing usage offind_package()
andadd_subdirectory()
for importing library.Now library can be installed with CMake export config via
cmake --install <build-dir-with-QtAwesome> --prefix <install-prefix>
(or old goodcmake --build install
, but it requiresCMAKE_INSTALL_PREFIX
to exist in CMakeCache). After installation the library user now is able to use library in their project with this CMake code snippet:or, for git-modules:
which may be more convenient for some use-cases (it also works with another helpers like CMake's
fetch_content()
/ExternalProject_***
).