mirror of
https://github.com/miracle-wm-org/miracle-wm.git
synced 2024-11-26 12:34:40 +03:00
Allow using custom mir libraries directory (#198)
* allow using custom mir libraries directory * update cmake options ordering to improve readability * CI: install libmirwayland-dev * CI: install libmirwayland-dev
This commit is contained in:
parent
ea33fb1c72
commit
ea8c9db1ac
2
.github/workflows/cmake.yml
vendored
2
.github/workflows/cmake.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13
|
||||
sudo apt install libmiral-dev libmircommon-internal-dev libmircommon-dev libmirserver-internal-dev \
|
||||
libgtest-dev libyaml-cpp-dev libglib2.0-dev libevdev-dev nlohmann-json3-dev libnotify-dev pcre2-utils \
|
||||
libmiroil-dev libmirrenderer-dev libgles2-mesa-dev
|
||||
libmiroil-dev libmirrenderer-dev libgles2-mesa-dev libmirwayland-dev
|
||||
|
||||
|
||||
- name: Configure CMake
|
||||
|
@ -8,13 +8,15 @@ set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(ENV{PKG_CONFIG_PATH} "/usr/local/lib/pkgconfig/")
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
set(MIR_LIBRARIES_PKGCONFIG_DIRECTORY "" CACHE STRING "Search for Mir libraries pc files in this directory")
|
||||
option(SNAP_BUILD "Building as a snap?" OFF)
|
||||
|
||||
set(ENV{PKG_CONFIG_PATH} "${MIR_LIBRARIES_PKGCONFIG_DIRECTORY}:/usr/local/lib/pkgconfig/")
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(MIRAL miral REQUIRED)
|
||||
pkg_check_modules(MIROIL miroil REQUIRED)
|
||||
@ -24,6 +26,7 @@ pkg_check_modules(MIRCOMMON mircommon REQUIRED)
|
||||
pkg_check_modules(MIRCOMMON_INTERNAL mircommon-internal REQUIRED)
|
||||
pkg_check_modules(MIRSERVER mirserver REQUIRED)
|
||||
pkg_check_modules(MIRSERVER_INTERNAL mirserver-internal REQUIRED)
|
||||
pkg_check_modules(MIRWAYLAND mirwayland REQUIRED)
|
||||
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
||||
pkg_check_modules(YAML REQUIRED IMPORTED_TARGET yaml-cpp)
|
||||
pkg_check_modules(LIBEVDEV REQUIRED IMPORTED_TARGET libevdev)
|
||||
@ -91,6 +94,7 @@ target_link_libraries(miracle-wm-implementation
|
||||
${MIRPLATFORM_LDFLAGS}
|
||||
${MIRSERVER_LDFLAGS}
|
||||
${MIRSERVER_INTERNAL_LDFLAGS}
|
||||
${MIRWAYLAND_LDFLAGS}
|
||||
PkgConfig::YAML
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::LIBEVDEV
|
||||
|
@ -75,6 +75,7 @@ parts:
|
||||
- libnotify-dev
|
||||
- libgles2-mesa-dev
|
||||
- libmirrenderer-dev
|
||||
- libmirwayland-dev
|
||||
stage-packages:
|
||||
- libmiral7
|
||||
- libmiroil5
|
||||
|
@ -14,6 +14,11 @@ pkg_check_modules(MIRSERVER mirserver REQUIRED)
|
||||
find_package(GTest REQUIRED)
|
||||
pkg_check_modules(YAML REQUIRED IMPORTED_TARGET yaml-cpp)
|
||||
|
||||
if(MIR_LIBRARIES_PKGCONFIG_DIRECTORY)
|
||||
list( PREPEND CMAKE_INSTALL_RPATH ${MIRAL_LIBRARY_DIRS} )
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||
endif()
|
||||
|
||||
add_executable(miracle-wm-tests
|
||||
filesystem_configuration_test.cpp
|
||||
tiling_window_tree_test.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user