diff --git a/CMakeLists.txt b/CMakeLists.txt index 95d1c10..935f325 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}") set(META_APP_DESCRIPTION "Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models") set(META_VERSION_MAJOR 5) set(META_VERSION_MINOR 1) -set(META_VERSION_PATCH 0) +set(META_VERSION_PATCH 1) set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}) # required to include CMake modules from own project directory diff --git a/cmake/modules/QtConfig.cmake b/cmake/modules/QtConfig.cmake index 2f39f89..f604c66 100644 --- a/cmake/modules/QtConfig.cmake +++ b/cmake/modules/QtConfig.cmake @@ -169,28 +169,38 @@ if(REQUIRED_ICONS) set(ICON_THEME_PATH "${ICON_SEARCH_PATH}/${ICON_THEME}") set(NEW_ICON_THEME_PATH "${ICON_SEARCH_PATH}/${ICON_THEME}") if(IS_DIRECTORY "${ICON_THEME_PATH}") + message(STATUS "The specified icon theme \"${ICON_THEME}\" has been located under \"${ICON_THEME_PATH}\" and will be built-in.") # find index files - file(GLOB GLOBBED_ICON_THEME_INDEX_FILES LIST_DIRECTORIES false "${ICON_THEME_PATH}/index.theme" "${ICON_THEME_PATH}/icon-theme.cache") + if(NOT ICON_THEME STREQUAL FALLBACK_ICON_THEME) + file(GLOB GLOBBED_ICON_THEME_INDEX_FILES LIST_DIRECTORIES false "${ICON_THEME_PATH}/index.theme" "${ICON_THEME_PATH}/icon-theme.cache") + else() + # only index.theme required when icons are provided as fallback anyways + file(GLOB GLOBBED_ICON_THEME_INDEX_FILES LIST_DIRECTORIES false "${ICON_THEME_PATH}/index.theme") + endif() # make the first specified built-in the default theme if(NOT EXISTS "${DEFAULT_THEME_INDEX_FILE}") file(MAKE_DIRECTORY "${BUILDIN_ICONS_DIR}/default") file(WRITE "${DEFAULT_THEME_INDEX_FILE}" "[Icon Theme]\nInherits=${NEW_ICON_THEME_NAME}") list(APPEND ICON_THEME_FILES "default/index.theme") endif() - # find required icons - set(GLOB_PATTERNS) - foreach(REQUIRED_ICON ${REQUIRED_ICONS}) - list(APPEND GLOB_PATTERNS - "${ICON_THEME_PATH}/${REQUIRED_ICON}" - "${ICON_THEME_PATH}/${REQUIRED_ICON}.*" - "${ICON_THEME_PATH}/*/${REQUIRED_ICON}" - "${ICON_THEME_PATH}/*/${REQUIRED_ICON}.*" - ) - endforeach() - file(GLOB_RECURSE GLOBBED_ICON_THEME_FILES LIST_DIRECTORIES false ${GLOB_PATTERNS}) + # find required icons, except the icon theme is provided as fallback anyways + if(NOT ICON_THEME STREQUAL FALLBACK_ICON_THEME) + set(GLOB_PATTERNS) + foreach(REQUIRED_ICON ${REQUIRED_ICONS}) + list(APPEND GLOB_PATTERNS + "${ICON_THEME_PATH}/${REQUIRED_ICON}" + "${ICON_THEME_PATH}/${REQUIRED_ICON}.*" + "${ICON_THEME_PATH}/*/${REQUIRED_ICON}" + "${ICON_THEME_PATH}/*/${REQUIRED_ICON}.*" + ) + endforeach() + file(GLOB_RECURSE GLOBBED_ICON_THEME_FILES LIST_DIRECTORIES false ${GLOB_PATTERNS}) + else() + message(STATUS "Icon files for specified theme \"${ICON_THEME}\" are skipped because these are provided as fallback anyways.") + set(GLOBBED_ICON_THEME_FILES) + endif() # make temporary copy of required icons and create resource list for Qt foreach(ICON_THEME_FILE ${GLOBBED_ICON_THEME_INDEX_FILES} ${GLOBBED_ICON_THEME_FILES}) - #message(STATUS "relpath: ${ICON_THEME_FILE_RELATIVE_PATH}, new relpath: ${NEW_ICON_THEME_FILE_RELATIVE_PATH}") # resolve symlinks (use if(IS_SYMLINK "${ICON_THEME_FILE}") string(REGEX REPLACE "^${ICON_SEARCH_PATH}/" "" ICON_THEME_FILE_RELATIVE_PATH "${ICON_THEME_FILE}") diff --git a/global.h b/global.h index 196e833..ba4c0b8 100644 --- a/global.h +++ b/global.h @@ -14,4 +14,14 @@ # define QT_UTILITIES_IMPORT LIB_IMPORT #endif +/*! + * \def QT_UTILITIES_EXPORT + * \brief Marks the symbol to be exported by the qtutilities library. + */ + +/*! + * \def QT_UTILITIES_IMPORT + * \brief Marks the symbol to be imported from the qtutilities library. + */ + #endif // QT_UTILITIES_GLOBAL