mirror of
https://github.com/gamecreature/QtAwesome.git
synced 2025-01-27 14:59:08 +08:00
Merge branch 'MartinDelille-cmake'
This commit is contained in:
commit
1257a45f5f
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,6 @@
|
|||||||
.*
|
.*
|
||||||
*.pro.user
|
*.pro.user
|
||||||
*.pro.user*
|
CMakeLists.txt.user
|
||||||
/*build*
|
/*build*
|
||||||
|
|
||||||
# never include pro files
|
# never include pro files
|
||||||
|
25
QtAwesome/CMakeLists.txt
Normal file
25
QtAwesome/CMakeLists.txt
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
project(QtAwesome)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
add_library(QtAwesome
|
||||||
|
QtAwesome.cpp
|
||||||
|
QtAwesomeAnim.cpp
|
||||||
|
QtAwesomeFree.qrc
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(QtAwesome
|
||||||
|
INTERFACE ${PROJECT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(QtAwesome PUBLIC
|
||||||
|
Qt${QT_VERSION_MAJOR}::Widgets
|
||||||
|
)
|
@ -102,7 +102,7 @@ public:
|
|||||||
painter->save();
|
painter->save();
|
||||||
|
|
||||||
painter->setRenderHint(QPainter::Antialiasing);
|
painter->setRenderHint(QPainter::Antialiasing);
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||||
painter->setRenderHint(QPainter::HighQualityAntialiasing);
|
painter->setRenderHint(QPainter::HighQualityAntialiasing);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
20
QtAwesomeSample/CMakeLists.txt
Normal file
20
QtAwesomeSample/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
project(QtAwesomeSample)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
add_subdirectory(../QtAwesome QtAwesome)
|
||||||
|
|
||||||
|
add_executable(QtAwesomeSample
|
||||||
|
mainwindow.cpp
|
||||||
|
main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(QtAwesomeSample
|
||||||
|
PUBLIC QtAwesome
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user