Skip to content

Commit

Permalink
build: fix aln.pc.in variables
Browse files Browse the repository at this point in the history
Signed-off-by: Inho Oh <webispy@gmail.com>
  • Loading branch information
webispy committed Jul 10, 2024
1 parent 5af63b2 commit 7fe58b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ include_directories(include)
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/aln/)

# pkg-config file
if(NOT DEFINED CMAKE_LIBRARY_ARCHITECTURE)
set(libdir "\${prefix}/lib")
else()
set(libdir "\${prefix}/lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
set(includedir "\${prefix}/include/aln")
configure_file(aln.pc.in ${PROJECT_BINARY_DIR}/aln.pc @ONLY)
install(FILES ${PROJECT_BINARY_DIR}/aln.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/)

Expand Down
8 changes: 4 additions & 4 deletions aln.pc.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@/aln
version=@VERSION@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=@libdir@
includedir=@includedir@

Name: aln
Description: Library for Amazing Lucky Number generation
Version: ${version}
Version: @VERSION@
Requires: glib-2.0
Libs: -L${libdir} -laln
Cflags: -I${includedir}

0 comments on commit 7fe58b1

Please sign in to comment.