mirror of
https://github.com/hyprwm/hyprwayland-scanner.git
synced 2024-11-23 16:55:58 +01:00
CMake: fmt
This commit is contained in:
parent
117b6d93ed
commit
4a1f262f37
1 changed files with 22 additions and 26 deletions
|
@ -3,10 +3,10 @@ cmake_minimum_required(VERSION 3.19)
|
||||||
file(READ "${CMAKE_SOURCE_DIR}VERSION" VER_RAW)
|
file(READ "${CMAKE_SOURCE_DIR}VERSION" VER_RAW)
|
||||||
string(STRIP ${VER_RAW} VERSION)
|
string(STRIP ${VER_RAW} VERSION)
|
||||||
|
|
||||||
project(hyprwayland-scanner
|
project(
|
||||||
|
hyprwayland-scanner
|
||||||
DESCRIPTION "A hyprland version of wayland-scanner in and for C++"
|
DESCRIPTION "A hyprland version of wayland-scanner in and for C++"
|
||||||
VERSION ${VERSION}
|
VERSION ${VERSION})
|
||||||
)
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
|
@ -23,7 +23,6 @@ else()
|
||||||
message(STATUS "Configuring hyprwayland-scanner in Release with CMake")
|
message(STATUS "Configuring hyprwayland-scanner in Release with CMake")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# configure
|
# configure
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value
|
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value
|
||||||
|
@ -42,25 +41,22 @@ pkg_check_modules(deps REQUIRED IMPORTED_TARGET pugixml)
|
||||||
|
|
||||||
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
||||||
add_executable(hyprwayland-scanner ${SRCFILES})
|
add_executable(hyprwayland-scanner ${SRCFILES})
|
||||||
target_link_libraries(hyprwayland-scanner PRIVATE rt Threads::Threads PkgConfig::deps)
|
target_link_libraries(hyprwayland-scanner PRIVATE rt Threads::Threads
|
||||||
|
PkgConfig::deps)
|
||||||
|
|
||||||
configure_package_config_file(
|
configure_package_config_file(
|
||||||
hyprwayland-scanner-config.cmake.in
|
hyprwayland-scanner-config.cmake.in hyprwayland-scanner-config.cmake
|
||||||
hyprwayland-scanner-config.cmake
|
|
||||||
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/hyprwayland-scanner"
|
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/hyprwayland-scanner"
|
||||||
PATH_VARS CMAKE_INSTALL_BINDIR
|
PATH_VARS CMAKE_INSTALL_BINDIR)
|
||||||
)
|
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
"hyprwayland-scanner-config-version.cmake"
|
"hyprwayland-scanner-config-version.cmake"
|
||||||
VERSION "${VERSION}"
|
VERSION "${VERSION}"
|
||||||
COMPATIBILITY AnyNewerVersion
|
COMPATIBILITY AnyNewerVersion)
|
||||||
)
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
install(TARGETS hyprwayland-scanner)
|
install(TARGETS hyprwayland-scanner)
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/hyprwayland-scanner.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
install(FILES ${CMAKE_BINARY_DIR}/hyprwayland-scanner.pc
|
||||||
install(FILES
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
${CMAKE_BINARY_DIR}/hyprwayland-scanner-config.cmake
|
install(FILES ${CMAKE_BINARY_DIR}/hyprwayland-scanner-config.cmake
|
||||||
${CMAKE_BINARY_DIR}/hyprwayland-scanner-config-version.cmake
|
${CMAKE_BINARY_DIR}/hyprwayland-scanner-config-version.cmake
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hyprwayland-scanner
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hyprwayland-scanner)
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in a new issue