20 lines
558 B
CMake
20 lines
558 B
CMake
|
set(CMAKE_AUTOUIC ON)
|
||
|
set(CMAKE_AUTOMOC ON)
|
||
|
set(CMAKE_AUTORCC ON)
|
||
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui Widgets REQUIRED)
|
||
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets REQUIRED)
|
||
|
add_executable(test
|
||
|
main.cpp
|
||
|
mainwindow.cpp
|
||
|
mainwindow.h
|
||
|
mainwindow.ui
|
||
|
)
|
||
|
target_include_directories( test PRIVATE
|
||
|
../)
|
||
|
target_link_libraries(test PRIVATE
|
||
|
Qt${QT_VERSION_MAJOR}::Core
|
||
|
Qt${QT_VERSION_MAJOR}::Gui
|
||
|
Qt${QT_VERSION_MAJOR}::Widgets
|
||
|
chinese-segmentation
|
||
|
)
|