set(KATIE_PRODUCT "AwesomeSauce")
include(GNUInstallDirs)
-set(KATIE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}" CACHE PATH "General installation prefix")
set(KATIE_HEADERS_PATH "${CMAKE_INSTALL_FULL_INCLUDEDIR}/katie" CACHE PATH "Headers installation path")
set(KATIE_LIBRARIES_PATH "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Libraries installation path")
set(KATIE_BINARIES_PATH "${CMAKE_INSTALL_FULL_BINDIR}" CACHE PATH "Binaries installation path")
set(KATIE_PLUGINS_PATH "${KATIE_LIBRARIES_PATH}/katie/plugins" CACHE PATH "Plugins installation path")
set(KATIE_IMPORTS_PATH "${KATIE_LIBRARIES_PATH}/katie/imports" CACHE PATH "Declarative imports installation path")
-set(KATIE_DATA_PATH "${CMAKE_INSTALL_FULL_DATADIR}" CACHE PATH "Generic data installation path")
set(KATIE_TRANSLATIONS_PATH "${CMAKE_INSTALL_FULL_LOCALEDIR}" CACHE PATH "Translations installation path")
set(KATIE_CMAKE_PATH "${KATIE_LIBRARIES_PATH}/cmake/Katie" CACHE PATH "CMake aware modules installation path")
set(KATIE_LDCONF_PATH "${CMAKE_INSTALL_FULL_SYSCONFDIR}/ld.so.conf.d" CACHE PATH "Run-time linker/loader configs installation path")
set(KATIE_PROFILE_PATH "${CMAKE_INSTALL_FULL_SYSCONFDIR}/profile.d" CACHE PATH "Shell profile scripts installation path")
set(KATIE_MAN_PATH "${CMAKE_INSTALL_FULL_MANDIR}" CACHE PATH "Manual pages installation path")
-set(KATIE_APPLICATIONS_PATH "${KATIE_DATA_PATH}/applications" CACHE PATH "Desktop applications register installation path")
-set(KATIE_PIXMAPS_PATH "${KATIE_DATA_PATH}/pixmaps" CACHE PATH "Desktop applications icon installation path")
+set(KATIE_APPLICATIONS_PATH "${CMAKE_INSTALL_FULL_DATADIR}/applications" CACHE PATH "Desktop applications register installation path")
+set(KATIE_PIXMAPS_PATH "${CMAKE_INSTALL_FULL_DATADIR}/pixmaps" CACHE PATH "Desktop applications icon installation path")
set(KATIE_PKGCONFIG_PATH "${KATIE_LIBRARIES_PATH}/pkgconfig" CACHE PATH "pkg-config installation path")
set(KATIE_TOOLS_SUFFIX "" CACHE STRING "Tools (moc, uic, rcc, etc.) suffix")
set(KATIE_FOUND TRUE)
# Stored configuration paths that vendors usually change
- set(KATIE_PREFIX_PATH "@KATIE_PREFIX_PATH@")
set(KATIE_HEADERS_PATH "@KATIE_HEADERS_PATH@")
set(KATIE_LIBRARIES_PATH "@KATIE_LIBRARIES_PATH@")
set(KATIE_BINARIES_PATH "@KATIE_BINARIES_PATH@")
set(KATIE_PLUGINS_PATH "@KATIE_PLUGINS_PATH@")
set(KATIE_IMPORTS_PATH "@KATIE_IMPORTS_PATH@")
- set(KATIE_DATA_PATH "@KATIE_DATA_PATH@")
set(KATIE_TRANSLATIONS_PATH "@KATIE_TRANSLATIONS_PATH@")
set(KATIE_LDCONF_PATH "@KATIE_LDCONF_PATH@")
set(KATIE_PROFILE_PATH "@KATIE_PROFILE_PATH@")
katie_string_wrap("${KATIE_DEFINITIONS}" KATIE_DEFINITIONS)
set(PACKAGE_FLAGS "${PACKAGE_FLAGS} ${KATIE_DEFINITIONS}")
endif()
+ set(PACKAGE_PREFIXDIR "${CMAKE_INSTALL_PREFIX}")
+ string(REPLACE "${PACKAGE_PREFIXDIR}" "\${prefix}" PACKAGE_INCLUDEDIR "${KATIE_HEADERS_PATH}")
+ string(REPLACE "${PACKAGE_PREFIXDIR}" "\${exec_prefix}" PACKAGE_LIBDIR "${KATIE_LIBRARIES_PATH}")
configure_file(
"${CMAKE_SOURCE_DIR}/cmake/pkgconfig.cmake"
"${CMAKE_BINARY_DIR}/pkgconfig/${FORTARGET}.pc"
+ @ONLY
)
install(
FILES "${CMAKE_BINARY_DIR}/pkgconfig/${FORTARGET}.pc"
-prefix=${KATIE_PREFIX_PATH}
-exec_prefix=${KATIE_PREFIX_PATH}
-libdir=${KATIE_LIBRARIES_PATH}
-includedir=${KATIE_HEADERS_PATH}/${PACKAGE_FAKE}
+prefix=@PACKAGE_PREFIXDIR@
+exec_prefix=@PACKAGE_PREFIXDIR@
+libdir=@PACKAGE_LIBDIR@
+includedir=@PACKAGE_INCLUDEDIR@/@PACKAGE_FAKE@
-Name: ${PACKAGE_NAME}
-Description: ${PACKAGE_NAME} Library
-Version: ${KATIE_VERSION}
-Libs: -L${KATIE_LIBRARIES_PATH} -l${PACKAGE_NAME}
-Cflags: -I${KATIE_HEADERS_PATH} -I${KATIE_HEADERS_PATH}/${PACKAGE_FAKE} ${PACKAGE_FLAGS}
-Requires: ${PACKAGE_REQUIRES}
+Name: @PACKAGE_NAME@
+Description: @PACKAGE_NAME@ Library
+Version: @KATIE_VERSION@
+Libs: -L${libdir} -l@PACKAGE_NAME@
+Cflags: -I@PACKAGE_INCLUDEDIR@ -I${includedir} @PACKAGE_FLAGS@
+Requires: @PACKAGE_REQUIRES@
static const char* qt_configure_licensed_products_str = "${KATIE_PRODUCT}\0";
/* Runtime paths */
-static const char* qt_configure_prefix_path_str = "${KATIE_PREFIX_PATH}\0";
static const char* qt_configure_headers_path_str = "${KATIE_HEADERS_PATH}\0";
static const char* qt_configure_libraries_path_str = "${KATIE_LIBRARIES_PATH}\0";
static const char* qt_configure_binaries_path_str = "${KATIE_BINARIES_PATH}\0";
static const char* qt_configure_plugins_path_str = "${KATIE_PLUGINS_PATH}\0";
static const char* qt_configure_imports_path_str = "${KATIE_IMPORTS_PATH}\0";
-static const char* qt_configure_data_path_str = "${KATIE_DATA_PATH}\0";
static const char* qt_configure_translations_path_str = "${KATIE_TRANSLATIONS_PATH}\0";
This enum type is used to specify a specific location
specifier:
- \value PrefixPath The default prefix for all paths.
\value HeadersPath The location for all headers.
\value LibrariesPath The location of installed libraries.
\value BinariesPath The location of installed Qt binaries (tools and applications).
\value PluginsPath The location of installed Qt plugins.
\value ImportsPath The location of installed QML extensions to import.
- \value DataPath The location of general Qt data.
\value TranslationsPath The location of translation information for Qt strings.
\sa location()
QString QLibraryInfo::location(LibraryLocation loc)
{
switch (loc) {
- case PrefixPath:
- return QString::fromLocal8Bit(qt_configure_prefix_path_str);
case HeadersPath:
return QString::fromLocal8Bit(qt_configure_headers_path_str);
case LibrariesPath:
return QString::fromLocal8Bit(qt_configure_binaries_path_str);
case PluginsPath:
return QString::fromLocal8Bit(qt_configure_plugins_path_str);
- case DataPath:
- return QString::fromLocal8Bit(qt_configure_data_path_str);
case TranslationsPath:
return QString::fromLocal8Bit(qt_configure_translations_path_str);
case ImportsPath:
{
public:
enum LibraryLocation {
- PrefixPath,
HeadersPath,
LibrariesPath,
BinariesPath,
PluginsPath,
- DataPath,
TranslationsPath,
ImportsPath
};