Textractor/GUI/CMakeLists.txt

25 lines
808 B
CMake
Raw Normal View History

2018-07-28 09:25:32 +03:00
include(QtUtils)
msvc_registry_search()
find_qt5(Core Widgets WinExtras)
2019-06-07 02:19:51 -04:00
add_executable(Textractor WIN32
2018-07-28 09:25:32 +03:00
main.cpp
2022-01-02 00:49:50 -07:00
exception.cpp
2018-07-28 09:25:32 +03:00
mainwindow.cpp
2020-09-09 14:54:15 -06:00
extenwindow.cpp
2021-06-05 16:29:51 -06:00
attachprocessdialog.cpp
2019-02-18 23:12:12 -05:00
Textractor.rc
Textractor.ico
2018-07-28 09:25:32 +03:00
)
2020-04-18 19:04:07 -06:00
target_precompile_headers(Textractor REUSE_FROM pch)
target_link_libraries(Textractor host Qt5::Widgets Qt5::WinExtras shell32 winhttp)
2019-02-25 00:08:20 -05:00
2021-01-15 09:32:23 -07: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"
)
endif()