internal: build via cmake
This commit is contained in:
parent
4f819c8557
commit
01d7f69551
3 changed files with 27 additions and 10 deletions
18
CMakeLists.txt
Normal file
18
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
cmake_minimum_required(VERSION 3.19)
|
||||||
|
project(caelestia-shell VERSION "0.0.1")
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(INSTALL_LIBDIR "/usr/lib/caelestia" CACHE STRING "Library install dir")
|
||||||
|
set(INSTALL_QMLDIR "/usr/lib/qt6/qml" CACHE STRING "QML install dir")
|
||||||
|
set(INSTALL_QSCONFDIR "/etc/xdg/quickshell/caelestia" CACHE STRING "Quickshell config install dir")
|
||||||
|
|
||||||
|
add_compile_options(-Wall -Wextra)
|
||||||
|
|
||||||
|
add_subdirectory(assets/cpp)
|
||||||
|
add_subdirectory(plugin)
|
||||||
|
|
||||||
|
foreach(dir assets components config modules services utils)
|
||||||
|
install(DIRECTORY ${dir} DESTINATION "${INSTALL_QSCONFDIR}")
|
||||||
|
endforeach()
|
||||||
|
install(FILES shell.qml LICENSE DESTINATION "${INSTALL_QSCONFDIR}")
|
||||||
9
assets/cpp/CMakeLists.txt
Normal file
9
assets/cpp/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(PIPEWIRE REQUIRED libpipewire-0.3)
|
||||||
|
pkg_check_modules(AUBIO REQUIRED aubio)
|
||||||
|
|
||||||
|
# Beat detector
|
||||||
|
add_executable(beat_detector beat-detector.cpp)
|
||||||
|
target_include_directories(beat_detector PRIVATE ${PIPEWIRE_INCLUDE_DIRS} ${AUBIO_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(beat_detector PRIVATE ${PIPEWIRE_LIBRARIES} ${AUBIO_LIBRARIES})
|
||||||
|
install(TARGETS beat_detector DESTINATION ${INSTALL_LIBDIR})
|
||||||
|
|
@ -1,19 +1,9 @@
|
||||||
cmake_minimum_required(VERSION 3.19)
|
|
||||||
project(Caelestia VERSION "0.0.1")
|
|
||||||
|
|
||||||
set(QT_MIN_VERSION "6.9.0")
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
|
|
||||||
add_compile_options(-Wall -Wextra)
|
|
||||||
|
|
||||||
find_package(Qt6 REQUIRED COMPONENTS Core Qml)
|
find_package(Qt6 REQUIRED COMPONENTS Core Qml)
|
||||||
|
|
||||||
if(QT_KNOWN_POLICY_QTP0001)
|
if(QT_KNOWN_POLICY_QTP0001)
|
||||||
qt_policy(SET QTP0001 NEW)
|
qt_policy(SET QTP0001 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(INSTALL_QMLDIR "" CACHE STRING "QML install dir")
|
|
||||||
set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml")
|
set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml")
|
||||||
qt_standard_project_setup()
|
qt_standard_project_setup()
|
||||||
add_subdirectory(src/Caelestia)
|
add_subdirectory(src/Caelestia)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue