Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Use library aliases instead of library names #55

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,22 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(STATUS "Using clang++ to compile hyprlang")
endif()

add_library(hypr::hyprlang ALIAS hyprlang)
install(TARGETS hyprlang)

# tests
add_custom_target(tests)

add_executable(hyprlang_test "tests/parse/main.cpp")
target_link_libraries(hyprlang_test PRIVATE hyprlang hyprutils)
target_link_libraries(hyprlang_test PRIVATE hypr::hyprlang)
add_test(
NAME "Parsing"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
COMMAND hyprlang_test "parse")
add_dependencies(tests hyprlang_test)

add_executable(hyprlang_fuzz "tests/fuzz/main.cpp")
target_link_libraries(hyprlang_fuzz PRIVATE hyprlang hyprutils)
target_link_libraries(hyprlang_fuzz PRIVATE hypr::hyprlang)
add_test(
NAME "Fuzz"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
Expand Down
Loading