2018-07-28 14:25:32 +08:00
|
|
|
include(QtUtils)
|
|
|
|
msvc_registry_search()
|
2021-05-02 22:05:54 +08:00
|
|
|
find_qt5(Core Widgets WinExtras)
|
|
|
|
|
2019-06-07 14:19:51 +08:00
|
|
|
add_executable(Textractor WIN32
|
2018-07-28 14:25:32 +08:00
|
|
|
main.cpp
|
|
|
|
mainwindow.cpp
|
2020-09-10 04:54:15 +08:00
|
|
|
extenwindow.cpp
|
2021-06-06 06:29:51 +08:00
|
|
|
attachprocessdialog.cpp
|
2019-02-19 12:12:12 +08:00
|
|
|
Textractor.rc
|
|
|
|
Textractor.ico
|
2018-07-28 14:25:32 +08:00
|
|
|
)
|
2020-04-19 09:04:07 +08:00
|
|
|
target_precompile_headers(Textractor REUSE_FROM pch)
|
2021-11-14 04:38:32 +08:00
|
|
|
target_link_libraries(Textractor host Qt5::Widgets Qt5::WinExtras shell32 winhttp)
|
2019-02-25 13:08:20 +08:00
|
|
|
|
2021-01-16 00:32:23 +08:00
|
|
|
if (NOT EXISTS ${CMAKE_FINAL_OUTPUT_DIRECTORY}/Qt5Core.dll AND NOT EXISTS ${CMAKE_FINAL_OUTPUT_DIRECTORY}/Qt5Cored.dll)
|
|
|
|
add_custom_command(TARGET Textractor
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/windeployqt"
|
|
|
|
COMMAND set PATH=%PATH%$<SEMICOLON>${qt5_install_prefix}/bin
|
|
|
|
COMMAND Qt5::windeployqt --dir ${CMAKE_FINAL_OUTPUT_DIRECTORY} "${CMAKE_FINAL_OUTPUT_DIRECTORY}/Textractor.exe"
|
|
|
|
)
|
2019-05-25 01:30:12 +08:00
|
|
|
endif()
|