Skip to content

Commit

Permalink
Merge pull request #1 from ganyuanzhen/main
Browse files Browse the repository at this point in the history
[Fix] 修复编译问题
  • Loading branch information
lingmo-dream authored Feb 21, 2024
2 parents f661155 + b6bc7ca commit 29e4f01
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
- name: Checkout Source
uses: actions/checkout@v2
- name: Update repository
run: apt-get update -y
run: sudo apt-get update -y
- name: Install the basic dev packages
run: apt-get install -y equivs curl git devscripts lintian build-essential automake autotools-dev cmake g++
run: sudo apt-get install -y equivs curl git devscripts lintian build-essential automake autotools-dev cmake g++
- name: Install build dependencies
run: mk-build-deps -i -t "apt-get --yes" -r
run: sudo mk-build-deps -i -t "apt-get --yes" -r
- name: Build Package
run: dpkg-buildpackage -b -uc -us -j$(nproc)
run: sudo dpkg-buildpackage -b -uc -us -j$(nproc)
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(core)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand All @@ -9,15 +9,14 @@ set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_CURRENT_SOURCE_DIR}/cmake")

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/)

set(QT Core Gui Widgets Quick QuickControls2 DBus Xml X11Extras LinguistTools)
find_package(Qt5 REQUIRED ${QT})
# find_package(LingmoUI REQUIRED)
find_package(PkgConfig REQUIRED)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})

include(GNUInstallDirs)

add_subdirectory(polkit-agent)
Expand Down
3 changes: 3 additions & 0 deletions chotkeys/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
find_package(ECM REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})

find_package(Qt5 COMPONENTS Core Widgets DBus X11Extras REQUIRED)
find_package(XCB MODULE REQUIRED COMPONENTS XCB KEYSYMS)
find_package(X11)
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions gmenuproxy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
find_package(ECM REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})


find_package(AppMenuGtkModule)
find_package(KF5WindowSystem)
find_package(KF5CoreAddons)
Expand Down Expand Up @@ -41,6 +45,7 @@ target_link_libraries(lingmo-gmenuproxy
KF5::CoreAddons
KF5::WindowSystem
XCB::XCB
${AppMenuGtkModule}
)

configure_file(
Expand Down
11 changes: 8 additions & 3 deletions notificationd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ find_package(KF5WindowSystem)

add_executable(lingmo-notificationd ${SRCS} ${DBUS_SOURCES})

file(GLOB TS_FILES translations/*.ts)
foreach(filepath ${TS_FILES})
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
list(APPEND ts_files_replaced ${filename})
endforeach()
qt5_create_translation(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${ts_files_replaced})

target_link_libraries(lingmo-notificationd
Qt5::Core
Qt5::DBus
Expand All @@ -37,9 +44,7 @@ install(TARGETS lingmo-notificationd
COMPONENT Runtime
)

file(GLOB TS_FILES translations/*.ts)
qt5_create_translation(QM_FILES ${TS_FILES})
add_custom_target(notificationd_translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES})
add_custom_target(notificationd_translations DEPENDS ${QM_FILES} SOURCES ${ts_files_replaced})
add_dependencies(lingmo-notificationd notificationd_translations)

install(FILES ${QM_FILES} DESTINATION /usr/share/lingmo-notificationd/translations)
11 changes: 8 additions & 3 deletions polkit-agent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ add_executable(lingmo-polkit-agent
qml.qrc
)

file(GLOB TS_FILES translations/*.ts)
foreach(filepath ${TS_FILES})
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
list(APPEND ts_files_replaced ${filename})
endforeach()
qt5_create_translation(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${ts_files_replaced})

target_link_libraries(lingmo-polkit-agent
Qt5::Core
Qt5::Widgets
Expand All @@ -29,9 +36,7 @@ target_link_libraries(lingmo-polkit-agent
${POLKIT_AGENT_LDFLAGS}
)

file(GLOB TS_FILES translations/*.ts)
qt5_create_translation(QM_FILES ${TS_FILES})
add_custom_target(polkit-agent-translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES})
add_custom_target(polkit-agent-translations DEPENDS ${QM_FILES} SOURCES ${ts_files_replaced})
add_dependencies(lingmo-polkit-agent polkit-agent-translations)

install(TARGETS lingmo-polkit-agent
Expand Down
3 changes: 3 additions & 0 deletions powerman/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
project(lingmo-powerman)
set(TARGET lingmo-powerman)

find_package(ECM REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})

find_package(KF5IdleTime)
find_package(X11)
find_package(XCB
Expand Down
15 changes: 12 additions & 3 deletions settings-daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
project(lingmo-settings-daemon)
set(TARGET lingmo-settings-daemon)

find_package(ECM REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})

find_package(X11 REQUIRED)
find_package(X11_XCB REQUIRED)
find_package(XCB REQUIRED)
Expand Down Expand Up @@ -60,6 +63,14 @@ qt5_add_dbus_adaptor(DBUS_SOURCES
set_source_files_properties(${DBUS_SOURCES} PROPERTIES SKIP_AUTOGEN ON)

add_executable(${TARGET} ${SOURCES} ${DBUS_SOURCES} ${HEADERS} ${FORMS} ${RESOURCES})

file(GLOB TS_FILES translations/*.ts)
foreach(filepath ${TS_FILES})
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
list(APPEND ts_files_replaced ${filename})
endforeach()
qt5_create_translation(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${ts_files_replaced})

target_link_libraries(${TARGET}
Qt5::Core
Qt5::Gui
Expand All @@ -77,9 +88,7 @@ target_link_libraries(${TARGET}
PkgConfig::SYNAPTICS
)

file(GLOB TS_FILES translations/*.ts)
qt5_create_translation(QM_FILES ${TS_FILES})
add_custom_target(translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES})
add_custom_target(translations DEPENDS ${QM_FILES} SOURCES ${ts_files_replaced})
add_dependencies(${TARGET} translations)

install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
14 changes: 11 additions & 3 deletions shutdown-ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ add_executable(lingmo-shutdown
qml.qrc
)

file(GLOB TS_FILES translations/*.ts)
foreach(filepath ${TS_FILES})
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
list(APPEND ts_files_replaced ${filename})
endforeach()
qt5_create_translation(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${ts_files_replaced})

target_link_libraries(lingmo-shutdown
Qt5::Core
Qt5::Widgets
Expand All @@ -14,10 +21,11 @@ target_link_libraries(lingmo-shutdown
Qt5::DBus
)

file(GLOB TS_FILES translations/*.ts)
qt5_create_translation(QM_FILES ${TS_FILES})
add_custom_target(shutdown-translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES})

add_custom_target(shutdown-translations DEPENDS ${QM_FILES} SOURCES ${ts_files_replaced})
add_dependencies(lingmo-shutdown shutdown-translations)

include(GNUInstallDirs)
install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/lingmo-shutdown/translations)

install(TARGETS lingmo-shutdown RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
3 changes: 3 additions & 0 deletions xembed-sni-proxy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ add_definitions(-DQT_NO_CAST_TO_ASCII
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY)

find_package(ECM REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})

find_package(X11)
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
URL "http://www.x.org"
Expand Down

0 comments on commit 29e4f01

Please sign in to comment.