refactor: move qt automoc, uic and rcc to a single place in Librarires.cmake
This commit is contained in:
parent
0a23e62093
commit
256ba2411b
6 changed files with 5 additions and 12 deletions
|
|
@ -35,6 +35,10 @@ macro(configure_libs)
|
||||||
find_program(DEPLOYQT macdeployqt)
|
find_program(DEPLOYQT macdeployqt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
message(STATUS "Qt version: ${Qt6_VERSION}")
|
message(STATUS "Qt version: ${Qt6_VERSION}")
|
||||||
|
|
||||||
option(ENABLE_COVERAGE "Enable test coverage" OFF)
|
option(ENABLE_COVERAGE "Enable test coverage" OFF)
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,6 @@ else()
|
||||||
set(target deskflow)
|
set(target deskflow)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
set(CMAKE_AUTORCC ON)
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ add_library(common STATIC
|
||||||
stdvector.h
|
stdvector.h
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/constants.h
|
${CMAKE_CURRENT_BINARY_DIR}/constants.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(common PROPERTIES LINKER_LANGUAGE CXX)
|
set_target_properties(common PROPERTIES LINKER_LANGUAGE CXX)
|
||||||
target_link_libraries(common PUBLIC Qt6::Core)
|
target_link_libraries(common PUBLIC Qt6::Core)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,6 @@ endif()
|
||||||
####################Start Making Library#########################
|
####################Start Making Library#########################
|
||||||
set(lib_name app)
|
set(lib_name app)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
# arch
|
# arch
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(PLATFORM_CODE
|
set(PLATFORM_CODE
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,6 @@
|
||||||
|
|
||||||
set(target gui)
|
set(target gui)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
set(CMAKE_AUTORCC ON)
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,6 @@ FetchContent_MakeAvailable(googletest)
|
||||||
|
|
||||||
macro(config_all_tests)
|
macro(config_all_tests)
|
||||||
|
|
||||||
# Required to load images from .qrc file.
|
|
||||||
set(CMAKE_AUTORCC ON)
|
|
||||||
|
|
||||||
set(base_dir ${PROJECT_SOURCE_DIR})
|
set(base_dir ${PROJECT_SOURCE_DIR})
|
||||||
set(src_dir ${base_dir}/src)
|
set(src_dir ${base_dir}/src)
|
||||||
set(test_base_dir ${src_dir}/test)
|
set(test_base_dir ${src_dir}/test)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue