refactor: move qt automoc, uic and rcc to a single place in Librarires.cmake

This commit is contained in:
sithlord48
2025-03-06 17:37:37 -05:00
committed by Nick Bolton
parent 0a23e62093
commit 256ba2411b
6 changed files with 5 additions and 12 deletions

View File

@ -35,6 +35,10 @@ macro(configure_libs)
find_program(DEPLOYQT macdeployqt)
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
message(STATUS "Qt version: ${Qt6_VERSION}")
option(ENABLE_COVERAGE "Enable test coverage" OFF)

View File

@ -8,10 +8,6 @@ else()
set(target deskflow)
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if(WIN32)

View File

@ -18,6 +18,7 @@ add_library(common STATIC
stdvector.h
${CMAKE_CURRENT_BINARY_DIR}/constants.h
)
set_target_properties(common PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(common PUBLIC Qt6::Core)

View File

@ -49,8 +49,6 @@ endif()
####################Start Making Library#########################
set(lib_name app)
set(CMAKE_AUTOMOC ON)
# arch
if(WIN32)
set(PLATFORM_CODE

View File

@ -4,9 +4,6 @@
set(target gui)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if(APPLE)

View File

@ -16,9 +16,6 @@ FetchContent_MakeAvailable(googletest)
macro(config_all_tests)
# Required to load images from .qrc file.
set(CMAKE_AUTORCC ON)
set(base_dir ${PROJECT_SOURCE_DIR})
set(src_dir ${base_dir}/src)
set(test_base_dir ${src_dir}/test)