Skip to content

Commit

Permalink
Further improved PKG-Config
Browse files Browse the repository at this point in the history
  • Loading branch information
aous72 committed Jan 8, 2024
1 parent db8c8f0 commit 752d664
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ endif()
set(PKG_CONFIG_INCLUDEDIR "\${prefix}/include")
set(PKG_CONFIG_LIBDIR "\${prefix}/lib")
set(PKG_CONFIG_LIBS "-L\${libdir} -lopenjph")
set(PKG_CONFIG_CFLAGS "-I\${includedir}/openjph")
set(PKG_CONFIG_CFLAGS "-I\${includedir}")

include(GNUInstallDirs)
install(TARGETS openjph
Expand Down
18 changes: 9 additions & 9 deletions src/pkg-config.pc.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Name: ${PROJECT_NAME}
Description: ${PROJECT_DESCRIPTION}
Version: ${PROJECT_VERSION}
Requires: ${PKG_CONFIG_REQUIRES}
prefix=${CMAKE_INSTALL_PREFIX}
includedir=${PKG_CONFIG_INCLUDEDIR}
libdir=${PKG_CONFIG_LIBDIR}
Libs: ${PKG_CONFIG_LIBS}
Cflags: ${PKG_CONFIG_CFLAGS}
Name: @PROJECT_NAME@
Description: @PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@
Requires: @PKG_CONFIG_REQUIRES@
prefix=@CMAKE_INSTALL_PREFIX@
includedir=@PKG_CONFIG_INCLUDEDIR@
libdir=@PKG_CONFIG_LIBDIR@
Libs: @PKG_CONFIG_LIBS@
Cflags: @PKG_CONFIG_CFLAGS@

1 comment on commit 752d664

@kmilos
Copy link

@kmilos kmilos commented on 752d664 Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks. With this, you could also add the configure_file(... @ONLY) option in future releases (nothing urgent).

Please sign in to comment.