Опечатки
This commit is contained in:
parent
b1f6805c5e
commit
03832447bf
@ -2,6 +2,7 @@ include_guard(GLOBAL)
|
||||
|
||||
function(myx_target_setup_qt TARGET_NAME)
|
||||
set(options)
|
||||
set(oneValueArgs)
|
||||
set(multiValueArgs COMPONENTS PRIVATE PUBLIC_MOC PRIVATE_MOC UI QRC LANGS)
|
||||
|
||||
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
@ -18,15 +19,20 @@ function(myx_target_setup_qt TARGET_NAME)
|
||||
get_target_property(__target_type ${TARGET_NAME} TYPE)
|
||||
|
||||
foreach(iter ${ARG_COMPONENTS})
|
||||
if(__target_type STREQUAL "INTERFACE_LIBRARY")
|
||||
target_include_directories(${TARGET_NAME} INTERFACE ${Qt5${iter}_INCLUDE_DIRS})
|
||||
else()
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${Qt5${iter}_INCLUDE_DIRS})
|
||||
endif()
|
||||
if(NOT iter STREQUAL "LinguistTools")
|
||||
if(__target_type STREQUAL "EXECUTABLE")
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE "Qt${myx_qt_ver}::${iter}")
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE Qt${myx_qt_ver}::${iter})
|
||||
endif()
|
||||
if(__target_type STREQUAL "SHARED_LIBRARY")
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC "Qt${myx_qt_ver}::${iter}")
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC Qt${myx_qt_ver}::${iter})
|
||||
endif()
|
||||
if((${CMAKE_VERSION} VERSION_GREATER "3.8.0") AND (__target_type STREQUAL "OBJECT_LIBRARY"))
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC "Qt${myx_qt_ver}:${iter}")
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC Qt${myx_qt_ver}::${iter})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@ -70,7 +76,7 @@ function(myx_target_setup_qt TARGET_NAME)
|
||||
endif()
|
||||
|
||||
if(ARG_UI)
|
||||
if(NOT COMMAND qt${myx_ver_qt}qt_wrap_ui)
|
||||
if(NOT COMMAND qt${myx_ver_qt}_wrap_ui)
|
||||
message(WARNING "MyxCMake: Widgets is required to process UI")
|
||||
else()
|
||||
if(myx_qt_ver EQUAL 5)
|
||||
@ -80,6 +86,8 @@ function(myx_target_setup_qt TARGET_NAME)
|
||||
endif()
|
||||
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY TR_FILES ${ARG_UI})
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE Qt${myx_qt_ver}::Widgets)
|
||||
# TODO
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user