QtAwesome/CMakeLists.txt

45 lines
957 B
CMake
Raw Normal View History

2023-01-31 02:10:54 +08:00
cmake_minimum_required(VERSION 3.16)
2022-11-21 05:25:55 +08:00
project(QtAwesome)
2023-01-31 14:02:23 +08:00
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)
2023-01-26 22:18:41 +08:00
add_library(QtAwesome
2023-04-01 00:32:51 +08:00
QtAwesome/QtAwesome.h
QtAwesome/QtAwesome.cpp
QtAwesome/QtAwesomeAnim.h
QtAwesome/QtAwesomeAnim.cpp
QtAwesome/QtAwesomeEnumGenerated.h
QtAwesome/QtAwesomeStringGenerated.h
QtAwesome/QtAwesomeFree.qrc
2022-11-21 05:25:55 +08:00
)
2023-01-26 22:18:41 +08:00
target_include_directories(QtAwesome
2023-04-01 00:32:51 +08:00
INTERFACE ${PROJECT_SOURCE_DIR}/QtAwesome
2022-11-21 05:25:55 +08:00
)
2023-01-26 22:18:41 +08:00
target_link_libraries(QtAwesome PUBLIC
2023-04-01 00:32:51 +08:00
Qt${QT_VERSION_MAJOR}::Widgets
2022-11-21 05:25:55 +08:00
)
2023-04-29 17:29:37 +08:00
install(TARGETS QtAwesome
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(FILES
QtAwesome/QtAwesome.h
QtAwesome/QtAwesomeAnim.h
QtAwesome/QtAwesomeEnumGenerated.h
QtAwesome/QtAwesomeStringGenerated.h
DESTINATION include
)