FluentUI/CMakeLists.txt

37 lines
1.3 KiB
CMake
Raw Normal View History

2023-06-08 23:19:38 +08:00
cmake_minimum_required(VERSION 3.20)
2023-04-01 21:01:46 +08:00
project(FluentUI VERSION 0.1 LANGUAGES CXX)
2023-04-04 03:15:10 +08:00
2023-08-10 16:08:27 +08:00
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/.cmake/")
include(GetGitRevisionDescription)
2023-06-16 12:25:50 +08:00
option(FLUENTUI_BUILD_EXAMPLES "Build FluentUI demo applications." ON)
option(FLUENTUI_BUILD_FRAMELESSHEPLER "Build FramelessHelper." ON)
option(FLUENTUI_BUILD_STATIC_LIB "Build static library." OFF)
2023-06-16 12:25:50 +08:00
2023-07-15 00:20:33 +08:00
#设置QML插件输出目录可以通过外部设置如果外部没有设置就默认到<QT_SDK_DIR_PATH>\qml\FluentUI目录下
set(FLUENTUI_QML_PLUGIN_DIRECTORY "" CACHE PATH "Path to FluentUI plugin")
if(NOT FLUENTUI_QML_PLUGIN_DIRECTORY)
set(FLUENTUI_QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI)
endif()
2023-04-01 21:01:46 +08:00
add_subdirectory(src)
2023-08-08 20:21:32 +08:00
add_subdirectory(zxing-cpp)
2023-06-08 23:19:38 +08:00
2023-06-16 12:25:50 +08:00
if (FLUENTUI_BUILD_EXAMPLES)
add_subdirectory(example)
endif ()
if (FLUENTUI_BUILD_FRAMELESSHEPLER)
2023-07-17 10:12:57 +08:00
set(FRAMELESSHELPER_BUILD_STATIC ON)
2023-08-13 20:49:04 +08:00
set(FRAMELESSHELPER_NO_DEBUG_OUTPUT ON)
2023-06-16 12:25:50 +08:00
add_subdirectory(framelesshelper)
endif ()
message("------------------------ FluentUI ------------------------")
message("Build FluentUI demo applications.: ${FLUENTUI_BUILD_EXAMPLES}")
message("Build FramelessHelper.: ${FLUENTUI_BUILD_FRAMELESSHEPLER}")
message("Build static library.: ${FLUENTUI_BUILD_STATIC_LIB}")
2023-07-15 00:20:33 +08:00
message("Path to FluentUI plugin.: ${FLUENTUI_QML_PLUGIN_DIRECTORY}")