Skip to content

Commit

Permalink
CMake: fix install dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Jan 4, 2024
1 parent 6624f2b commit 4c28464
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
cmake_minimum_required(VERSION 3.19)

set(HYPRLANG_VERSION "0.2.1")
set(PREFIX ${CMAKE_INSTALL_PREFIX})
set(INCLUDE ${CMAKE_INSTALL_INCLUDEDIR})

project(hyprlang
VERSION ${HYPRLANG_VERSION}
DESCRIPTION "A library to parse hypr config files"
)

configure_file(hyprlang.pc.in hyprlang.pc @ONLY)

include(CTest)
include(GNUInstallDirs)

set(PREFIX ${CMAKE_INSTALL_PREFIX})
set(INCLUDE ${CMAKE_INSTALL_FULL_INCLUDEDIR})

configure_file(hyprlang.pc.in hyprlang.pc @ONLY)

set(CMAKE_CXX_STANDARD 23)

Expand Down Expand Up @@ -43,4 +45,4 @@ add_dependencies(tests hyprlang_fuzz)
install(TARGETS hyprlang
PUBLIC_HEADER DESTINATION include
LIBRARY DESTINATION lib)
install(FILES ${CMAKE_BINARY_DIR}/hyprlang.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pkgconfig)
install(FILES ${CMAKE_BINARY_DIR}/hyprlang.pc DESTINATION ${PREFIX}/share/pkgconfig)

0 comments on commit 4c28464

Please sign in to comment.