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);