Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
ui/*.ui
)

# translations
file(GLOB copyq_TRANSLATIONS ../translations/*.ts)

set(copyq_RESOURCES copyq.qrc)

# Qt include paths and definitions
set(copyq_DEFINITIONS ${${copyq_qt}Widgets_DEFINITIONS})

include(notifications.cmake)
include(platform/platform.cmake)

Expand All @@ -31,12 +32,6 @@
list(APPEND copyq_DEFINITIONS QXT_STATIC COPYQ_GLOBAL_SHORTCUTS)
endif()

# translations
file(GLOB copyq_TRANSLATIONS ../translations/*.ts)

find_package(${copyq_qt}LinguistTools REQUIRED)
qt_add_translation(copyq_QM ${copyq_TRANSLATIONS})

qt_wrap_ui(copyq_FORMS_HEADERS ${copyq_FORMS})
qt_add_resources(copyq_RESOURCES_RCC ${copyq_RESOURCES})

Expand Down Expand Up @@ -65,6 +60,12 @@
)
add_library(copyq-common OBJECT ${copyq_COMPILE})

find_package(${copyq_qt} REQUIRED COMPONENTS LinguistTools)
qt_add_translations(copyq-common

Check failure on line 64 in src/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Qt 5

Unknown CMake command "qt_add_translations".
TS_FILES ${copyq_TRANSLATIONS}
QM_FILES_OUTPUT_VARIABLE copyq_QM
)

if (NOT copyq_version)
message(FATAL_ERROR "Application version is unset")
endif()
Expand Down Expand Up @@ -129,8 +130,8 @@

set_target_properties(copyq-common PROPERTIES COMPILE_DEFINITIONS "${copyq_DEFINITIONS}")
set_target_properties(${COPYQ_EXECUTABLE_NAME} PROPERTIES LINK_FLAGS "${copyq_LINK_FLAGS}")
target_link_libraries(${COPYQ_EXECUTABLE_NAME} ${copyq_LIBRARIES})
target_link_libraries(copyq-common ${copyq_LIBRARIES})
target_link_libraries(${COPYQ_EXECUTABLE_NAME} ${copyq_LIBRARIES})
target_include_directories(copyq-common PRIVATE ${CMAKE_CURRENT_BINARY_DIR} .)
target_include_directories(${COPYQ_EXECUTABLE_NAME} PRIVATE .)

Expand Down
Loading