diff --git a/CMakeLists.txt b/CMakeLists.txt index fd567b3..2508d5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,9 +54,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() # hyprcursor-util -add_subdirectory(hyprcursor-util) - -install(TARGETS hyprcursor) +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}) +target_include_directories(hyprcursor-util + PUBLIC "./include" + PRIVATE "./libhyprcursor" "./hyprcursor-util/src" +) +target_link_libraries(hyprcursor-util PkgConfig::deps hyprcursor) # 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) # Installation +install(TARGETS hyprcursor) +install(TARGETS hyprcursor-util) install(DIRECTORY "include/hyprcursor" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(FILES ${CMAKE_BINARY_DIR}/hyprcursor.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/hyprcursor-util/CMakeLists.txt b/hyprcursor-util/CMakeLists.txt deleted file mode 100644 index 24f522d..0000000 --- a/hyprcursor-util/CMakeLists.txt +++ /dev/null @@ -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) \ No newline at end of file diff --git a/hyprcursor-util/libhyprcursor b/hyprcursor-util/libhyprcursor deleted file mode 120000 index 05d7f90..0000000 --- a/hyprcursor-util/libhyprcursor +++ /dev/null @@ -1 +0,0 @@ -../libhyprcursor \ No newline at end of file diff --git a/hyprcursor-util/src/main.cpp b/hyprcursor-util/src/main.cpp index 1c6d24b..56ba21c 100644 --- a/hyprcursor-util/src/main.cpp +++ b/hyprcursor-util/src/main.cpp @@ -6,9 +6,9 @@ #include #include #include -#include "../libhyprcursor/internalSharedTypes.hpp" -#include "../libhyprcursor/manifest.hpp" -#include "../libhyprcursor/meta.hpp" +#include "internalSharedTypes.hpp" +#include "manifest.hpp" +#include "meta.hpp" enum eOperation { OPERATION_CREATE = 0,