From ceecc4e7da72e9dfa166aa8deb526e26fb1cf407 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 7 Mar 2024 16:36:26 +0000 Subject: [PATCH] lib: header fixes --- CMakeLists.txt | 12 ++++++------ include/{ => hyprcursor}/hyprcursor.h | 0 include/{ => hyprcursor}/hyprcursor.hpp | 0 include/{ => hyprcursor}/shared.h | 0 libhyprcursor/hyprcursor.cpp | 2 +- libhyprcursor/hyprcursor_c.cpp | 4 ++-- tests/test.c | 6 +++--- tests/test.cpp | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) rename include/{ => hyprcursor}/hyprcursor.h (100%) rename include/{ => hyprcursor}/hyprcursor.hpp (100%) rename include/{ => hyprcursor}/shared.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac15a97..c0d154a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ else() message(STATUS "Configuring hyprcursor in Release") endif() -file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "libhyprcursor/*.cpp" "include/hyprcursor.hpp" "include/hyprcursor.h") +file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "libhyprcursor/*.cpp" "include/hyprcursor/hyprcursor.hpp" "include/hyprcursor/hyprcursor.h" "include/hyprcursor/shared.h") add_library(hyprcursor SHARED ${SRCFILES}) target_include_directories( hyprcursor @@ -39,8 +39,7 @@ target_include_directories( hyprcursor set_target_properties(hyprcursor PROPERTIES VERSION ${hyprcursor_VERSION} SOVERSION 0 - PUBLIC_HEADER include/hyprcursor.hpp - PUBLIC_HEADER include/hyprcursor.h + PUBLIC_HEADER include/hyprcursor/hyprcursor.hpp include/hyprcursor/hyprcursor.h include/hyprcursor/shared.h ) target_link_libraries(hyprcursor PkgConfig::deps) @@ -70,7 +69,8 @@ add_test(NAME "Test libhyprcursor in C" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/te add_dependencies(tests hyprcursor_test_c) # Installation -install(TARGETS hyprcursor - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(DIRECTORY "include/hyprcursor" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} DIRECTORY_PERMISSIONS + OWNER_WRITE OWNER_READ OWNER_EXECUTE + GROUP_WRITE GROUP_READ GROUP_EXECUTE + WORLD_WRITE WORLD_READ WORLD_EXECUTE) install(FILES ${CMAKE_BINARY_DIR}/hyprcursor.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/include/hyprcursor.h b/include/hyprcursor/hyprcursor.h similarity index 100% rename from include/hyprcursor.h rename to include/hyprcursor/hyprcursor.h diff --git a/include/hyprcursor.hpp b/include/hyprcursor/hyprcursor.hpp similarity index 100% rename from include/hyprcursor.hpp rename to include/hyprcursor/hyprcursor.hpp diff --git a/include/shared.h b/include/hyprcursor/shared.h similarity index 100% rename from include/shared.h rename to include/hyprcursor/shared.h diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp index 45c407b..45de94d 100644 --- a/libhyprcursor/hyprcursor.cpp +++ b/libhyprcursor/hyprcursor.cpp @@ -1,4 +1,4 @@ -#include "hyprcursor.hpp" +#include "hyprcursor/hyprcursor.hpp" #include "internalSharedTypes.hpp" #include "internalDefines.hpp" #include diff --git a/libhyprcursor/hyprcursor_c.cpp b/libhyprcursor/hyprcursor_c.cpp index e554206..2277bb0 100644 --- a/libhyprcursor/hyprcursor_c.cpp +++ b/libhyprcursor/hyprcursor_c.cpp @@ -1,5 +1,5 @@ -#include "hyprcursor.h" -#include "hyprcursor.hpp" +#include "hyprcursor/hyprcursor.h" +#include "hyprcursor/hyprcursor.hpp" using namespace Hyprcursor; diff --git a/tests/test.c b/tests/test.c index e24d62f..67b8f44 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -16,8 +16,8 @@ int main(int argc, char** argv) { return 1; } - int dataSize = 0; - hyprcursor_cursor_image_data** data = hyprcursor_get_cursor_image_data(mgr, "left_ptr", info, &dataSize); + int dataSize = 0; + hyprcursor_cursor_image_data** data = hyprcursor_get_cursor_image_data(mgr, "left_ptr", info, &dataSize); if (data == NULL) { printf("data failed\n"); return 1; diff --git a/tests/test.cpp b/tests/test.cpp index 13e60bf..c9592d5 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main(int argc, char** argv) { Hyprcursor::CHyprcursorManager mgr(nullptr);