Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5975f82
Add CMakeLists.txt
MartinDelille Nov 20, 2022
ac78318
Fix #47, README.md FontAwesome and other URL's
gamecreature Jan 16, 2023
76b4e5e
CMake handle Qt6
MartinDelille Jan 26, 2023
ca1c36b
Merge branch 'main' into cmake
MartinDelille Jan 26, 2023
27dbfdc
Add CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
MartinDelille Jan 26, 2023
50b1d03
Fix missing files after merge
MartinDelille Jan 26, 2023
ff468e5
Replace ${PROJECT_NAME}
MartinDelille Jan 26, 2023
0f47fe1
Replace CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS by generate_export_header
MartinDelille Jan 26, 2023
8b3cf90
Revert "Replace CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS by generate_export_h…
MartinDelille Jan 30, 2023
54c87a4
Adding cmake_minimum_required
MartinDelille Jan 30, 2023
005a0fa
Use same cmake_minimum_required (3.16)
MartinDelille Jan 30, 2023
ab15dd6
Add find_package to QtAwesome
MartinDelille Jan 31, 2023
a0ad43a
Doesn't use HighQualityAntialiasing since it is deprected
MartinDelille Jan 31, 2023
1257a45
Merge branch 'MartinDelille-cmake'
gamecreature Feb 2, 2023
a6051c8
Add github ci
xakod Jan 29, 2023
b304ec1
Update to 6.3.0, Aliases and Sharp Regular Pro fonts
gamecreature Feb 9, 2023
bb84e29
Move CMakeLists.txt to root directory
MartinDelille Mar 21, 2023
61db41d
Fix cmake.yml
MartinDelille Mar 22, 2023
deeb5cb
Update to 6.4.0, Sharp Light Pro Font
gamecreature Mar 28, 2023
ce7784e
Add headers to CMakeLists.txt
MartinDelille Mar 31, 2023
485c4e8
Add install step
MartinDelille Apr 29, 2023
5e7fdd3
Update to 6.4.2, Fix missing pro icons in namedCodePoints
gamecreature Aug 16, 2023
7d95be5
Fix README.md
gamecreature Aug 16, 2023
9111156
Fix #56, Dead link in README.md
gamecreature Aug 21, 2023
45e3e70
Fix CMake install() for proper find_package()/add_subdirectory() support
leha-bot Oct 8, 2023
3622b85
Update to 6.5.1, Sharp Thin Pro font
gamecreature Dec 7, 2023
40dc420
Update README.md
gamecreature Dec 16, 2023
1381b93
add support for dark/light mode switch
hanjianqiao Apr 18, 2024
f8e9194
updated changes, and add conditionals for supporting older qt versions
gamecreature Apr 23, 2024
e6b4a66
Install binary to bindir
sithlord48 Jul 25, 2024
843aef3
Update github workflow, remove macos-11 add macos-13
gamecreature Jul 26, 2024
e500281
Update Checkout to v4
sithlord48 Jul 27, 2024
810f6c0
Update Qt Action to v4
sithlord48 Jul 27, 2024
7974ffc
add ubuntu 24.04 to the matrix
sithlord48 Jul 27, 2024
4049f78
add Qt 6.5 - 6.7
sithlord48 Jul 27, 2024
6a43580
Add mac os 14
sithlord48 Jul 27, 2024
4e41ec4
Use PUBLIC_HEADERS
sithlord48 Jul 27, 2024
cb4c188
feat: Install license
sithlord48 Jul 27, 2024
8cb4748
build: Get version from git
sithlord48 Jul 27, 2024
8d290c7
build: Simple CPack Package
sithlord48 Jul 27, 2024
83e0b07
ci: build package target
sithlord48 Jul 27, 2024
c9b70f3
Update to 6.7.1, Extra Duotone styles
gamecreature Nov 21, 2024
9e7d92d
Update to 6.7.2 (Updated OTF files)
gamecreature Apr 7, 2025
87942a3
Update build config and icon codepoint
hupochun May 8, 2025
0262db7
Updated changes, and license file.
gamecreature May 8, 2025
c197c2a
fix #66, Style name parsing
gamecreature Jul 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CMake

on:
push:
branches:
- master
- main
tags:
- "*"
pull_request:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build-and-test:

name: ${{ matrix.os }}-Qt-${{ matrix.qt_version }}-shared-${{ matrix.shared }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-12, macos-13, macos-14, windows-2019, windows-2022]
qt_version: [5.12.12, 5.15.2, 6.4.0, 6.5.0, 6.6.0, 6.7.0]
shared: [ON, OFF]
exclude:
- os: macos-14
qt_version: 5.12.12
- os: macos-14
qt_version: 5.15.2
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --tags --force

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_version }}
cache: 'true'
cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }}
dir: ${{ github.workspace }}/Qt

- name: Configure (${{ matrix.configuration }})
run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DBUILD_SHARED_LIBS=${{ matrix.shared }} -B "${{github.workspace}}/build"

- name: Build with ${{ matrix.compiler }}
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target package
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.*
*.pro.user
*.pro.user*
/*build*
CMakeLists.txt.user
**/build

# never include pro files
QtAwesome/fonts/pro/
19 changes: 19 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changes

- (2025-07-15) #66, Style name parsing (stringToStyleEnum) not working properly (contribution by @samapico)
- (2025-05-08) #65, Support for Qt 6.9. Fix the CMakelist example
- (2025-04-07) Update to 6.7.2 (Updated OTF files)
- (2024-11-21) Update to 6.7.1, Extra Duotone styles
- Expand Duotone to support Solid, Regular, Light and Thin
- Add Sharp Duotone styles
- Deprecated Duotone (without style)
- (2024-04-23) Support for dark/light colorSchema mode, (contribution by @hanjianqiao(Lanchitour))
- (2023-12-07) Update to 6.5.1, Sharp Thin Pro font
- (2023-08-16) Update to 6.4.2, Fix issue missing pro icons in namedCodePoints
- (2023-03-28) Update to 6.4.0, Sharp Light Pro font
- (2023-02-09) Update to 6.3.0, Aliases and Sharp Regular Pro font
- Aliases are now included in the icon list names
- Support for font style "Font Awesome Sharp Regular" (Pro)
- Update generator to include all alias names
- Update free font files to latest release
- (2013-04-19) Initial release
143 changes: 143 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
cmake_minimum_required(VERSION 3.16)

#Set The Current Version Number to use as fallback if GIT Fails.
set(QTAWESOME_VERSION_MAJOR 6)
set(QTAWESOME_VERSION_MINOR 5)
set(QTAWESOME_VERSION_PATCH 1)
set(QTAWESOME_VERSION_TWEAK 0)
# Get the version from git if it's a git repository
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
find_package(Git)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --tags --long --match "font-awesome-*" --always
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
OUTPUT_VARIABLE GITREV
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(FIND ${GITREV} "font-awesome-" isRev)
if(NOT ifRev EQUAL -1)
string(REGEX MATCH [0-9]+ MAJOR ${GITREV})
string(REGEX MATCH \\.[0-9]+ MINOR ${GITREV})
string(REPLACE "." "" MINOR "${MINOR}")
string(REGEX MATCH [0-9]+\- PATCH ${GITREV})
string(REPLACE "-" "" PATCH "${PATCH}")
string(REGEX MATCH \-[0-9]+\- TWEAK ${GITREV})
string(REPLACE "-" "" TWEAK "${TWEAK}")
set(QTAWESOME_VERSION_MAJOR ${MAJOR})
set(QTAWESOME_VERSION_MINOR ${MINOR})
set(QTAWESOME_VERSION_PATCH ${PATCH})
set(QTAWESOME_VERSION_TWEAK ${TWEAK})
elseif(NOT ${GITREV} STREQUAL "")
set(QTAWESOME_VERSION_TWEAK ${GITREV})
endif()
endif()
endif()

set(QTAWESOME_VERSION "${QTAWESOME_VERSION_MAJOR}.${QTAWESOME_VERSION_MINOR}.${QTAWESOME_VERSION_PATCH}.${QTAWESOME_VERSION_TWEAK}")
message(STATUS "Building QTAWESOME: ${QTAWESOME_VERSION}")

project(QtAwesome VERSION ${QTAWESOME_VERSION} DESCRIPTION "Add Font Awesome icons to your Qt application")

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

set(QtAwesome_HEADERS
QtAwesome/QtAwesome.h
QtAwesome/QtAwesomeAnim.h
QtAwesome/QtAwesomeEnumGenerated.h
QtAwesome/QtAwesomeStringGenerated.h
)

add_library(QtAwesome
QtAwesome/QtAwesome.cpp
QtAwesome/QtAwesomeAnim.cpp
QtAwesome/QtAwesomeFree.qrc
${QtAwesome_HEADERS}
)

include(GNUInstallDirs)

target_include_directories(QtAwesome
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/QtAwesome>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_link_libraries(QtAwesome PUBLIC
Qt${QT_VERSION_MAJOR}::Widgets
)

set_target_properties(QtAwesome PROPERTIES
PUBLIC_HEADER "${QtAwesome_HEADERS}"
)

install(TARGETS QtAwesome EXPORT QtAwesomeConfig
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/QtAwesome
)

install (FILES "${PROJECT_SOURCE_DIR}/LICENSE.md" DESTINATION ${CMAKE_INSTALL_DATADIR}/licenses/${PROJECT_NAME} RENAME LICENSE)

install(EXPORT QtAwesomeConfig
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/QtAwesome/
NAMESPACE QtAwesome::
)

export(EXPORT QtAwesomeConfig NAMESPACE QtAwesome::)

## PACKAGES
#Generic Info
set(CPACK_PACKAGE_CONTACT "rick@blommersit.nl")
set(CPACK_STRIP_FILES TRUE)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.md")
set(CPACK_PACKAGE_NAME "QtAwesome")
set(CPACK_PACKAGE_VENDOR "gamecreature")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/gamecreature/QtAwesome")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CMAKE_PROJECT_DESCRIPTION})

## SET OS NAME
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(OS_STRING "macos")
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(OS_STRING "win64")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(OS_STRING "win32")
endif()
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(OS_STRING "linux_${CMAKE_SYSTEM_PROCESSOR}")
else()
set(OS_STRING ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
endif()

if (NOT CPACK_PACKAGE_VERSION)
set(CPACK_PACKAGE_VERSION ${CMAKE_PROJECT_VERSION})
endif()

if(NOT BUILD_SHARED_LIBS)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${OS_STRING}")
else()
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-static-${OS_STRING}")
endif()
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION})
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)

#Set base Name And Generator Based on the system
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(CPACK_GENERATOR "ZIP")
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CPACK_GENERATOR "7Z")
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(CPACK_GENERATOR "TGZ")
endif()

include(CPack)
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License
===========

Copyright 2013-2022 [Reliable Bits Software by Blommers IT](https://blommersit.nl). All Rights Reserved.
Copyright 2013-2025 [Blommers IT](https://blommersit.nl). All Rights Reserved.
Author [Rick Blommers](mailto:rick@blommersit.nl)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
Expand Down
Loading
Loading