mirror of
https://github.com/reactos/CMake.git
synced 2025-01-05 18:38:46 +00:00
QtAutogen tests: Pass Qt compiler features to library targets
This commit is contained in:
parent
c4d4becf8b
commit
6938772a11
@ -44,6 +44,7 @@ else()
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
get_property(QT_COMPILE_FEATURES TARGET ${QT_QTCORE_TARGET} PROPERTY INTERFACE_COMPILE_FEATURES)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
# -- Test: AUTORCC
|
# -- Test: AUTORCC
|
||||||
@ -72,11 +73,13 @@ target_link_libraries(uicOnly ${QT_LIBRARIES})
|
|||||||
# have an effect on generation if AUTORCC is off.
|
# have an effect on generation if AUTORCC is off.
|
||||||
add_library(empty STATIC empty.cpp not_generated_file.qrc)
|
add_library(empty STATIC empty.cpp not_generated_file.qrc)
|
||||||
set_target_properties(empty PROPERTIES AUTORCC OFF)
|
set_target_properties(empty PROPERTIES AUTORCC OFF)
|
||||||
|
|
||||||
set_target_properties(empty PROPERTIES AUTOMOC TRUE)
|
set_target_properties(empty PROPERTIES AUTOMOC TRUE)
|
||||||
target_link_libraries(empty no_link_language)
|
target_link_libraries(empty no_link_language)
|
||||||
add_library(no_link_language STATIC empty.h)
|
add_library(no_link_language STATIC empty.h)
|
||||||
set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE)
|
set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE)
|
||||||
|
# Pass Qt compiler features to targets that don't link against Qt
|
||||||
|
target_compile_features(no_link_language PRIVATE ${QT_COMPILE_FEATURES})
|
||||||
|
target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES})
|
||||||
|
|
||||||
# -- Test: AUTORCC
|
# -- Test: AUTORCC
|
||||||
# When a file listed in a .qrc file changes the target must be rebuilt
|
# When a file listed in a .qrc file changes the target must be rebuilt
|
||||||
|
@ -12,6 +12,9 @@ set(CMAKE_AUTORCC ON)
|
|||||||
# create an executable and two library targets, each requiring automoc:
|
# create an executable and two library targets, each requiring automoc:
|
||||||
add_library(codeeditorLib STATIC codeeditor.cpp)
|
add_library(codeeditorLib STATIC codeeditor.cpp)
|
||||||
add_library(privateSlot OBJECT private_slot.cpp)
|
add_library(privateSlot OBJECT private_slot.cpp)
|
||||||
|
# Pass Qt compiler features to targets that don't link against Qt
|
||||||
|
target_compile_features(codeeditorLib PRIVATE ${QT_COMPILE_FEATURES})
|
||||||
|
target_compile_features(privateSlot PRIVATE ${QT_COMPILE_FEATURES})
|
||||||
|
|
||||||
configure_file(generated_resource.qrc.in generated_resource.qrc @ONLY)
|
configure_file(generated_resource.qrc.in generated_resource.qrc @ONLY)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
Loading…
Reference in New Issue
Block a user