CMake: move hyprcursor-util to parent

This commit is contained in:
Vaxry 2024-04-04 17:40:42 +01:00
parent aaccfdc83d
commit d780013ffa
4 changed files with 12 additions and 32 deletions

View file

@ -54,9 +54,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif() endif()
# hyprcursor-util # hyprcursor-util
add_subdirectory(hyprcursor-util) file(GLOB_RECURSE UTILSRCFILES CONFIGURE_DEPENDS "hyprcursor-util/src/*.cpp" "include/hyprcursor/hyprcursor.hpp" "include/hyprcursor/hyprcursor.h" "include/hyprcursor/shared.h")
add_executable(hyprcursor-util ${UTILSRCFILES})
install(TARGETS hyprcursor) target_include_directories(hyprcursor-util
PUBLIC "./include"
PRIVATE "./libhyprcursor" "./hyprcursor-util/src"
)
target_link_libraries(hyprcursor-util PkgConfig::deps hyprcursor)
# tests # tests
add_custom_target(tests) add_custom_target(tests)
@ -72,5 +76,7 @@ add_test(NAME "Test libhyprcursor in C" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/te
add_dependencies(tests hyprcursor_test_c) add_dependencies(tests hyprcursor_test_c)
# Installation # Installation
install(TARGETS hyprcursor)
install(TARGETS hyprcursor-util)
install(DIRECTORY "include/hyprcursor" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(DIRECTORY "include/hyprcursor" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES ${CMAKE_BINARY_DIR}/hyprcursor.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(FILES ${CMAKE_BINARY_DIR}/hyprcursor.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

View file

@ -1,25 +0,0 @@
cmake_minimum_required(VERSION 3.19)
project(
hyprcursor-util
DESCRIPTION "A utility for creating and converting hyprcursor themes"
)
find_package(PkgConfig REQUIRED)
pkg_check_modules(deps REQUIRED IMPORTED_TARGET hyprlang>=0.4.0 libzip)
add_compile_definitions(HYPRCURSOR_VERSION="${HYPRCURSOR_VERSION}")
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
file(GLOB_RECURSE HCFILES CONFIGURE_DEPENDS "libhyprcursor/*.cpp")
set(CMAKE_CXX_STANDARD 23)
add_executable(hyprcursor-util ${SRCFILES} ${HCFILES})
target_link_libraries(hyprcursor-util PkgConfig::deps)
target_include_directories(hyprcursor-util
PRIVATE
.
)
install(TARGETS hyprcursor-util)

View file

@ -1 +0,0 @@
../libhyprcursor

View file

@ -6,9 +6,9 @@
#include <format> #include <format>
#include <algorithm> #include <algorithm>
#include <hyprlang.hpp> #include <hyprlang.hpp>
#include "../libhyprcursor/internalSharedTypes.hpp" #include "internalSharedTypes.hpp"
#include "../libhyprcursor/manifest.hpp" #include "manifest.hpp"
#include "../libhyprcursor/meta.hpp" #include "meta.hpp"
enum eOperation { enum eOperation {
OPERATION_CREATE = 0, OPERATION_CREATE = 0,