mirror of
https://github.com/jaredtao/TaoQuick.git
synced 2025-01-19 20:22:56 +08:00
36 lines
810 B
CMake
36 lines
810 B
CMake
cmake_minimum_required(VERSION 3.14)
|
|
|
|
project(HelloTaoQuick2 LANGUAGES CXX)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
set(CMAKE_AUTOMOC ON)
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
include(taoQuick.cmake)
|
|
|
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick REQUIRED)
|
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick REQUIRED)
|
|
|
|
if(ANDROID)
|
|
add_library(HelloTaoQuick2 SHARED
|
|
main.cpp
|
|
qml.qrc
|
|
)
|
|
else()
|
|
add_executable(HelloTaoQuick2
|
|
main.cpp
|
|
qml.qrc
|
|
${TaoQuickRes}
|
|
)
|
|
endif()
|
|
|
|
target_compile_definitions(HelloTaoQuick2
|
|
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
|
|
target_link_libraries(HelloTaoQuick2
|
|
PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick)
|