Use qt conan package instead of local install

This commit is contained in:
Michael Mandl 2019-02-17 16:01:42 +01:00
parent c23b4d40a8
commit 24bc4dbd8b
3 changed files with 22 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
compile_commands.json
_*/
build/
build-*
*.user
tags

View File

@ -1,4 +1,5 @@
[requires]
qt/5.12.0@bincrafters/stable
protobuf/3.6.1@bincrafters/stable
protoc_installer/3.6.1@bincrafters/stable
catch2/2.4.2@bincrafters/stable
@ -8,3 +9,4 @@ cmake
[options]
protobuf:shared=False
qt:qttools=True

View File

@ -92,6 +92,25 @@ target_link_libraries(${PROJECT_NAME}
${Protobuf_LIBRARIES}
)
if (WIN32)
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
message(STATUS "_qmake_executable: ${_qmake_executable}")
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
message(STATUS "_qt_bin_dir: ${_qt_bin_dir}")
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
if (WINDEPLOYQT_EXECUTABLE)
message(STATUS "Found ${WINDEPLOYQT_EXECUTABLE}")
else()
message(FATAL_ERROR "Unable to find windeployqt")
endif()
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${WINDEPLOYQT_EXECUTABLE} $<TARGET_FILE:${PROJECT_NAME}>)
endif()
add_subdirectory(Age)
add_subdirectory(CheckableItem)
add_subdirectory(CheckableTest)